/* ========================================
   ESTILOS ESPECÍFICOS PARA FORGOT PASSWORD
   ======================================== */

/* Contenedor principal del forgot password */
.forgot-container {
    max-width: 450px;
    margin: 40px auto;
    padding: 0;
    background-color: #ffffff;
    border-radius: 16px;
    box-shadow: 0 8px 32px var(--Secondary-20);
    overflow: hidden;
}

/* Header del forgot password con logo */
.forgot-header {
    background: linear-gradient(135deg, var(--Business) 0%, var(--Business-70) 100%);
    padding: 40px 32px 32px;
    text-align: center;
    color: var(--Text-White);
}

.forgot-logo {
    width: 80px;
    height: auto;
    margin-bottom: 16px;
    filter: brightness(0) invert(1);
}

.forgot-title {
    font-size: 24px;
    font-weight: 700;
    margin: 0 0 8px 0;
    color: var(--Text-White);
}

.forgot-subtitle {
    font-size: 16px;
    margin: 0;
    opacity: 0.9;
    font-weight: 400;
    line-height: 1.4;
}

/* Formulario de forgot password */
#forgotForm {
    padding: 32px;
    background: transparent;
    box-shadow: none;
    border-radius: 0;
    margin: 0;
}

/* Grupos de inputs */
.input-group {
    position: relative;
    margin-bottom: 24px;
}

.input-label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: var(--Text-Default);
    margin-bottom: 8px;
}

#forgotForm input[type="email"] {
    width: 100%;
    margin-bottom: 0;
    box-sizing: border-box;
    border: 2px solid var(--Secondary-20);
    border-radius: 8px;
    padding: 16px;
    font-size: 16px;
    transition: all 0.3s ease;
    background-color: var(--Background);
}

#forgotForm input[type="email"]:focus {
    border-color: var(--Business);
    box-shadow: 0 0 0 3px var(--Business-20);
    background-color: #ffffff;
    outline: none;
}

/* Estados de validación */
#forgotForm input.valid {
    border-color: var(--Confirmation);
    background-color: var(--Confirmation-05);
}

#forgotForm input.invalid {
    border-color: var(--Error);
    background-color: var(--Error-05);
}

/* Mensajes de error */
.input-error {
    color: var(--Error);
    font-size: 12px;
    margin-top: 4px;
    min-height: 16px;
    display: block;
}

/* Texto de ayuda */
.input-help {
    color: var(--Text-Secondary);
    font-size: 12px;
    margin-top: 4px;
    font-style: italic;
}

/* Botón de forgot password */
.btn-forgot {
    width: 100%;
    background: linear-gradient(135deg, var(--Primary) 0%, var(--Primary-70) 100%);
    color: var(--Text-White);
    border: none;
    border-radius: 8px;
    padding: 16px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-bottom: 24px;
}

.btn-forgot:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px var(--Primary-30);
    background: linear-gradient(135deg, var(--Primary-70) 0%, var(--Primary) 100%);
}

.btn-forgot:active {
    transform: translateY(0);
}

.btn-forgot:disabled {
    background: var(--Secondary-40);
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* Footer del forgot password */
.forgot-footer {
    background-color: var(--Background);
    padding: 20px 32px;
    border-top: 1px solid var(--Secondary-10);
    text-align: center;
}

.back-link {
    margin: 0 0 12px 0;
    font-size: 14px;
}

.back-link a {
    color: var(--Business);
    text-decoration: none;
    font-weight: 600;
}

.back-link a:hover {
    text-decoration: underline;
}

.forgot-help {
    margin: 0;
    font-size: 14px;
    color: var(--Text-Secondary);
}

/* Mensaje de error del forgot password */
.forgot-error {
    background: linear-gradient(135deg, #fee 0%, #fdd 100%);
    color: #c33;
    border: 1px solid #fbb;
    border-radius: 8px;
    padding: 16px;
    margin: 0 32px 24px;
    font-size: 14px;
    text-align: center;
    animation: slideDown 0.3s ease-out;
    position: relative;
}

.forgot-error::before {
    content: "⚠️";
    margin-right: 8px;
}

/* Mensaje de éxito */
.forgot-success {
    background: linear-gradient(135deg, #efe 0%, #dfd 100%);
    color: #363;
    border: 1px solid #bdb;
    border-radius: 8px;
    padding: 16px;
    margin: 0 32px 24px;
    font-size: 14px;
    text-align: center;
    animation: slideDown 0.3s ease-out;
    position: relative;
}

.forgot-success::before {
    content: "✅";
    margin-right: 8px;
}

/* Estado de éxito completo */
.forgot-container.success .forgot-header {
    background: linear-gradient(135deg, var(--Confirmation) 0%, var(--Confirmation-70) 100%);
}

.forgot-container.success .forgot-title {
    color: var(--Text-White);
}

.forgot-container.success .forgot-subtitle {
    color: var(--Text-White);
    opacity: 0.9;
}

/* Animaciones */
@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
        max-height: 0;
    }
    to {
        opacity: 1;
        transform: translateY(0);
        max-height: 100px;
    }
}

.forgot-container {
    animation: fadeInUp 0.6s ease-out;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsive para móviles */
@media (max-width: 768px) {
    .forgot-container {
        margin: 20px 16px;
        max-width: none;
    }
    
    .forgot-header {
        padding: 32px 24px 24px;
    }
    
    .forgot-logo {
        width: 60px;
    }
    
    .forgot-title {
        font-size: 20px;
    }
    
    .forgot-subtitle {
        font-size: 14px;
    }
    
    #forgotForm {
        padding: 24px;
    }
    
    .forgot-footer {
        padding: 16px 24px;
    }
}

/* Estados de carga */
.forgot-container.loading {
    opacity: 0.7;
    pointer-events: none;
}

.forgot-container.loading .btn-forgot::after {
    content: '';
    width: 16px;
    height: 16px;
    margin-left: 8px;
    border: 2px solid transparent;
    border-top: 2px solid white;
    border-radius: 50%;
    display: inline-block;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Estilo especial para el estado de confirmación */
.confirmation-message {
    padding: 24px 32px;
    text-align: center;
}

.confirmation-icon {
    font-size: 48px;
    margin-bottom: 16px;
    display: block;
}

.confirmation-title {
    font-size: 18px;
    font-weight: 600;
    color: var(--Text-Default);
    margin-bottom: 8px;
}

.confirmation-text {
    color: var(--Text-Secondary);
    line-height: 1.5;
    margin-bottom: 24px;
}

.confirmation-email {
    font-weight: 600;
    color: var(--Business);
}