/* forgotPassword.css — Estilos para el módulo de Recuperación de Contraseña */
/* Diseño coherente con login/register (glassmorphism, Poppins, dark theme) */

.forgot-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    width: 100%;
    flex: 1;
    padding: 20px;
    box-sizing: border-box;
    animation: fadeIn var(--transition-smooth);
}

.forgot-card {
    background: var(--color-bg-card);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--border-radius-lg);
    padding: 40px 30px;
    width: 100%;
    max-width: 460px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* Logo (igual que login/register) */
.forgot-logo {
    margin-bottom: 20px;
    text-align: center;
}

.forgot-logo h1 {
    font-size: 1.8rem;
    font-weight: 700;
    letter-spacing: 1px;
    color: var(--color-text-main);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.forgot-logo p {
    font-size: 0.9rem;
    color: var(--color-text-muted);
    margin-top: 5px;
}

/* =============================================
   INDICADOR DE PASOS
   ============================================= */

.steps-indicator {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0;
    margin-bottom: 25px;
    width: 100%;
    padding: 0 10px;
}

.step {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    opacity: 0.4;
    transition: all 0.3s ease;
}

.step.active {
    opacity: 1;
}

.step.completed {
    opacity: 1;
}

.step-number {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--color-text-muted);
    transition: all 0.3s ease;
}

.step.active .step-number {
    border-color: var(--color-primary);
    color: var(--color-primary);
    box-shadow: 0 0 15px rgba(0, 229, 255, 0.25);
    background: rgba(0, 229, 255, 0.08);
}

.step.completed .step-number {
    border-color: var(--color-success);
    background: var(--color-success);
    color: #fff;
}

.step.completed .step-number::after {
    content: '✓';
    font-size: 0.9rem;
}

.step.completed .step-number {
    font-size: 0;
}

.step span {
    font-size: 0.75rem;
    color: var(--color-text-muted);
    font-weight: 500;
}

.step.active span {
    color: var(--color-primary);
}

.step.completed span {
    color: var(--color-success);
}

.step-line {
    flex: 1;
    height: 2px;
    background: rgba(255, 255, 255, 0.1);
    margin: 0 8px;
    margin-bottom: 22px;
    transition: background 0.4s ease;
    min-width: 30px;
}

.step-line.completed {
    background: var(--color-success);
}

/* =============================================
   FORMULARIOS
   ============================================= */

.forgot-form {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 20px;
    animation: fadeIn 0.3s ease;
}

.step-description {
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    margin-bottom: 5px;
}

.step-description p {
    font-size: 0.9rem;
    color: var(--color-text-muted);
    line-height: 1.5;
}

/* =============================================
   INPUTS DE CÓDIGO (6 dígitos)
   ============================================= */

.code-inputs {
    display: flex;
    gap: 10px;
    justify-content: center;
}

.code-digit {
    width: 50px;
    height: 58px;
    text-align: center;
    font-size: 1.5rem;
    font-weight: 700;
    font-family: 'Poppins', monospace;
    letter-spacing: 0;
    background: rgba(15, 23, 42, 0.6);
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--border-radius-md);
    color: var(--color-text-main);
    outline: none;
    transition: all 0.2s ease;
    caret-color: var(--color-primary);
}

.code-digit:focus {
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(0, 229, 255, 0.15);
    background: rgba(15, 23, 42, 0.8);
    transform: translateY(-2px);
}

.code-digit:not(:placeholder-shown) {
    border-color: var(--color-primary);
}

/* =============================================
   TIMER
   ============================================= */

.code-timer {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-size: 0.85rem;
    color: var(--color-primary);
    background: rgba(0, 229, 255, 0.06);
    border: 1px solid rgba(0, 229, 255, 0.15);
    border-radius: var(--border-radius-md);
    padding: 10px 16px;
}

.code-timer.expired {
    color: var(--color-error);
    background: rgba(239, 68, 68, 0.08);
    border-color: rgba(239, 68, 68, 0.2);
}

/* =============================================
   REENVIAR CÓDIGO
   ============================================= */

.resend-section {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-size: 0.85rem;
}

.text-muted {
    color: var(--color-text-muted);
}

.btn-link {
    background: none;
    border: none;
    color: var(--color-primary);
    font-family: inherit;
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition-fast);
    padding: 0;
}

.btn-link:hover {
    color: var(--color-primary-hover);
    text-decoration: underline;
}

/* =============================================
   MENSAJES (reutiliza global-error + nuevos)
   ============================================= */

.global-success {
    background: rgba(16, 185, 129, 0.1);
    color: var(--color-success);
    padding: 12px;
    border-radius: var(--border-radius-md);
    border: 1px solid rgba(16, 185, 129, 0.3);
    font-size: 0.9rem;
    text-align: center;
    margin-bottom: 10px;
    width: 100%;
    animation: fadeIn 0.3s ease;
}

.global-warning {
    background: rgba(245, 158, 11, 0.1);
    color: #f59e0b;
    padding: 12px;
    border-radius: var(--border-radius-md);
    border: 1px solid rgba(245, 158, 11, 0.3);
    font-size: 0.9rem;
    text-align: center;
    margin-bottom: 10px;
    width: 100%;
    animation: fadeIn 0.3s ease;
}

/* Footer */
.forgot-footer {
    margin-top: 25px;
    text-align: center;
}

.forgot-footer p {
    font-size: 0.9rem;
    color: var(--color-text-muted);
}

/* Reutilizar .required de register */
.required {
    color: var(--color-error);
}

/* =============================================
   RESPONSIVE
   ============================================= */

@media (max-width: 480px) {
    .forgot-card {
        padding: 30px 20px;
    }

    .code-digit {
        width: 42px;
        height: 50px;
        font-size: 1.3rem;
    }

    .code-inputs {
        gap: 6px;
    }

    .steps-indicator {
        padding: 0;
    }

    .step-number {
        width: 30px;
        height: 30px;
        font-size: 0.75rem;
    }

    .step span {
        font-size: 0.65rem;
    }
}
