/* ============================================================
   Whery — Auth Modal Styles
   ============================================================ */

/* ── Overlay ───────────────────────────────────────────────── */
#auth-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(10, 15, 30, 0.75);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    z-index: 11000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease;
}

#auth-modal-overlay.visible {
    opacity: 1;
    pointer-events: all;
}

/* ── Modal card ────────────────────────────────────────────── */
.auth-modal {
    background: var(--bg-card, #16213e);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 18px;
    width: 100%;
    max-width: 420px;
    padding: 2rem 2.25rem 2.25rem;
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.5);
    position: relative;
    animation: authSlideUp 0.28s cubic-bezier(0.33, 1, 0.68, 1) both;
}

@keyframes authSlideUp {
    from {
        transform: translateY(24px);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* ── Close button ──────────────────────────────────────────── */
.auth-close-btn {
    position: absolute;
    top: 1rem;
    right: 1.1rem;
    background: none;
    border: none;
    color: var(--text-secondary, #94a3b8);
    font-size: 1.4rem;
    cursor: pointer;
    line-height: 1;
    transition: color 0.2s;
}

.auth-close-btn:hover {
    color: var(--text-primary, #e2e8f0);
}

/* ── Logo / title ──────────────────────────────────────────── */
.auth-header {
    text-align: center;
    margin-bottom: 1.5rem;
}

.auth-header h3 {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--text-primary, #e2e8f0);
    margin: 0 0 0.2rem;
}

.auth-header p {
    font-size: 0.85rem;
    color: var(--text-secondary, #94a3b8);
    margin: 0;
}

/* ── Tabs ──────────────────────────────────────────────────── */
.auth-tabs {
    display: flex;
    gap: 0.5rem;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    padding: 4px;
    margin-bottom: 1.5rem;
}

.auth-tab-btn {
    flex: 1;
    background: none;
    border: none;
    padding: 0.5rem 0.75rem;
    border-radius: 7px;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-secondary, #94a3b8);
    cursor: pointer;
    transition: all 0.2s;
    font-family: inherit;
}

.auth-tab-btn.active {
    background: var(--accent, #0052cc);
    color: #fff;
    font-weight: 600;
}

/* ── Panels ────────────────────────────────────────────────── */
.auth-panel {
    display: none;
}

.auth-panel.active {
    display: block;
}

/* ── Form elements ─────────────────────────────────────────── */
.auth-field {
    margin-bottom: 1rem;
}

.auth-field label {
    display: block;
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--text-secondary, #94a3b8);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-bottom: 0.35rem;
}

.auth-field input {
    width: 100%;
    padding: 0.65rem 0.9rem;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    background: rgba(255, 255, 255, 0.15);
    color: var(--text-primary, #e2e8f0);
    font-size: 0.95rem;
    font-family: inherit;
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
    box-sizing: border-box;
}

.auth-field input:focus {
    border-color: var(--accent, #0052cc);
    box-shadow: 0 0 0 3px rgba(0, 82, 204, 0.2);
}

.auth-field input::placeholder {
    color: rgba(255, 255, 255, 0.25);
}

/* ── Primary button ────────────────────────────────────────── */
.auth-submit-btn {
    width: 100%;
    padding: 0.75rem 1rem;
    background: var(--accent, #0052cc);
    color: #fff;
    border: none;
    border-radius: 9px;
    font-size: 1rem;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    margin-top: 0.5rem;
    transition: background 0.2s, transform 0.15s;
}

.auth-submit-btn:hover {
    background: #003fa3;
}

.auth-submit-btn:active {
    transform: scale(0.98);
}

.auth-submit-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* ── Secondary / text links ────────────────────────────────── */
.auth-link-btn {
    background: none;
    border: none;
    color: var(--accent, #0052cc);
    font-size: 0.82rem;
    cursor: pointer;
    padding: 0;
    font-family: inherit;
    text-decoration: underline;
}

.auth-link-btn:hover {
    opacity: 0.8;
}

.auth-footer-line {
    text-align: center;
    margin-top: 1rem;
    font-size: 0.82rem;
    color: var(--text-secondary, #94a3b8);
}

/* ── Error / success messages ──────────────────────────────── */
.auth-error {
    display: none;
    background: rgba(239, 68, 68, 0.12);
    border: 1px solid rgba(239, 68, 68, 0.35);
    border-radius: 7px;
    padding: 0.55rem 0.8rem;
    font-size: 0.85rem;
    color: #fca5a5;
    margin-top: 0.75rem;
}

.auth-success {
    display: none;
    background: rgba(16, 185, 129, 0.12);
    border: 1px solid rgba(16, 185, 129, 0.35);
    border-radius: 7px;
    padding: 0.55rem 0.8rem;
    font-size: 0.85rem;
    color: #6ee7b7;
    margin-top: 0.75rem;
}

/* ── Account panel ─────────────────────────────────────────── */
.auth-user-info {
    text-align: center;
    margin-bottom: 1.5rem;
}

.auth-user-avatar {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--accent, #0052cc), #7c3aed);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    font-weight: 700;
    color: #fff;
    margin: 0 auto 0.75rem;
}

.auth-user-name {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--text-primary, #e2e8f0);
    margin: 0 0 0.2rem;
}

.auth-user-email {
    font-size: 0.85rem;
    color: var(--text-secondary, #94a3b8);
}

.auth-logout-btn {
    width: 100%;
    padding: 0.7rem;
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.3);
    color: #fca5a5;
    border-radius: 9px;
    font-size: 0.95rem;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: background 0.2s;
    margin-top: 0.5rem;
}

.auth-logout-btn:hover {
    background: rgba(239, 68, 68, 0.2);
}

/* ── Account header button ─────────────────────────────────── */
#auth-account-btn {
    position: fixed;
    top: 1rem;
    right: 1.25rem;
    z-index: 1000;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 50px;
    padding: 0.45rem 1rem;
    color: var(--text-primary, #e2e8f0);
    font-size: 0.85rem;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.4rem;
    transition: background 0.2s, border-color 0.2s;
    white-space: nowrap;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

#auth-account-btn:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.25);
}

.auth-avatar {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: var(--accent, #0052cc);
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: 700;
}

/* ── Divider ───────────────────────────────────────────────── */
.auth-divider {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin: 1rem 0;
    color: var(--text-secondary, #94a3b8);
    font-size: 0.75rem;
}

.auth-divider::before,
.auth-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: rgba(255, 255, 255, 0.1);
}