/* ============================================
   AUTH PAGE - Two-column Layout
   ============================================ */

/* Reset body for auth page */
body.auth-page {
    background: none;
    min-height: 100vh;
}

.auth-wrapper {
    display: flex;
    min-height: 100vh;
}

/* ============================================
   Left Side - Cosmic Background
   ============================================ */
.auth-left {
    flex: 0 0 45%;
    background: linear-gradient(180deg,
        var(--bg-gradient-start) 0%,
        var(--bg-gradient-mid) 50%,
        var(--bg-gradient-end) 100%
    );
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

/* Background image overlay (optional - add splash_bg.png to static/images/) */
.auth-left::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    /* background-image: url('../images/splash_bg.png'); */
    /* background-size: cover; */
    /* background-position: center; */
    /* opacity: 0.6; */
    /* Decorative stars pattern */
    background-image: radial-gradient(2px 2px at 20% 30%, rgba(255,255,255,0.3), transparent),
                      radial-gradient(2px 2px at 40% 70%, rgba(255,255,255,0.2), transparent),
                      radial-gradient(1px 1px at 60% 20%, rgba(255,255,255,0.4), transparent),
                      radial-gradient(2px 2px at 80% 60%, rgba(255,255,255,0.25), transparent),
                      radial-gradient(1px 1px at 10% 80%, rgba(255,255,255,0.35), transparent),
                      radial-gradient(2px 2px at 90% 40%, rgba(255,255,255,0.2), transparent),
                      radial-gradient(1px 1px at 50% 50%, rgba(255,255,255,0.3), transparent),
                      radial-gradient(1px 1px at 30% 10%, rgba(255,255,255,0.25), transparent),
                      radial-gradient(2px 2px at 70% 90%, rgba(255,255,255,0.15), transparent);
    background-size: 100% 100%;
}

/* Decorative gradient overlay */
.auth-left::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(
        135deg,
        rgba(139, 92, 246, 0.3) 0%,
        transparent 50%,
        rgba(196, 91, 140, 0.3) 100%
    );
}

.auth-left-content {
    position: relative;
    z-index: 1;
    padding: var(--spacing-2xl);
    text-align: center;
    color: white;
}

.auth-left-content h2 {
    font-size: 32px;
    font-weight: 600;
    margin-bottom: var(--spacing-md);
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.auth-left-content p {
    font-size: 18px;
    opacity: 0.9;
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.2);
}

/* ============================================
   Right Side - Form
   ============================================ */
.auth-right {
    flex: 1;
    background: #FFFFFF;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--spacing-xl);
}

.auth-form-container {
    width: 100%;
    max-width: 400px;
}

.auth-title {
    color: #1a1a1a;
    font-size: 28px;
    font-weight: 600;
    margin-bottom: var(--spacing-xl);
    text-align: left;
}

.auth-description {
    color: #666;
    font-size: 14px;
    margin-bottom: var(--spacing-lg);
    line-height: 1.6;
}

/* ============================================
   Form Steps
   ============================================ */
.auth-step {
    display: none;
}

.auth-step.active {
    display: block;
    animation: fadeIn 0.3s ease;
}

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

/* ============================================
   Form Elements (Light theme for auth)
   ============================================ */
.form-group {
    margin-bottom: var(--spacing-lg);
}

.auth-right label {
    color: #666;
    font-size: 14px;
    font-weight: 500;
    margin-bottom: var(--spacing-sm);
    display: block;
}

.auth-right input[type="tel"],
.auth-right input[type="text"] {
    background: #f5f5f5;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 14px 16px;
    color: #1a1a1a;
    font-size: 16px;
    width: 100%;
    transition: all 0.3s ease;
}

.auth-right input:focus {
    outline: none;
    border-color: var(--primary);
    background: #fff;
    box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.1);
}

.auth-right input::placeholder {
    color: #999;
}

/* ============================================
   intl-tel-input Overrides
   ============================================ */
.auth-right .iti {
    width: 100%;
}

.auth-right .iti__flag-container {
    border-radius: 8px 0 0 8px;
}

.auth-right .iti__selected-flag {
    background: #f5f5f5;
    border-right: 1px solid #e0e0e0;
    padding: 0 12px;
    border-radius: 8px 0 0 8px;
    z-index: 1;
    position: relative;
}

.auth-right .iti__selected-flag:hover,
.auth-right .iti__selected-flag:focus {
    background: #eee;
}

.auth-right .iti--separate-dial-code .iti__selected-flag {
    background: #f5f5f5;
}

/* Dial code text color - dark for contrast */
.auth-right .iti__selected-dial-code {
    color: #1a1a1a;
}

.auth-right .iti__country-list {
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    border: 1px solid #e0e0e0;
    background: #fff;
}

/* Country list text colors */
.auth-right .iti__country-name,
.auth-right .iti__dial-code {
    color: #1a1a1a;
}

.auth-right .iti__country.iti__highlight {
    background: rgba(139, 92, 246, 0.1);
}

/* Arrow color */
.auth-right .iti__arrow {
    border-top-color: #666;
}

.auth-right .iti__arrow--up {
    border-bottom-color: #666;
}

/* ============================================
   Buttons
   ============================================ */
.auth-right .btn-primary {
    background: var(--primary);
    color: white;
    border: none;
    padding: 14px 24px;
    border-radius: 8px;
    font-weight: 500;
    font-size: 16px;
    width: 100%;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: var(--spacing-sm);
}

.auth-right .btn-primary:hover {
    background: var(--primary-hover);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(139, 92, 246, 0.3);
}

.auth-right .btn-primary:active {
    transform: translateY(0);
}

.auth-right .btn-primary:disabled {
    background: #ccc;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* Method selection buttons */
.method-buttons {
    display: flex;
    gap: var(--spacing-md);
    margin-bottom: var(--spacing-lg);
}

.btn-method {
    flex: 1;
    background: #f5f5f5;
    color: #1a1a1a;
    border: 1px solid #e0e0e0;
    padding: 14px 20px;
    border-radius: 8px;
    font-weight: 500;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-method:hover {
    background: #e8e8e8;
    border-color: #ccc;
}

.btn-method.selected {
    background: rgba(139, 92, 246, 0.1);
    border-color: var(--primary);
    color: var(--primary);
}

/* ============================================
   Method Info Blocks
   ============================================ */
.method-info {
    background: #f9f9f9;
    border-left: 3px solid var(--primary);
    padding: var(--spacing-md);
    border-radius: 0 8px 8px 0;
    margin-top: var(--spacing-md);
    font-size: 14px;
    color: #666;
    line-height: 1.6;
}

.method-info a {
    color: var(--primary);
    font-weight: 500;
}

.method-info a:hover {
    text-decoration: underline;
}

/* ============================================
   OTP Timer and Attempts
   ============================================ */
.otp-timer {
    text-align: center;
    font-size: 14px;
    font-weight: 500;
    margin: var(--spacing-md) 0;
    color: #666;
    padding: var(--spacing-sm) var(--spacing-md);
    background: #f5f5f5;
    border-radius: 8px;
}

.otp-timer.warning {
    color: #ef4444;
    background: #fef2f2;
}

.attempts-info {
    text-align: center;
    font-size: 13px;
    margin: var(--spacing-sm) 0;
    color: #666;
    font-weight: 500;
}

.attempts-info.warning {
    color: #ef4444;
}

/* ============================================
   Error and Success Messages
   ============================================ */
.error-message {
    background: #fef2f2;
    border: 1px solid #fecaca;
    border-radius: 8px;
    padding: var(--spacing-md);
    margin: var(--spacing-md) 0;
    color: #dc2626;
    font-size: 14px;
    text-align: center;
}

.success-message {
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    border-radius: 8px;
    padding: var(--spacing-md);
    margin: var(--spacing-md) 0;
    color: #16a34a;
    font-size: 14px;
    text-align: center;
}

/* ============================================
   Resend Button
   ============================================ */
.btn-resend {
    background: transparent;
    color: var(--primary);
    border: 1px solid var(--primary);
    padding: 12px 24px;
    border-radius: 8px;
    font-weight: 500;
    font-size: 14px;
    width: 100%;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: var(--spacing-md);
}

.btn-resend:hover {
    background: rgba(139, 92, 246, 0.1);
}

/* ============================================
   Back Link
   ============================================ */
.back-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: #666;
    font-size: 14px;
    margin-bottom: var(--spacing-lg);
    cursor: pointer;
    transition: color 0.3s ease;
}

.back-link:hover {
    color: var(--primary);
}

/* ============================================
   Footer
   ============================================ */
.auth-footer {
    margin-top: var(--spacing-2xl);
    padding-top: var(--spacing-xl);
    border-top: 1px solid #e0e0e0;
    text-align: center;
}

.auth-footer p {
    color: #666;
    font-size: 14px;
    margin-bottom: var(--spacing-md);
}

.app-links {
    display: flex;
    gap: var(--spacing-md);
    justify-content: center;
}

.app-link {
    display: inline-block;
    padding: 10px 20px;
    background: #1a1a1a;
    color: white;
    border-radius: 8px;
    font-size: 12px;
    transition: all 0.3s ease;
}

.app-link:hover {
    background: #333;
    color: white;
    transform: translateY(-1px);
}

/* ============================================
   Responsive Design
   ============================================ */
@media (max-width: 968px) {
    .auth-wrapper {
        flex-direction: column;
    }

    .auth-left {
        flex: 0 0 auto;
        min-height: 200px;
    }

    .auth-left-content h2 {
        font-size: 24px;
    }

    .auth-left-content p {
        font-size: 16px;
    }

    .auth-right {
        padding: var(--spacing-lg);
    }

    .auth-form-container {
        max-width: 100%;
    }
}

@media (max-width: 480px) {
    .auth-left {
        min-height: 150px;
    }

    .auth-title {
        font-size: 24px;
    }

    .method-buttons {
        flex-direction: column;
    }

    .auth-right {
        padding: var(--spacing-md);
    }
}
