/* css/forgot_password.css */
/* Forgot Password Page Styles */

/* ============================================
   FORGOT PASSWORD CONTAINER
   ============================================ */
.forgot-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: calc(100vh - 70px);
    padding: 100px 20px 40px;
}

.forgot-card {
    background: var(--white);
    border-radius: 24px;
    padding: 2.5rem;
    width: 100%;
    max-width: 500px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.15);
    animation: fadeInUp 0.5s ease-out;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ============================================
   TYPOGRAPHY
   ============================================ */
.forgot-card h2 {
    text-align: center;
    color: var(--primary-color);
    font-size: 1.8rem;
    margin-bottom: 0.5rem;
}

.forgot-card h2 i {
    margin-right: 10px;
}

.subtitle {
    text-align: center;
    color: var(--gray-600);
    margin-bottom: 2rem;
    font-size: 0.9rem;
}

/* ============================================
   SECURITY QUESTIONS BOX
   ============================================ */
.security-questions {
    background: var(--gray-100);
    padding: 1rem 1.2rem;
    border-radius: 12px;
    margin-bottom: 1.5rem;
    border-left: 4px solid var(--primary-color);
}

.security-questions p {
    margin: 0.5rem 0;
    color: var(--gray-700);
    font-size: 0.85rem;
}

.security-questions i {
    color: var(--primary-color);
    width: 25px;
    margin-right: 5px;
}

.security-questions strong {
    color: var(--gray-900);
    font-weight: 600;
}

/* ============================================
   FORM GROUPS
   ============================================ */
.form-group {
    margin-bottom: 1.5rem;
    position: relative;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--gray-800);
    font-weight: 500;
    font-size: 0.85rem;
}

.form-group label i {
    color: var(--primary-color);
    margin-right: 0.5rem;
    width: 18px;
}

.form-group input {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 2px solid var(--gray-200);
    border-radius: 12px;
    font-size: 0.9rem;
    transition: all 0.3s;
    font-family: inherit;
    background: var(--white);
}

.form-group input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(135, 188, 212, 0.2);
}

.form-group input.error {
    border-color: var(--error);
}

.form-group small {
    display: block;
    margin-top: 0.4rem;
    font-size: 0.7rem;
    color: var(--gray-600);
}

/* Password Group */
.password-group {
    position: relative;
}

.toggle-password {
    position: absolute;
    right: 1rem;
    bottom: 0.75rem;
    cursor: pointer;
    font-size: 1rem;
    color: var(--gray-600);
    transition: color 0.3s;
    background: transparent;
    border: none;
}

.toggle-password:hover {
    color: var(--primary-color);
}

/* Password Strength & Match Indicators */
.password-strength,
.password-match {
    margin-top: 0.5rem;
    font-size: 0.7rem;
    display: flex;
    align-items: center;
    gap: 0.3rem;
}

/* ============================================
   ALERT MESSAGES
   ============================================ */
.alert {
    padding: 0.9rem 1rem;
    border-radius: 12px;
    margin-bottom: 1.5rem;
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    gap: 0.8rem;
}

.alert-error {
    background: #fef2f2;
    color: var(--error);
    border-left: 4px solid var(--error);
}

.alert-success {
    background: #f0fdf4;
    color: var(--success);
    border-left: 4px solid var(--success);
}

.alert i {
    font-size: 1rem;
}

/* ============================================
   BUTTONS
   ============================================ */
.btn-login {
    width: 100%;
    padding: 0.9rem;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.btn-login:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(135, 188, 212, 0.3);
}

.btn-login:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

/* ============================================
   LINKS
   ============================================ */
.login-link {
    text-align: center;
    margin-top: 1.5rem;
    font-size: 0.8rem;
    color: var(--gray-600);
}

.login-link a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
}

.login-link a:hover {
    text-decoration: underline;
}

.reset-info {
    text-align: center;
    margin-top: 1.5rem;
    padding-top: 1rem;
    border-top: 1px solid var(--gray-200);
}

.reset-info p {
    margin: 0.3rem 0;
    font-size: 0.8rem;
    color: var(--gray-600);
}

.reset-info a {
    color: var(--primary-color);
    text-decoration: none;
}

.reset-info a:hover {
    text-decoration: underline;
}

/* ============================================
   LOADING OVERLAY
   ============================================ */
.form-loader-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 1rem;
    z-index: 9999;
    backdrop-filter: blur(5px);
}

.spinner {
    width: 45px;
    height: 45px;
    border: 4px solid rgba(255, 255, 255, 0.3);
    border-top: 4px solid var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.form-loader-overlay span {
    color: white;
    font-size: 0.9rem;
    font-weight: 500;
}

/* ============================================
   DARK MODE SUPPORT
   ============================================ */
body.dark-mode .forgot-card {
    background: var(--dark-surface, #1f2937);
}

body.dark-mode .forgot-card h2 {
    color: var(--primary-light);
}

body.dark-mode .subtitle {
    color: #9ca3af;
}

body.dark-mode .security-questions {
    background: #374151;
}

body.dark-mode .security-questions p {
    color: #cbd5e1;
}

body.dark-mode .security-questions strong {
    color: #e5e5e5;
}

body.dark-mode .form-group label {
    color: #e5e5e5;
}

body.dark-mode .form-group input {
    background: #374151;
    border-color: #4b5563;
    color: #e5e5e5;
}

body.dark-mode .form-group input:focus {
    border-color: var(--primary-color);
}

body.dark-mode .form-group small {
    color: #9ca3af;
}

body.dark-mode .alert-error {
    background: #450a0a;
    color: #fca5a5;
}

body.dark-mode .alert-success {
    background: #064e3b;
    color: #86efac;
}

body.dark-mode .reset-info {
    border-top-color: #374151;
}

body.dark-mode .reset-info p {
    color: #9ca3af;
}

body.dark-mode .login-link {
    color: #9ca3af;
}

/* ============================================
   RESPONSIVE DESIGN
   ============================================ */
@media (max-width: 768px) {
    .forgot-container {
        padding: 80px 15px 30px;
    }
    
    .forgot-card {
        padding: 1.5rem;
    }
    
    .forgot-card h2 {
        font-size: 1.5rem;
    }
    
    .security-questions {
        padding: 0.8rem 1rem;
    }
}

@media (max-width: 480px) {
    .forgot-container {
        padding: 70px 12px 20px;
    }
    
    .forgot-card {
        padding: 1.2rem;
        border-radius: 20px;
    }
    
    .forgot-card h2 {
        font-size: 1.3rem;
    }
    
    .subtitle {
        font-size: 0.8rem;
        margin-bottom: 1rem;
    }
    
    .form-group {
        margin-bottom: 1rem;
    }
    
    .form-group input {
        padding: 0.65rem 0.9rem;
        font-size: 0.85rem;
    }
    
    .btn-login {
        padding: 0.7rem;
        font-size: 0.85rem;
    }
    
    .security-questions {
        padding: 0.6rem 0.8rem;
    }
    
    .security-questions p {
        font-size: 0.75rem;
    }
}

/* Touch Device Optimizations */
@media (hover: none) and (pointer: coarse) {
    .btn-login {
        padding: 0.9rem;
    }
    
    .form-group input {
        font-size: 16px;
    }
    
    .toggle-password {
        bottom: 0.85rem;
    }
}

/* Landscape Mode */
@media (max-width: 900px) and (orientation: landscape) {
    .forgot-container {
        padding: 80px 15px 15px;
    }
    
    .forgot-card {
        padding: 1rem;
        max-width: 450px;
    }
    
    .forgot-card h2 {
        font-size: 1.2rem;
        margin-bottom: 0.2rem;
    }
    
    .subtitle {
        margin-bottom: 1rem;
    }
    
    .form-group {
        margin-bottom: 0.8rem;
    }
}