/* Additional Authentication Popup Styles */
.popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(5px);
    z-index: 9999;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
    animation: fadeIn 0.3s ease;
}

.popup-overlay.active {
    display: flex;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.popup-auth {
    background: white;
    border-radius: 20px;
    max-width: 500px;
    width: 100%;
    max-height: 90vh;
    overflow: hidden;
    position: relative;
    animation: slideUp 0.3s ease;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.3);
}

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

/* Forgot Password Header */
.popup-header-forgot {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    color: white;
    padding: 30px;
    position: relative;
    text-align: center;
}

/* OTP Login Header */
.popup-header-otp {
    background: linear-gradient(135deg, #8b5cf6 0%, #7c3aed 100%);
    color: white;
    padding: 30px;
    position: relative;
    text-align: center;
}

/* Email Login Header */
.popup-header-email {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    color: white;
    padding: 30px;
    position: relative;
    text-align: center;
}

.popup-header h2 {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 10px;
}

.popup-header p {
    font-size: 1.1rem;
    opacity: 0.9;
    margin-bottom: 0;
}

.close-popup {
    position: absolute;
    top: 20px;
    right: 20px;
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    transition: all 0.3s ease;
}

.close-popup:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: rotate(90deg);
}

.popup-body {
    padding: 40px;
    max-height: calc(90vh - 200px);
    overflow-y: auto;
}

.popup-form-group {
    margin-bottom: 25px;
}

.popup-form-label {
    display: block;
    margin-bottom: 10px;
    font-weight: 600;
    color: #374151;
    font-size: 0.95rem;
}

.required {
    color: #ef4444;
}

.popup-form-control {
    width: 100%;
    padding: 14px 16px;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    font-size: 1rem;
    transition: all 0.3s ease;
    background: #f9fafb;
}

.popup-form-control:focus {
    outline: none;
    border-color: #3b82f6;
    background: white;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.popup-input-group {
    position: relative;
}

.popup-input-group i {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: #6b7280;
    font-size: 1.1rem;
    z-index: 2;
}

.popup-input-group .popup-form-control {
    padding-left: 45px;
}

/* OTP Input Group */
.otp-input-group {
    display: flex;
    gap: 10px;
    justify-content: center;
    margin: 30px 0;
}

.otp-input {
    width: 50px;
    height: 50px;
    border: 2px solid #e5e7eb;
    border-radius: 10px;
    text-align: center;
    font-size: 1.5rem;
    font-weight: 600;
    transition: all 0.3s ease;
}

.otp-input:focus {
    outline: none;
    border-color: #8b5cf6;
    box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.1);
}

.otp-input.filled {
    border-color: #8b5cf6;
    background: #f3f4f6;
}

/* Timer Styles */
.otp-timer {
    text-align: center;
    margin: 20px 0;
    font-size: 0.9rem;
    color: #6b7280;
}

.otp-timer .timer {
    font-weight: 600;
    color: #8b5cf6;
    font-size: 1.1rem;
}

.resend-btn {
    background: none;
    border: 2px solid #8b5cf6;
    color: #8b5cf6;
    padding: 8px 16px;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.resend-btn:hover:not(:disabled) {
    background: #8b5cf6;
    color: white;
}

.resend-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.popup-btn {
    padding: 14px 24px;
    border: none;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
}

.popup-btn-forgot {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    color: white;
    font-size: 1.1rem;
}

.popup-btn-otp {
    background: linear-gradient(135deg, #8b5cf6 0%, #7c3aed 100%);
    color: white;
    font-size: 1.1rem;
}

.popup-btn-email {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    color: white;
    font-size: 1.1rem;
}

.popup-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
}

.popup-btn.loading {
    color: transparent;
    position: relative;
}

.popup-btn.loading::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    top: 50%;
    left: 50%;
    margin-left: -10px;
    margin-top: -10px;
    border: 2px solid #ffffff;
    border-radius: 50%;
    border-top-color: transparent;
    animation: spinner 0.8s linear infinite;
}

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

.popup-message {
    padding: 12px 16px;
    border-radius: 8px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.popup-success {
    background: #d1fae5;
    color: #065f46;
    border: 1px solid #a7f3d0;
}

.popup-error {
    background: #fee2e2;
    color: #991b1b;
    border: 1px solid #fecaca;
}

.popup-warning {
    background: #fef3c7;
    color: #92400e;
    border: 1px solid #fde68a;
}

.popup-info {
    background: #dbeafe;
    color: #1e40af;
    border: 1px solid #bfdbfe;
}

/* Steps Indicator */
.steps-indicator {
    display: flex;
    justify-content: center;
    margin-bottom: 30px;
}

.step {
    display: flex;
    align-items: center;
    gap: 8px;
}

.step-number {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: #e5e7eb;
    color: #6b7280;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
    font-weight: 600;
    transition: all 0.3s ease;
}

.step.active .step-number {
    background: #8b5cf6;
    color: white;
}

.step.completed .step-number {
    background: #10b981;
    color: white;
}

.step-line {
    width: 40px;
    height: 2px;
    background: #e5e7eb;
    margin: 0 8px;
}

.step.completed .step-line {
    background: #10b981;
}

.step-label {
    font-size: 0.8rem;
    color: #6b7280;
}

.step.active .step-label {
    color: #8b5cf6;
    font-weight: 600;
}

/* Email Verification */
.email-verification {
    text-align: center;
    padding: 20px;
    background: #f8fafc;
    border-radius: 12px;
    margin-bottom: 25px;
}

.email-verification i {
    font-size: 3rem;
    color: #3b82f6;
    margin-bottom: 15px;
}

.email-verification h4 {
    color: #374151;
    margin-bottom: 10px;
}

.email-verification p {
    color: #6b7280;
    font-size: 0.9rem;
    margin-bottom: 0;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .popup-overlay {
        padding: 10px;
    }
    
    .popup-auth {
        max-height: 95vh;
    }
    
    .popup-header {
        padding: 25px 20px;
    }
    
    .popup-header h2 {
        font-size: 1.5rem;
    }
    
    .popup-body {
        padding: 30px 25px;
        max-height: calc(95vh - 150px);
    }
    
    .otp-input-group {
        gap: 8px;
    }
    
    .otp-input {
        width: 45px;
        height: 45px;
        font-size: 1.3rem;
    }
    
    .steps-indicator {
        flex-direction: column;
        gap: 15px;
    }
    
    .step-line {
        width: 2px;
        height: 20px;
        margin: 8px 0;
    }
    
    .close-popup {
        width: 35px;
        height: 35px;
        font-size: 1rem;
    }
}
