/* ==========================================================================
   Talayar Gallery - 2027 Luxury Authentication Portal Styling
   SMS OTP, Discrete 5-digit inputs, Google OAuth, Liquid Glass & Security
   ========================================================================== */

.talayar-auth-body {
    min-height: 100vh;
    min-height: 100dvh;
    background-color: var(--talayar-bg-base, #0E0F11);
    color: var(--talayar-text-primary, #F7F8F9);
    font-family: var(--talayar-font-fa);
    display: flex;
    flex-direction: column;
    position: relative;
    overflow-x: hidden;
    direction: rtl;
    text-align: right;
    transition: background-color var(--talayar-transition-smooth);
}

/* Atmospheric Ambient Background Glow */
.talayar-auth-bg-glow {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(201, 162, 75, 0.14) 0%, rgba(15, 157, 110, 0.05) 45%, transparent 70%);
    border-radius: 50%;
    filter: blur(80px);
    pointer-events: none;
    z-index: 0;
}

/* --------------------------------------------------------------------------
   Top Bar Navigation & Theme Switcher
   -------------------------------------------------------------------------- */
.talayar-auth-topbar {
    position: relative;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 24px 32px;
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
}

.talayar-theme-toggle-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--talayar-text-primary);
    transition: all var(--talayar-transition-fast);
}

html[data-theme="light"] .talayar-theme-toggle-btn {
    background: rgba(0, 0, 0, 0.04);
    border-color: rgba(154, 116, 36, 0.2);
    color: #18191B;
}

.talayar-theme-toggle-btn:hover {
    border-color: var(--talayar-gold);
    color: var(--talayar-gold);
    box-shadow: var(--talayar-glow-gold);
    transform: rotate(15deg);
}

.talayar-theme-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
}

.talayar-theme-icon svg {
    width: 18px;
    height: 18px;
}

.talayar-icon-sun { display: none; }
.talayar-icon-moon { display: flex; }

html[data-theme="light"] .talayar-icon-sun { display: flex; }
html[data-theme="light"] .talayar-icon-moon { display: none; }

.talayar-auth-return-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--talayar-text-secondary);
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    padding: 8px 16px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    transition: all var(--talayar-transition-fast);
}

.talayar-auth-return-link:hover {
    color: var(--talayar-gold);
    border-color: rgba(201, 162, 75, 0.3);
    background: rgba(201, 162, 75, 0.06);
    transform: translateX(4px);
}

.talayar-return-arrow {
    font-size: 16px;
    transition: transform var(--talayar-transition-fast);
}

/* --------------------------------------------------------------------------
   Central Luxury Auth Card
   -------------------------------------------------------------------------- */
.talayar-auth-main {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px 20px 60px 20px;
    position: relative;
    z-index: 5;
}

.talayar-auth-card {
    width: 100%;
    max-width: 470px;
    padding: 42px 36px;
    border-radius: 28px;
    position: relative;
}

@media (max-width: 480px) {
    .talayar-auth-card {
        padding: 32px 22px;
        border-radius: 22px;
    }
}

/* Brand Header in Card */
.talayar-auth-header {
    text-align: center;
    margin-bottom: 28px;
}

.talayar-auth-monogram {
    width: 64px;
    height: 64px;
    margin: 0 auto 16px auto;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--talayar-gold);
}

.talayar-auth-logo-img {
    max-width: 64px;
    max-height: 64px;
    object-fit: contain;
}

.talayar-auth-notre-fallback {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    border: 2px solid #FF6A00;
    box-shadow: 0 0 20px rgba(255, 106, 0, 0.45);
}

.talayar-auth-title {
    font-size: 22px;
    font-weight: 800;
    margin: 0 0 6px 0;
    color: var(--talayar-text-primary);
}

.talayar-auth-subtitle {
    font-size: 13.5px;
    color: var(--talayar-gold);
    margin: 0;
    font-weight: 600;
}

/* --------------------------------------------------------------------------
   Tabs (SMS OTP vs Password)
   -------------------------------------------------------------------------- */
.talayar-auth-tabs {
    display: flex;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 999px;
    padding: 4px;
    margin-bottom: 26px;
    gap: 4px;
}

html[data-theme="light"] .talayar-auth-tabs {
    background: rgba(0, 0, 0, 0.04);
    border-color: rgba(154, 116, 36, 0.15);
}

.talayar-tab-btn {
    flex: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 14px;
    font-size: 13px;
    font-weight: 600;
    color: var(--talayar-text-secondary);
    background: transparent;
    border: none;
    border-radius: 999px;
    cursor: pointer;
    transition: all var(--talayar-transition-fast);
}

.talayar-tab-btn.active {
    background: var(--talayar-gold-gradient);
    color: #0E0F11;
    font-weight: 700;
    box-shadow: 0 3px 12px rgba(201, 162, 75, 0.35);
}

.talayar-tab-panel {
    display: none;
}

.talayar-tab-panel.active {
    display: block;
    animation: talayarFadeIn 0.3s ease;
}

@keyframes talayarFadeIn {
    from { opacity: 0; transform: translateY(6px); }
    to { opacity: 1; transform: translateY(0); }
}

/* --------------------------------------------------------------------------
   Form Fields & Controls
   -------------------------------------------------------------------------- */
.talayar-auth-form {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.talayar-input-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.talayar-input-label {
    font-size: 13.5px;
    font-weight: 600;
    color: var(--talayar-text-secondary);
}

.talayar-label-with-action {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.talayar-input-wrap {
    position: relative;
    display: flex;
    align-items: center;
}

.talayar-input-prefix {
    position: absolute;
    left: 14px;
    font-size: 13px;
    font-weight: 600;
    color: var(--talayar-text-muted);
    pointer-events: none;
    user-select: none;
}

.talayar-input-field {
    width: 100%;
    height: 48px;
    padding: 0 16px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--talayar-text-primary);
    font-size: 15px;
    font-family: inherit;
    outline: none;
    transition: all var(--talayar-transition-fast);
}

.talayar-input-wrap .talayar-input-field[dir="ltr"] {
    padding-left: 78px;
}

html[data-theme="light"] .talayar-input-field {
    background: rgba(255, 255, 255, 0.85);
    border-color: rgba(154, 116, 36, 0.2);
    color: #18191B;
}

.talayar-input-field:focus {
    border-color: var(--talayar-gold);
    box-shadow: 0 0 16px rgba(201, 162, 75, 0.25);
    background: rgba(255, 255, 255, 0.07);
}

html[data-theme="light"] .talayar-input-field:focus {
    background: #FFFFFF;
}

.talayar-input-suffix-btn {
    position: absolute;
    left: 12px;
    background: transparent;
    border: none;
    color: var(--talayar-text-muted);
    cursor: pointer;
    font-size: 16px;
    padding: 6px;
}

.talayar-input-hint {
    font-size: 12px;
    color: var(--talayar-text-muted);
}

.talayar-checkbox-row {
    display: flex;
    align-items: center;
}

.talayar-checkbox-label {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: var(--talayar-text-muted);
    cursor: pointer;
    user-select: none;
}

.talayar-checkbox-label input {
    accent-color: var(--talayar-gold);
    width: 16px;
    height: 16px;
}

.talayar-text-btn {
    background: transparent;
    border: none;
    color: var(--talayar-gold);
    font-size: 12.5px;
    font-weight: 600;
    cursor: pointer;
    padding: 0;
    transition: opacity var(--talayar-transition-fast);
}

.talayar-text-btn:hover {
    text-decoration: underline;
    opacity: 0.85;
}

.talayar-auth-submit-btn {
    width: 100%;
    height: 48px;
    font-size: 15px;
    margin-top: 6px;
}

/* --------------------------------------------------------------------------
   Discrete 5-Digit OTP Boxes
   -------------------------------------------------------------------------- */
.talayar-otp-prompt-wrap {
    text-align: center;
    margin-bottom: 8px;
}

.talayar-otp-sent-to {
    font-size: 14px;
    color: var(--talayar-text-secondary);
    margin: 0 0 4px 0;
}

.talayar-otp-boxes-group {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin: 14px 0;
}

.talayar-otp-digit {
    width: 52px;
    height: 58px;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: var(--talayar-gold);
    font-family: inherit;
    font-size: 24px;
    font-weight: 800;
    text-align: center;
    outline: none;
    transition: all var(--talayar-transition-fast);
}

html[data-theme="light"] .talayar-otp-digit {
    background: rgba(255, 255, 255, 0.9);
    border-color: rgba(154, 116, 36, 0.25);
    color: var(--talayar-gold-dark);
}

.talayar-otp-digit:focus {
    border-color: var(--talayar-gold);
    box-shadow: 0 0 20px rgba(201, 162, 75, 0.35);
    transform: translateY(-2px) scale(1.05);
    background: rgba(201, 162, 75, 0.08);
}

.talayar-otp-boxes-group.shake {
    animation: talayarShake 0.4s ease-in-out;
}

@keyframes talayarShake {
    0%, 100% { transform: translateX(0); }
    20%, 60% { transform: translateX(-8px); }
    40%, 80% { transform: translateX(8px); }
}

.talayar-otp-timer-wrap {
    text-align: center;
    font-size: 13px;
    color: var(--talayar-text-muted);
}

/* --------------------------------------------------------------------------
   Divider & Google One-Click Button
   -------------------------------------------------------------------------- */
.talayar-auth-divider {
    position: relative;
    text-align: center;
    margin: 26px 0 20px 0;
}

.talayar-auth-divider::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 1px;
    background: rgba(255, 255, 255, 0.08);
}

html[data-theme="light"] .talayar-auth-divider::before {
    background: rgba(0, 0, 0, 0.08);
}

.talayar-auth-divider span {
    position: relative;
    background: var(--talayar-bg-surface, #16181B);
    padding: 0 14px;
    font-size: 12px;
    color: var(--talayar-text-muted);
}

html[data-theme="light"] .talayar-auth-divider span {
    background: #FFFFFF;
}

.talayar-btn-google {
    width: 100%;
    height: 48px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: var(--talayar-text-primary);
    font-size: 13.5px;
    font-weight: 600;
}

html[data-theme="light"] .talayar-btn-google {
    background: #FFFFFF;
    border-color: rgba(0, 0, 0, 0.12);
    color: #1F2227;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.talayar-btn-google:hover {
    border-color: var(--talayar-gold);
    background: rgba(201, 162, 75, 0.06);
    color: var(--talayar-gold);
}

/* --------------------------------------------------------------------------
   Security Badges & Alerts
   -------------------------------------------------------------------------- */
.talayar-auth-security-badge {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 24px;
    font-size: 11.5px;
    color: var(--talayar-text-muted);
    text-align: center;
}

.talayar-auth-alert {
    padding: 12px 16px;
    border-radius: 12px;
    font-size: 13px;
    margin-bottom: 20px;
    line-height: 1.6;
    animation: talayarFadeIn 0.3s ease;
}

.talayar-auth-alert.error {
    background: rgba(239, 68, 68, 0.12);
    border: 1px solid rgba(239, 68, 68, 0.35);
    color: #F87171;
}

.talayar-auth-alert.success {
    background: rgba(16, 185, 129, 0.12);
    border: 1px solid rgba(16, 185, 129, 0.35);
    color: #34D399;
}

/* Visually Hidden Helper for Honeypot */
.talayar-visually-hidden {
    position: absolute !important;
    left: -9999px !important;
    width: 1px !important;
    height: 1px !important;
    opacity: 0 !important;
}

/* --------------------------------------------------------------------------
   Forgot Password Modal
   -------------------------------------------------------------------------- */
.talayar-modal-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(10px);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.talayar-modal-dialog {
    width: 100%;
    max-width: 420px;
    padding: 30px 28px;
    border-radius: 24px;
}

.talayar-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
}

.talayar-modal-header h3 {
    margin: 0;
    font-size: 18px;
    color: var(--talayar-gold);
}

.talayar-modal-close-btn {
    background: transparent;
    border: none;
    color: var(--talayar-text-muted);
    font-size: 24px;
    cursor: pointer;
}

.talayar-modal-desc {
    font-size: 13.5px;
    color: var(--talayar-text-secondary);
    line-height: 1.7;
    margin-bottom: 20px;
}
