/* Floating report button — hidden on desktop (use toolbar Report); kept for legacy */
.rf-fab-wrap-hidden {
    display: none !important;
}

/* Floating report button + feedback modal (EN / AR) */
.rf-fab-wrap {
    position: fixed;
    bottom: 24px;
    left: 24px;
    z-index: 10050;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
    pointer-events: none;
}

.rf-fab-wrap * {
    pointer-events: auto;
}

.rf-fab-label {
    background: #1a1f36;
    color: #fff;
    font-size: 12px;
    font-weight: 600;
    padding: 8px 14px;
    border-radius: 10px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.25);
    white-space: nowrap;
    opacity: 0;
    transform: translateY(6px);
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.rf-fab-wrap:hover .rf-fab-label,
.rf-fab-wrap:focus-within .rf-fab-label {
    opacity: 1;
    transform: translateY(0);
}

.rf-fab {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    border: none;
    background: linear-gradient(145deg, #ffd54f 0%, #ffb300 100%);
    color: #1a1f36;
    font-size: 22px;
    cursor: pointer;
    box-shadow: 0 6px 20px rgba(255, 179, 0, 0.45);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.rf-fab:hover {
    transform: scale(1.06);
    box-shadow: 0 8px 24px rgba(255, 179, 0, 0.55);
}

.rf-fab:active {
    transform: scale(0.98);
}

.rf-lang-toggle {
    position: absolute;
    top: -8px;
    right: -8px;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    border: 2px solid #fff;
    background: #1a1f36;
    color: #ffd54f;
    font-size: 10px;
    font-weight: 700;
    cursor: pointer;
    z-index: 2;
}

.rf-overlay {
    position: fixed;
    inset: 0;
    background: rgba(10, 14, 30, 0.72);
    z-index: 10060;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 16px;
    backdrop-filter: blur(4px);
}

.rf-overlay.is-open {
    display: flex;
}

.rf-modal {
    width: min(520px, 100%);
    max-height: min(92vh, 720px);
    overflow-y: auto;
    background: linear-gradient(180deg, #1e2740 0%, #151b2e 100%);
    border-radius: 18px;
    border: 1px solid rgba(255, 213, 79, 0.2);
    box-shadow: 0 24px 64px rgba(0, 0, 0, 0.45);
    color: #e8eaef;
}

.rf-modal[dir="rtl"] {
    text-align: right;
}

.rf-modal-header {
    padding: 20px 22px 12px;
    position: relative;
}

.rf-modal-close {
    position: absolute;
    top: 16px;
    inset-inline-end: 16px;
    width: 32px;
    height: 32px;
    border: none;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.08);
    color: #aab2c8;
    cursor: pointer;
    font-size: 16px;
}

.rf-modal-close:hover {
    background: rgba(255, 255, 255, 0.14);
    color: #fff;
}

.rf-modal-lang {
    position: absolute;
    top: 16px;
    inset-inline-start: 16px;
    padding: 4px 10px;
    border-radius: 999px;
    border: 1px solid rgba(255, 213, 79, 0.35);
    background: rgba(255, 213, 79, 0.12);
    color: #ffd54f;
    font-size: 11px;
    font-weight: 700;
    cursor: pointer;
}

.rf-modal-lang:hover {
    background: rgba(255, 213, 79, 0.2);
}

.rf-modal-title {
    margin: 0 0 6px;
    font-size: 18px;
    font-weight: 700;
    color: #fff;
    display: flex;
    align-items: center;
    gap: 10px;
}

.rf-modal-title i {
    color: #ffd54f;
}

.rf-modal-sub {
    margin: 0;
    font-size: 13px;
    color: #9aa3bc;
    line-height: 1.45;
    padding-inline-end: 36px;
}

.rf-modal-body {
    padding: 8px 22px 22px;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.rf-field label {
    display: block;
    font-size: 12px;
    font-weight: 600;
    color: #c5cce0;
    margin-bottom: 6px;
}

.rf-required {
    color: #ff8a80;
}

.rf-type-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
}

.rf-type-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: 12px 8px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.04);
    color: #b8bfd4;
    font-size: 11px;
    font-weight: 600;
    cursor: pointer;
    transition: border-color 0.15s, background 0.15s, color 0.15s;
}

.rf-type-btn i {
    font-size: 18px;
}

.rf-type-btn.is-active {
    border-color: #ffd54f;
    background: rgba(255, 213, 79, 0.12);
    color: #ffd54f;
}

.rf-input,
.rf-textarea {
    width: 100%;
    padding: 10px 12px;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(0, 0, 0, 0.25);
    color: #fff;
    font-size: 14px;
    font-family: inherit;
}

.rf-input:focus,
.rf-textarea:focus {
    outline: none;
    border-color: rgba(255, 213, 79, 0.5);
    box-shadow: 0 0 0 3px rgba(255, 213, 79, 0.12);
}

.rf-textarea {
    min-height: 100px;
    resize: vertical;
}

.rf-upload {
    border: 2px dashed rgba(255, 255, 255, 0.18);
    border-radius: 12px;
    padding: 18px;
    text-align: center;
    cursor: pointer;
    color: #9aa3bc;
    font-size: 13px;
    transition: border-color 0.15s, background 0.15s;
}

.rf-upload:hover {
    border-color: rgba(255, 213, 79, 0.4);
    background: rgba(255, 213, 79, 0.05);
}

.rf-upload input {
    display: none;
}

.rf-upload-preview {
    margin-top: 10px;
    max-height: 120px;
    border-radius: 8px;
    display: none;
}

.rf-info-box {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    padding: 10px 12px;
    border-radius: 10px;
    background: rgba(66, 165, 245, 0.12);
    border: 1px solid rgba(66, 165, 245, 0.25);
    font-size: 11px;
    color: #90caf9;
    line-height: 1.45;
}

.rf-info-box i {
    margin-top: 2px;
    flex-shrink: 0;
}

.rf-submit {
    width: 100%;
    padding: 14px;
    border: none;
    border-radius: 12px;
    background: linear-gradient(145deg, #ffd54f 0%, #ffb300 100%);
    color: #1a1f36;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: transform 0.1s, box-shadow 0.15s;
}

.rf-submit:hover:not(:disabled) {
    box-shadow: 0 6px 20px rgba(255, 179, 0, 0.4);
}

.rf-submit:disabled {
    opacity: 0.65;
    cursor: not-allowed;
}

.rf-status {
    font-size: 12px;
    text-align: center;
    min-height: 18px;
}

.rf-status.is-error {
    color: #ff8a80;
}

.rf-status.is-success {
    color: #81c784;
}

html.mqc-active .rf-fab-wrap {
    bottom: 88px;
    left: 16px;
}

@media (max-width: 480px) {
    .rf-type-grid {
        grid-template-columns: 1fr;
    }

    .rf-type-btn {
        flex-direction: row;
        justify-content: flex-start;
        padding: 10px 14px;
    }

    .rf-fab-wrap {
        bottom: 20px;
        left: 16px;
    }

    html.mqc-active .rf-fab-wrap {
        bottom: 80px;
    }
}
