/**
 * Easy2Siksha.com - Secure Forgot Password System
 * Custom Styling & Responsive Enhancements
 */

/* Step Progress Tracker */
.steps-tracker {
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
    margin-bottom: 30px;
    padding: 0 10px;
}

.steps-tracker::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 20px;
    right: 20px;
    height: 3px;
    background: #e2e8f0;
    transform: translateY(-50%);
    z-index: 1;
}

.step-indicator {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: #ffffff;
    border: 3px solid #cbd5e1;
    color: #64748b;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    font-weight: 700;
    position: relative;
    z-index: 2;
    transition: all 0.3s ease;
}

.step-indicator.active {
    border-color: #19C8A1;
    background: #19C8A1;
    color: #ffffff;
    box-shadow: 0 0 14px rgba(25, 200, 161, 0.45);
    transform: scale(1.1);
}

.step-indicator.completed {
    border-color: #10b981;
    background: #10b981;
    color: #ffffff;
}

/* Alert Banners */
.alert-banner {
    padding: 13px 16px;
    border-radius: 10px;
    font-size: 14px;
    line-height: 1.5;
    margin-bottom: 22px;
    display: none;
    align-items: flex-start;
    gap: 10px;
    animation: fadeIn 0.3s ease;
}

.alert-banner.show {
    display: flex;
}

.alert-banner.alert-error {
    background-color: #fef2f2;
    border: 1px solid #fecaca;
    color: #b91c1c;
}

.alert-banner.alert-success {
    background-color: #ecfdf5;
    border: 1px solid #a7f3d0;
    color: #047857;
}

.alert-banner.alert-info {
    background-color: #eff6ff;
    border: 1px solid #bfdbfe;
    color: #1d4ed8;
}

/* Subheadings & descriptions */
.stage-desc {
    color: #64748b;
    font-size: 14.5px;
    line-height: 1.55;
    margin-bottom: 24px;
}

.email-pill {
    display: inline-block;
    background: #f1f5f9;
    color: #0f172a;
    font-weight: 700;
    padding: 3px 10px;
    border-radius: 6px;
    border: 1px solid #e2e8f0;
    font-family: monospace;
}

/* 6-Digit OTP Input Grid */
.otp-inputs-wrapper {
    margin: 20px 0 15px;
}

.otp-grid {
    display: flex;
    justify-content: center;
    gap: 10px;
}

.otp-box {
    width: 48px;
    height: 58px;
    font-size: 24px;
    font-weight: 800;
    text-align: center;
    border: 2px solid #cbd5e1;
    border-radius: 12px;
    background: #f8fafc;
    color: #0f172a;
    transition: all 0.25s ease;
    outline: none;
    font-family: 'Inter', monospace;
}

.otp-box:focus {
    border-color: #19C8A1;
    background: #ffffff;
    box-shadow: 0 0 0 4px rgba(25, 200, 161, 0.2);
    transform: translateY(-2px);
}

.otp-box.filled {
    border-color: #14b8a6;
    background: #f0fdfa;
}

.otp-box.error-state {
    border-color: #ef4444;
    background: #fff5f5;
    animation: shake 0.3s ease;
}

/* Validity & Resend Bar */
.otp-timer-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 18px 0 24px;
    font-size: 13.5px;
    color: #64748b;
}

.validity-timer {
    display: flex;
    align-items: center;
    gap: 6px;
    font-weight: 600;
    color: #0f172a;
}

.validity-timer.warning {
    color: #e11d48;
}

.resend-btn {
    background: none;
    border: none;
    color: #19C8A1;
    font-weight: 700;
    cursor: pointer;
    padding: 0;
    font-size: 13.5px;
    transition: color 0.2s ease;
}

.resend-btn:hover:not(:disabled) {
    color: #0d9488;
    text-decoration: underline;
}

.resend-btn:disabled {
    color: #94a3b8;
    cursor: not-allowed;
    text-decoration: none;
}

/* Password Toggle Icon */
.input-wrapper {
    position: relative;
}

.toggle-password-btn {
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    color: #94a3b8;
    padding: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    transition: color 0.2s ease;
    z-index: 5;
}

.toggle-password-btn:hover {
    color: #19C8A1;
}

/* Password Requirements Checklist */
.pwd-requirements {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 14px 16px;
    margin: 16px 0 22px;
    font-size: 13px;
}

.pwd-requirements p {
    margin: 0 0 8px;
    font-weight: 700;
    color: #475569;
}

.pwd-requirements ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.pwd-requirements li {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #64748b;
    margin-bottom: 5px;
    font-size: 12.5px;
    transition: color 0.2s ease;
}

.pwd-requirements li.valid {
    color: #059669;
    font-weight: 600;
}

.pwd-requirements li .icon {
    font-size: 13px;
    width: 14px;
    text-align: center;
}

/* Password strength bar */
.strength-bar-container {
    height: 6px;
    background: #e2e8f0;
    border-radius: 3px;
    overflow: hidden;
    margin-top: 8px;
}

.strength-bar-fill {
    height: 100%;
    width: 0%;
    transition: width 0.3s ease, background-color 0.3s ease;
}

.strength-bar-fill.weak { width: 25%; background: #ef4444; }
.strength-bar-fill.fair { width: 50%; background: #f59e0b; }
.strength-bar-fill.good { width: 75%; background: #3b82f6; }
.strength-bar-fill.strong { width: 100%; background: #10b981; }

.strength-label {
    font-size: 12px;
    font-weight: 600;
    margin-top: 4px;
    text-align: right;
    color: #64748b;
}

/* Loading State for Buttons */
.btn.loading {
    position: relative;
    color: transparent !important;
    pointer-events: none;
}

.btn.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 22px;
    height: 22px;
    margin: -11px 0 0 -11px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-top-color: #ffffff;
    border-radius: 50%;
    animation: btnSpin 0.8s linear infinite;
}

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

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

/* Stage 4 Success */
.success-card {
    text-align: center;
    padding: 10px 0;
}

.success-icon-badge {
    width: 76px;
    height: 76px;
    background: #ecfdf5;
    color: #10b981;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 38px;
    margin: 0 auto 20px;
    box-shadow: 0 10px 25px rgba(16, 185, 129, 0.25);
    animation: scaleIn 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

@keyframes scaleIn {
    0% { transform: scale(0); opacity: 0; }
    100% { transform: scale(1); opacity: 1; }
}

.success-card h3 {
    color: #0f172a;
    font-size: 22px;
    margin-bottom: 10px;
}

.success-card p {
    color: #64748b;
    font-size: 15px;
    line-height: 1.6;
    margin-bottom: 26px;
}

/* Mobile Responsiveness */
@media (max-width: 480px) {
    .otp-grid {
        gap: 6px;
    }
    .otp-box {
        width: 42px;
        height: 52px;
        font-size: 21px;
    }
    .form-container {
        padding: 30px 20px;
    }
    .header {
        padding: 35px 20px;
    }
    .steps-tracker {
        padding: 0 5px;
    }
}

@media (max-width: 360px) {
    .otp-grid {
        gap: 4px;
    }
    .otp-box {
        width: 36px;
        height: 48px;
        font-size: 18px;
    }
}
