/**
 * Estilos para el sistema de recuperación de contraseña de Cittapet
 *
 * Este archivo contiene todos los estilos necesarios para las 3 pantallas
 * del flujo de recuperación de contraseña, incluyendo:
 * - Pantalla de solicitud de email
 * - Pantalla de verificación de código (4 dígitos)
 * - Pantalla de nueva contraseña
 * - Animaciones y transiciones
 * - Responsive design
 *
 * @package CittapetSignupModal
 * @author Cittapet
 */

/* ==========================================================================
   CONTENEDOR PRINCIPAL
   ========================================================================== */

#cittapet-recover-container {
    position: relative;
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
 
    padding: 20px;
    box-sizing: border-box;
}

/* ==========================================================================
   PANTALLAS GENERALES
   ========================================================================== */

.cittapet-recover-screen {
    display: none;
    width: 100%;
    max-width: 500px;
    margin: 0 auto;
}

.cittapet-recover-screen.active {
    display: block;
    animation: fadeInUp 0.5s ease-out;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ==========================================================================
   PANTALLA 1: SOLICITAR EMAIL
   ========================================================================== */

#cittapet-recover-content {
    background: white;
    border-radius: 20px;
    padding: 40px;
    box-shadow: 0 25px 50px rgba(0,0,0,0.15);
    text-align: center;
}

#cittapet-recover-header {
    margin-bottom: 30px;
}

#cittapet-recover-logo-container {
    margin-bottom: 25px;
    text-align: center;
}

#cittapet-recover-logo {
    width: 80px;
    height: 80px;
    object-fit: contain;
}

/* Key icon styles (replaces Cittapet logos) */
#cittapet-recover-logo-container .cittapet-recover-key-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: #f3f4f6;
    color: #dc2626;
    font-size: 40px;
    line-height: 1;
}

.cittapet-recover-logo-verification .cittapet-recover-key-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #dc2626;
    font-size: 64px;
    line-height: 1;
}

#cittapet-recover-password-logo-container .cittapet-recover-key-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: #f3f4f6;
    color: #dc2626;
    font-size: 40px;
    line-height: 1;
}

#cittapet-recover-title {
    color: #2d3748;
    font-size: 32px;
    font-weight: 700;
    margin: 0 0 10px 0;
    line-height: 1.2;
}

#cittapet-recover-subtitle {
    color: #dc2626;
    font-size: 22px;
    font-weight: 600;
    margin: 0 0 15px 0;
    line-height: 1.3;
}

#cittapet-recover-description {
    color: #4a5568;
    font-size: 16px;
    line-height: 1.5;
    margin: 0 0 30px 0;
}

/* Campos de formulario */
.cittapet-recover-field-container {
    text-align: left;
    margin-bottom: 20px;
}

.cittapet-recover-field-container label {
    display: block;
    color: #2d3748;
    font-weight: 600;
    font-size: 14px;
    margin-bottom: 8px;
}

.cittapet-recover-field-container input[type="email"],
.cittapet-recover-field-container input[type="password"],
.cittapet-recover-field-container input[type="text"] {
    width: 100%;
    padding: 15px 20px;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    font-size: 16px;
    background-color: #f7fafc;
    transition: all 0.3s ease;
    box-sizing: border-box;
    font-family: inherit;
    line-height: 1.4;
}

.cittapet-recover-field-container input[type="email"]:focus,
.cittapet-recover-field-container input[type="password"]:focus {
    outline: none;
    border-color: #dc2626;
    background-color: white;
    box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.1);
}

/* Botones principales */
#cittapet-recover-email-btn,
#cittapet-recover-password-btn {
    width: 100%;
    background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%);
    color: white;
    border: none;
    border-radius: 12px;
    font-weight: 700;
    font-size: 16px;
    /* padding: 15px 30px; */
    text-transform: uppercase;
    letter-spacing: 1px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 8px 20px rgba(220, 38, 38, 0.3);
    margin-bottom: 20px;
}

#cittapet-recover-email-btn:hover,
#cittapet-recover-password-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 25px rgba(220, 38, 38, 0.4);
}

#cittapet-recover-email-btn:disabled,
#cittapet-recover-password-btn:disabled {
    background: #9ca3af;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* Links de navegación */
#cittapet-recover-back-to-login a,
#cittapet-recover-password-back-to-login a {
    color: #dc2626;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: color 0.3s ease;
}

#cittapet-recover-back-to-login a:hover,
#cittapet-recover-password-back-to-login a:hover {
    color: #b91c1c;
    text-decoration: underline;
}

/* ==========================================================================
   PANTALLA 2: VERIFICACIÓN DE CÓDIGO
   ========================================================================== */

#cittapet-recover-code-content {
    background: white;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 25px 50px rgba(0,0,0,0.15);
    max-width: 500px;
    margin: 0 auto;
}

/* Sección superior roja */
.cittapet-recover-verification-header {
    background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%);
    padding: 40px 30px;
    text-align: center;
    color: white;
}

.cittapet-recover-logo-verification {
    width: 120px;
    height: 120px;
    background: rgba(255,255,255,0.9);
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    border: 2px solid rgba(255,255,255,0.3);
    padding: 10px;
}

.cittapet-recover-logo-verification img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

#cittapet-recover-code-title {
    margin: 0 0 15px 0;
    font-size: 24px;
    font-weight: 700;
    letter-spacing: -0.5px;
    color: white;
}

#cittapet-recover-code-description {
    margin: 0 0 25px 0;
    font-size: 16px;
    opacity: 0.95;
    line-height: 1.5;
}

.cittapet-recover-email-box {
    background: rgba(255,255,255,0.15);
    border-radius: 25px;
    padding: 12px 20px;
    font-size: 14px;
    border: 1px solid rgba(255,255,255,0.2);
}

.cittapet-recover-email-box span {
    opacity: 0.8;
}

/* Sección inferior blanca */
.cittapet-recover-verification-body {
    padding: 40px 30px;
    background: white;
}

#cittapet-recover-code-instruction {
    text-align: center;
    margin: 0 0 25px 0;
    font-size: 18px;
    color: #374151;
    font-weight: 600;
}

/* Inputs de código de 4 dígitos */
.cittapet-recover-code-inputs {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin: 0 0 30px 0;
    flex-wrap: wrap;
}

.cittapet-recover-code-digit {
    width: 70px;
    height: 60px;
    border: 3px solid #dc2626;
    border-radius: 12px;
    text-align: center;
    font-size: 18px;
    font-weight: bold;
    color: #374151;
    background: #f9fafb;
    transition: all 0.3s ease;
    outline: none;
}

.cittapet-recover-code-digit:focus {
    background: white;
    box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.2);
    transform: scale(1.05);
}

/* Botones de la pantalla de código */
.cittapet-recover-code-verify {
    width: 100%;
    background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 700;
    /* padding: 15px 30px; */
    margin-bottom: 15px;
    cursor: pointer;
    text-transform: uppercase;
    letter-spacing: 1px;
    box-shadow: 0 4px 15px rgba(220, 38, 38, 0.3);
    transition: all 0.3s ease;
}

.cittapet-recover-code-verify:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(220, 38, 38, 0.4);
}

.cittapet-recover-code-verify:disabled {
    background: #9ca3af;
    cursor: not-allowed;
    transform: none;
}

.cittapet-recover-code-resend {
    width: 100%;
    background: #9ca3af;
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    /* padding: 15px 30px; */
    margin-bottom: 20px;
    cursor: not-allowed;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: all 0.3s ease;
}

.cittapet-recover-code-resend:not(:disabled) {
    background: #dc2626;
    cursor: pointer;
}

.cittapet-recover-code-resend:not(:disabled):hover {
    background: #b91c1c;
    transform: translateY(-1px);
}

/* Mensaje de expiración */
.cittapet-recover-expiry-notice {
    background: #fef3c7;
    border: 1px solid #fbbf24;
    border-radius: 10px;
    padding: 12px 16px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.warning-icon {
    color: #f59e0b;
    font-size: 16px;
}

.expiry-text {
    color: #92400e;
    font-size: 14px;
    font-weight: 500;
}

/* Link de volver */
.cittapet-recover-back-container {
    text-align: center;
}

.cittapet-recover-back-to-email {
    color: #dc2626;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: color 0.3s ease;
}

.cittapet-recover-back-to-email:hover {
    color: #b91c1c;
    text-decoration: underline;
}

/* ==========================================================================
   PANTALLA 3: NUEVA CONTRASEÑA
   ========================================================================== */

#cittapet-recover-password-content {
    background: white;
    border-radius: 20px;
    padding: 40px;
    box-shadow: 0 25px 50px rgba(0,0,0,0.15);
    text-align: center;
}

#cittapet-recover-password-header {
    margin-bottom: 30px;
}

#cittapet-recover-password-logo-container {
    margin-bottom: 25px;
}

#cittapet-recover-password-logo {
    width: 80px;
    height: 80px;
    object-fit: contain;
}

#cittapet-recover-password-title {
    color: #2d3748;
    font-size: 32px;
    font-weight: 700;
    margin: 0 0 10px 0;
    line-height: 1.2;
}

#cittapet-recover-password-subtitle {
    color: #dc2626;
    font-size: 22px;
    font-weight: 600;
    margin: 0 0 15px 0;
    line-height: 1.3;
}

#cittapet-recover-password-description {
    color: #4a5568;
    font-size: 16px;
    line-height: 1.5;
    margin: 0 0 30px 0;
}

/* Campos de contraseña con botón de mostrar/ocultar */
.cittapet-recover-password-input-wrapper {
    position: relative;
}

.cittapet-toggle-password-btn {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    padding: 5px;
    color: #6b7280;
    transition: color 0.3s ease;
}

.cittapet-toggle-password-btn:hover {
    color: #dc2626;
}

/* Eye icon styles - ensuring they work in recover context */
.cittapet-recover-password-input-wrapper .cittapet-eye-icon {
    width: 20px;
    height: 20px;
    display: block;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%236b7280' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M17.94 17.94A10.07 10.07 0 0 1 12 20c-7 0-11-8-11-8a18.45 18.45 0 0 1 5.06-5.94M9.9 4.24A9.12 9.12 0 0 1 12 4c7 0 11 8 11 8a18.5 18.5 0 0 1-2.16 3.19m-6.72-1.07a3 3 0 1 1-4.24-4.24'%3E%3C/path%3E%3Cline x1='1' y1='1' x2='23' y2='23'%3E%3C/line%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: center;
    background-size: 18px 18px;
    transition: background-image 0.2s ease;
}

.cittapet-recover-password-input-wrapper .cittapet-eye-icon.hide {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%236b7280' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M1 12s4-8 11-8 11 8 11 8-4 8-11 8-11-8-11-8z'%3E%3C/path%3E%3Ccircle cx='12' cy='12' r='3'%3E%3C/circle%3E%3C/svg%3E");
    background-size: 18px 18px;
}



/* ==========================================================================
   MENSAJES DE ERROR Y ÉXITO
   ========================================================================== */

.cittapet-recover-error-message {
    background: #fef2f2;
    border: 1px solid #fca5a5;
    border-radius: 10px;
    padding: 12px 16px;
    margin-bottom: 15px;
    color: #dc2626;
    font-size: 14px;
    font-weight: 500;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.cittapet-recover-success-message {
    background: #f0fdf4;
    border: 1px solid #86efac;
    border-radius: 10px;
    padding: 12px 16px;
    margin-bottom: 15px;
    color: #166534;
    font-size: 14px;
    font-weight: 500;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.cittapet-recover-code-error-message {
    background: #fef2f2;
    border: 1px solid #fca5a5;
    border-radius: 10px;
    padding: 12px 16px;
    margin-bottom: 15px;
    color: #dc2626;
    font-size: 14px;
    font-weight: 500;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.error-icon {
    color: #ef4444;
    font-size: 16px;
}

/* ==========================================================================
   OVERLAY DE PROCESAMIENTO
   ========================================================================== */

#cittapet-recover-processing-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

.cittapet-recover-processing-content {
    background: white;
    border-radius: 15px;
    padding: 40px;
    text-align: center;
    box-shadow: 0 25px 50px rgba(0,0,0,0.3);
}

.cittapet-recover-processing-spinner {
    width: 50px;
    height: 50px;
    border: 4px solid #f3f4f6;
    border-top: 4px solid #dc2626;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.cittapet-recover-processing-text {
    color: #374151;
    font-size: 16px;
    font-weight: 600;
    margin: 0;
}

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

@media (max-width: 768px) {
    #cittapet-recover-container {
        padding: 10px;
    }
    
    #cittapet-recover-content,
    #cittapet-recover-password-content {
        padding: 30px 20px;
    }
    
    .cittapet-recover-verification-header {
        padding: 30px 20px;
    }
    
    .cittapet-recover-verification-body {
        padding: 30px 20px;
    }
    
    #cittapet-recover-title,
    #cittapet-recover-password-title {
        font-size: 28px;
    }
    
    #cittapet-recover-subtitle,
    #cittapet-recover-password-subtitle {
        font-size: 20px;
    }
    
    .cittapet-recover-code-inputs {
        gap: 8px;
    }
    
    .cittapet-recover-code-digit {
        width: 60px;
        height: 50px;
        font-size: 20px;
    }
    
    .cittapet-recover-logo-verification {
        width: 100px;
        height: 100px;
    }
}

@media (max-width: 480px) {
    .cittapet-recover-code-inputs {
        gap: 6px;
    }
    
    #cittapet-recover-code-title {
        font-size: 22px;
    }
    
    #cittapet-recover-code-description {
        font-size: 14px;
    }
}

/* ==========================================================================
   ANIMACIONES ADICIONALES
   ========================================================================== */

.cittapet-recover-screen {
    opacity: 0;
    transition: opacity 0.3s ease;
}

.cittapet-recover-screen.active {
    opacity: 1;
}

/* Animación de shake para errores */
@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}

.cittapet-recover-error-message.shake {
    animation: shake 0.5s ease-in-out;
}

/* Estados de carga */
.cittapet-recover-field-container.loading input {
    background: #f1f5f9;
    cursor: wait;
}

/* Focus states mejorados */
.cittapet-recover-code-digit:focus {
    border-color: #dc2626;
    box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.2);
}

/* Estados hover para elementos interactivos */
.cittapet-recover-code-digit:hover {
    border-color: #ef4444;
}

/* Transiciones suaves para cambios de pantalla */
.cittapet-recover-screen-transition {
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}