/* ═══════════════════════════════════════════════════════════════
   TSC Auth — Qadiyah compact card
   ═══════════════════════════════════════════════════════════════ */

.tsc-auth-modal {
    position: fixed;
    inset: 0;
    z-index: 100000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.tsc-auth-modal[hidden] {
    display: none !important;
}

.tsc-auth-overlay {
    position: absolute;
    inset: 0;
    background: rgba(6, 8, 18, 0.88);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.tsc-auth-box {
    position: relative;
    z-index: 1;
    width: min(440px, 100%);
    animation: tscAuthIn 0.28s cubic-bezier(0.22, 1, 0.36, 1);
}

@keyframes tscAuthIn {
    from { opacity: 0; transform: translateY(18px) scale(0.97); }
    to   { opacity: 1; transform: translateY(0) scale(1); }
}

/* ─── Card ─── */
.tsc-auth-card,
.tsc-auth-page-wrap .tsc-auth-card {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 0;
    padding: 28px 26px 22px;
    background: var(--card-bg, #0f0f23);
    border: 1px solid var(--border-color, #2a2a4a);
    border-radius: 20px;
    box-shadow:
        var(--shadow-lg, 0 25px 50px -12px rgba(0, 0, 0, 0.5)),
        0 0 0 1px rgba(255, 255, 255, 0.04) inset,
        var(--shadow-glow, 0 0 40px rgba(233, 69, 96, 0.18));
    direction: rtl;
}

.tsc-auth-page-outer {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: calc(100vh - 220px);
    padding: 2rem 1rem 3rem;
}

.tsc-auth-page-wrap {
    width: min(440px, 100%);
    margin: 0 auto;
}

/* ─── Brand ─── */
.tsc-auth-brand {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    margin-bottom: 22px;
}

.tsc-auth-brand-row {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 6px;
}

.tsc-auth-brand-icon {
    width: 46px;
    height: 46px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--gradient-accent, linear-gradient(135deg, #e94560 0%, #ff6b6b 100%));
    border-radius: 14px;
    color: #fff;
    box-shadow: 0 8px 24px rgba(233, 69, 96, 0.35);
}

.tsc-auth-brand-name {
    font-size: 1.55rem;
    font-weight: 800;
    background: linear-gradient(135deg, var(--accent-color, #e94560), var(--gold-color, #f4d160));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.tsc-auth-brand-tag {
    font-size: 0.78rem;
    color: var(--text-muted, #a0a0a0);
    letter-spacing: 0.02em;
}

/* ─── Close ─── */
.tsc-auth-close {
    position: absolute;
    top: 14px;
    left: 14px;
    z-index: 3;
    width: 34px;
    height: 34px;
    border: 1px solid var(--border-color, #2a2a4a);
    border-radius: 10px;
    background: rgba(26, 26, 46, 0.85);
    color: var(--text-muted, #a0a0a0);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.tsc-auth-close:hover {
    color: #fff;
    border-color: var(--accent-color, #e94560);
    background: rgba(233, 69, 96, 0.12);
}

/* ─── Google ─── */
.tsc-auth-google-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    padding: 12px 16px;
    border-radius: 12px;
    border: 1.5px solid rgba(255, 255, 255, 0.12);
    background: #fff;
    color: #1a1a2e;
    font-weight: 700;
    font-size: 0.9rem;
    text-decoration: none;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.2);
    transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s;
}

.tsc-auth-google-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.28);
    border-color: rgba(255, 255, 255, 0.25);
    color: #1a1a2e;
}

.tsc-auth-google-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

/* ─── Divider ─── */
.tsc-auth-divider {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 16px 0 14px;
    color: var(--text-muted, #a0a0a0);
    font-size: 0.72rem;
    font-weight: 600;
}

.tsc-auth-divider::before,
.tsc-auth-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--border-color, #2a2a4a);
}

/* ─── Iframe ─── */
.tsc-auth-iframe-wrap {
    position: relative;
    min-height: 280px;
    border-radius: 14px;
    overflow: hidden;
    background: #121225;
}

.tsc-auth-iframe-loader {
    position: absolute;
    inset: 0;
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    background: #121225;
    color: var(--text-muted, #a0a0a0);
    font-size: 0.8rem;
    transition: opacity 0.25s;
}

.tsc-auth-iframe-wrap.is-ready .tsc-auth-iframe-loader {
    opacity: 0;
    pointer-events: none;
}

.tsc-auth-spinner {
    width: 28px;
    height: 28px;
    border: 3px solid rgba(233, 69, 96, 0.15);
    border-top-color: var(--accent-color, #e94560);
    border-radius: 50%;
    animation: tscSpin 0.75s linear infinite;
}

@keyframes tscSpin {
    to { transform: rotate(360deg); }
}

.tsc-login-iframe {
    display: block;
    width: 100%;
    height: 360px;
    border: none;
    background: #121225;
}

.tsc-auth-foot {
    margin: 14px 0 0;
    text-align: center;
    font-size: 0.72rem;
}

.tsc-auth-foot a {
    color: var(--text-muted, #a0a0a0);
    text-decoration: none;
    transition: color 0.2s;
}

.tsc-auth-foot a:hover {
    color: var(--gold-color, #f4d160);
}

.tsc-auth-logged-in {
    text-align: center;
    padding: 3rem 2rem;
    color: var(--text-color, #eaeaea);
}

body.tsc-auth-open {
    overflow: hidden;
}

.tsc-auth-card .screen-reader-text {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Hide page chrome noise on dedicated login pages */
body.tsc-auth-page .entry-header,
body.tsc-auth-page .page-header {
    display: none;
}

body.tsc-auth-page .site-main {
    padding-top: 0;
}

@media (max-width: 480px) {
    .tsc-auth-modal {
        padding: 0;
        align-items: flex-end;
    }

    .tsc-auth-box {
        width: 100%;
    }

    .tsc-auth-card {
        border-radius: 20px 20px 0 0;
        padding: 24px 20px 20px;
    }

    .tsc-auth-page-outer {
        min-height: calc(100vh - 160px);
        padding: 1rem 0.75rem 2rem;
    }

    .tsc-login-iframe {
        height: 300px;
    }
}
