/* Shared Friends UI — scoped with qf- prefix to avoid clashing with any
   game stylesheet. Visual tone is neutral/dark; matches the platform
   theme.css palette without hard-coding any game's color tokens.        */

.qf-mount-host { display: flex; justify-content: center; padding: 0.4rem 0; }
.qf-mount-btn {
    display: inline-flex; align-items: center; gap: 0.4rem;
    padding: 0.55rem 1.1rem;
    font-size: 0.95rem; font-weight: 600;
    background: linear-gradient(135deg, #d4af37, #b8860b);
    color: #111; border: none; border-radius: 8px;
    cursor: pointer; transition: transform 0.1s ease, box-shadow 0.2s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
}
.qf-mount-btn:hover { transform: translateY(-1px); box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3); }
.qf-mount-btn:active { transform: translateY(0); }

/* ---------- modal overlay ---------- */
.qf-overlay {
    position: fixed; inset: 0;
    background: rgba(0, 0, 0, 0.65);
    display: none; align-items: center; justify-content: center;
    z-index: 10000;
    padding: 1rem;
}
.qf-overlay.qf-open { display: flex; }
.qf-modal {
    width: 100%; max-width: 460px; max-height: 86vh;
    display: flex; flex-direction: column;
    background: #1a1d2e;
    color: #e8e9f0;
    border-radius: 14px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    overflow: hidden;
    font-family: 'Tajawal', 'Amiri', system-ui, sans-serif;
}
.qf-header {
    display: flex; align-items: center; justify-content: space-between;
    padding: 0.8rem 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
.qf-title { margin: 0; font-size: 1.05rem; font-weight: 700; color: #f3f4ff; }
.qf-close {
    background: transparent; border: none; color: #c7c8d6;
    font-size: 1.5rem; line-height: 1; cursor: pointer; padding: 0.2rem 0.5rem;
}
.qf-close:hover { color: #fff; }

/* ---------- tabs ---------- */
.qf-tabs {
    display: flex; gap: 0.3rem; padding: 0.5rem 0.7rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}
.qf-tab {
    flex: 1;
    background: transparent;
    color: #b5b7c5;
    border: none;
    padding: 0.6rem 0.4rem;
    border-bottom: 2px solid transparent;
    cursor: pointer;
    font-size: 0.92rem;
    font-weight: 600;
    border-radius: 8px 8px 0 0;
    position: relative;
}
.qf-tab:hover { color: #e8e9f0; }
.qf-tab-active { color: #d4af37; border-bottom-color: #d4af37; }
.qf-tab-badge {
    display: inline-block; min-width: 18px; height: 18px; line-height: 18px;
    background: #e74c3c; color: #fff; border-radius: 9px;
    font-size: 0.7rem; padding: 0 5px; margin-inline-start: 0.3rem;
}

/* ---------- body ---------- */
.qf-body { padding: 0.8rem; overflow-y: auto; flex: 1; }
.qf-empty {
    text-align: center; color: #8a8c9c;
    padding: 2rem 1rem; font-size: 0.95rem;
}
.qf-section-label {
    font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.08em;
    color: #8a8c9c; margin: 0.6rem 0 0.4rem;
}

/* ---------- rows ---------- */
.qf-list { display: flex; flex-direction: column; gap: 0.5rem; }
.qf-row {
    display: flex; align-items: center; gap: 0.7rem;
    background: rgba(255, 255, 255, 0.04);
    border-radius: 10px;
    padding: 0.55rem 0.7rem;
}
.qf-avatar {
    width: 38px; height: 38px; border-radius: 50%;
    object-fit: cover; background: #2a2e44;
    display: inline-flex; align-items: center; justify-content: center;
    font-size: 1.1rem;
    flex-shrink: 0;
}
.qf-avatar-stub { color: #c7c8d6; }
.qf-row-main { flex: 1; min-width: 0; }
.qf-row-name {
    font-size: 0.95rem; font-weight: 600; color: #f0f1fa;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
    display: flex; align-items: center; gap: 0.4rem;
}
.qf-dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; }
.qf-dot-online { background: #2ecc71; box-shadow: 0 0 6px #2ecc71; }
.qf-row-actions { display: flex; gap: 0.35rem; flex-shrink: 0; }

/* ---------- buttons ---------- */
.qf-btn {
    padding: 0.4rem 0.85rem;
    border-radius: 7px; border: none;
    font-size: 0.85rem; font-weight: 600;
    cursor: pointer; transition: opacity 0.15s ease, transform 0.1s ease;
}
.qf-btn:disabled { opacity: 0.55; cursor: not-allowed; }
.qf-btn-primary { background: #d4af37; color: #111; }
.qf-btn-primary:hover:not(:disabled) { background: #e2bf48; }
.qf-btn-secondary { background: #3a3e58; color: #e8e9f0; }
.qf-btn-secondary:hover:not(:disabled) { background: #4a4f70; }
.qf-btn-ghost {
    background: transparent; color: #b5b7c5;
    border: 1px solid rgba(255, 255, 255, 0.15);
}
.qf-btn-ghost:hover:not(:disabled) { background: rgba(255, 255, 255, 0.06); color: #fff; }

/* ---------- add tab ---------- */
.qf-add-form { display: flex; gap: 0.4rem; margin-bottom: 0.8rem; }
.qf-input {
    flex: 1;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 8px;
    color: #f0f1fa;
    padding: 0.55rem 0.7rem;
    font-size: 0.95rem;
    outline: none;
}
.qf-input:focus { border-color: #d4af37; }
.qf-add-result { display: flex; flex-direction: column; gap: 0.5rem; }
.qf-error { color: #ff7a7a; font-size: 0.85rem; padding: 0.3rem 0.2rem; }

/* ---------- in-app banner ---------- */
#qadha-friend-banner {
    position: fixed;
    top: 12px;
    inset-inline-end: 12px;
    display: flex; flex-direction: column; gap: 0.5rem;
    z-index: 11000;
    max-width: 92vw;
    pointer-events: none;
}
.qf-banner {
    pointer-events: auto;
    background: #1a1d2e;
    color: #e8e9f0;
    border-radius: 12px;
    padding: 0.7rem 0.85rem;
    width: 320px; max-width: 92vw;
    box-shadow: 0 12px 36px rgba(0, 0, 0, 0.45);
    border: 1px solid rgba(212, 175, 55, 0.35);
    animation: qf-slide-in 0.25s ease-out;
}
@keyframes qf-slide-in {
    from { opacity: 0; transform: translateY(-8px); }
    to   { opacity: 1; transform: translateY(0); }
}
.qf-banner-row { display: flex; gap: 0.6rem; align-items: center; }
.qf-banner-avatar {
    width: 42px; height: 42px; border-radius: 50%;
    object-fit: cover; background: #2a2e44;
    display: inline-flex; align-items: center; justify-content: center;
    flex-shrink: 0;
}
.qf-banner-text { display: flex; flex-direction: column; gap: 0.05rem; font-size: 0.88rem; }
.qf-banner-text strong { color: #d4af37; }
.qf-banner-text em { font-style: normal; color: #c7c8d6; font-size: 0.8rem; }
.qf-banner-actions {
    display: flex; gap: 0.4rem; justify-content: flex-end;
    margin-top: 0.55rem;
}
.qf-banner-actions .qf-btn { padding: 0.35rem 0.75rem; }
.qf-banner-actions .qf-btn-primary {
    text-decoration: none; display: inline-flex; align-items: center;
}

/* ---------- RTL/LTR tweaks ---------- */
[dir="rtl"] .qf-banner-text { text-align: right; }
[dir="ltr"] .qf-banner-text { text-align: left; }
