/* Forgot Password Styles */
.forgot-password-container {
    min-height: 5vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: #f5f7fa00;
}

.forgot-password-wrapper {
    width: 100%;
    max-width: 480px;
    background: white;
    border-radius: 16px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.08);
    padding: 40px;
    position: relative;
}

/* Header */
.forgot-password-header {
    text-align: center;
    margin-bottom: 40px;
}

.forgot-password-icon {
    width: 60px;
    height: 60px;
    background: linear-gradient(90deg, #FFD700, #FFA500);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 24px;
    box-shadow: 0 8px 24px rgba(255, 165, 0, 0.3);
}

.forgot-password-icon i {
    font-size: 24px;
    color: white;
}

.forgot-password-header h1 {
    font-size: 28px;
    font-weight: 700;
    color: #2c3e50;
    margin: 0 0 12px;
}

.forgot-password-subtitle {
    font-size: 16px;
    color: #6c757d;
    margin: 0;
    line-height: 1.5;
}

/* Steps */
.forgot-password-step {
    display: none;
}

.forgot-password-step.active {
    display: block;
    animation: fadeIn 0.3s ease-in-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Forms */
.forgot-password-form {
    margin: 0;
}

.form-group {
    margin-bottom: 24px;
}

.form-group label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: #495057;
    margin-bottom: 8px;
}

.form-input {
    width: 100%;
    padding: 12px 16px;
    font-size: 16px;
    border: 2px solid #e1e8ed;
    border-radius: 8px;
    background: #fff;
    transition: all 0.2s ease;
    box-sizing: border-box;
}

.form-input:focus {
    outline: none;
    border-color: #2a5298;
    box-shadow: 0 0 0 3px rgba(42, 82, 152, 0.1);
}

.form-input::placeholder {
    color: #adb5bd;
}

.form-help {
    font-size: 13px;
    color: #6c757d;
    margin-top: 6px;
}

/* Password Field */
.password-input-wrapper {
    position: relative;
}

.password-toggle {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: #6c757d;
    cursor: pointer;
    padding: 8px;
    transition: color 0.2s ease;
}

.password-toggle:hover {
    color: #495057;
}

/* OTP Input */
.otp-input-container {
    display: flex;
    gap: 12px;
    justify-content: center;
    margin-bottom: 32px;
}

.otp-input {
    width: 60px;
    height: 60px;
    text-align: center;
    font-size: 24px;
    font-weight: 600;
    border: 2px solid #e1e8ed;
    border-radius: 12px;
    background: #f8f9fa;
    transition: all 0.2s ease;
}

.otp-input:focus {
    outline: none;
    border-color: #2a5298;
    background: white;
    box-shadow: 0 0 0 3px rgba(42, 82, 152, 0.1);
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 14px 24px;
    font-size: 16px;
    font-weight: 600;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
    position: relative;
    min-height: 52px;
}

.btn-primary {
    background: linear-gradient(90deg, #FFD700, #FFA500);
    color: white;
    position: relative;
    overflow: hidden;
}

.btn-primary:hover:not(:disabled) {
    transform: translateY(-1px);
    box-shadow: 0 8px 24px rgba(255, 165, 0, 0.3);
}

.btn-primary:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Success Animation for Button */
.btn-success-animation {
    animation: successPulse 0.6s ease-out;
    background: linear-gradient(90deg, #28a745, #20c997) !important;
}

@keyframes successPulse {
    0% {
        transform: scale(1);
        box-shadow: 0 4px 16px rgba(40, 167, 69, 0.2);
    }
    50% {
        transform: scale(1.05);
        box-shadow: 0 8px 32px rgba(40, 167, 69, 0.4);
    }
    100% {
        transform: scale(1);
        box-shadow: 0 4px 16px rgba(40, 167, 69, 0.2);
    }
}

.btn-block {
    width: 100%;
}

.btn-loading {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
}

/* Form Actions */
.form-actions {
    margin-top: 32px;
}

.form-footer {
    text-align: center;
    margin-top: 24px;
}

.back-link {
    color: #6c757d;
    text-decoration: none;
    font-size: 14px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: color 0.2s ease;
}

.back-link:hover {
    color: #495057;
}

/* Resend Section */
.resend-section {
    text-align: center;
    margin-top: 24px;
}

.resend-text {
    font-size: 14px;
    color: #6c757d;
    margin: 0;
}

.resend-link {
    background: none !important;
    border: none;
    color: #FFA500;
    font-weight: 600;
    cursor: pointer;
    padding: 0;
    text-decoration: none;
    transition: color 0.2s ease;
}

.resend-link:hover:not(:disabled) {
    background: none !important;
    color: #FFD700;
    text-decoration: underline;
}

.resend-link:focus {
    background: none !important;
    outline: none;
}

.resend-link:disabled {
    background: none !important;
    color: #adb5bd;
    cursor: not-allowed;
}

/* Success animation for resend button */
.resend-link.btn-success-animation {
    color: #28a745 !important;
    animation: textPulse 0.6s ease-out;
}

@keyframes textPulse {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.1);
    }
    100% {
        transform: scale(1);
    }
}

#resend-timer {
    color: #6c757d;
    font-weight: normal;
}

/* Messages */
#forgot-password-messages {
    margin-top: 20px;
}

.alert {
    padding: 12px 16px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
    animation: slideIn 0.3s ease-out;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.alert-success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.alert-error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.alert i {
    font-size: 18px;
}

/* Signup Link in Error Message */
.alert-error .signup-link {
    color: #FFA500;
    font-weight: 600;
    text-decoration: underline;
    margin-left: 4px;
    transition: color 0.2s ease;
}

.alert-error .signup-link:hover {
    color: #FFD700;
}

/* Session Expired Banner */
.session-expired-banner {
    background: #fff3cd;
    border: 1px solid #ffeaa7;
    color: #856404;
    padding: 12px 16px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 24px;
    font-size: 14px;
}

.session-expired-banner i {
    font-size: 18px;
}

/* Mobile Responsive */
@media (max-width: 576px) {
    .forgot-password-wrapper {
        padding: 30px 20px;
    }
    
    .forgot-password-header h1 {
        font-size: 24px;
    }
    
    .forgot-password-subtitle {
        font-size: 14px;
    }
    
    .otp-input {
        width: 50px;
        height: 50px;
        font-size: 20px;
    }
    
    .btn {
        font-size: 15px;
        padding: 12px 20px;
        min-height: 48px;
    }
}

/* Loading State */
.btn-text {
    transition: opacity 0.2s ease;
}

.btn-loading {
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Focus Visible */
.form-input:focus-visible,
.otp-input:focus-visible,
.btn:focus-visible {
    outline: 2px solid #2a5298;
    outline-offset: 2px;
}

/* Smooth Transitions */
* {
    transition-property: background-color, border-color, color, fill, stroke, opacity, box-shadow, transform;
    transition-timing-function: ease-in-out;
    transition-duration: 150ms;
}
