/* ========================================
   ESTILOS ESPECÍFICOS DE PASSWORD RESET CONFIRM
   ======================================== */

/* Animación del icono de error */
.error-icon {
    animation: errorShake 0.5s ease-in-out;
}

@keyframes errorShake {
    0%, 20%, 50%, 80%, 100% { transform: translateX(0); }
    10% { transform: translateX(-5px); }
    30% { transform: translateX(5px); }
    60% { transform: translateX(-3px); }
    90% { transform: translateX(3px); }
}

/* Animación del icono principal */
@keyframes iconPulse {
    0% { 
        transform: scale(1);
        filter: drop-shadow(0 0 10px rgba(93, 118, 139, 0.3));
    }
    100% { 
        transform: scale(1.05);
        filter: drop-shadow(0 0 20px rgba(93, 118, 139, 0.5));
    }
}

.animate-iconPulse {
    animation: iconPulse 2s ease-in-out infinite alternate;
}

/* Efectos especiales para botones */
.reset-submit-btn::before,
a[href*="password_reset"]::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.5s;
    z-index: 1;
}

.reset-submit-btn:hover::before,
a[href*="password_reset"]:hover::before {
    left: 100%;
}

.reset-submit-btn:hover,
a[href*="password_reset"]:hover {
    filter: brightness(1.05);
    transform: translateY(-2px);
}

.reset-submit-btn:active,
a[href*="password_reset"]:active {
    transform: translateY(0);
}

.reset-submit-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none !important;
}

.reset-submit-btn:disabled::before {
    display: none;
}

/* Efecto de línea de enfoque para inputs */
.input-focus-line {
    transform-origin: center;
}

/* Estados de validación para inputs de contraseña */
input[type="password"]:valid:not(:placeholder-shown) {
    border-color: #28A745 !important;
}

input[type="password"]:invalid:not(:placeholder-shown) {
    border-color: #DC3545 !important;
    animation: shake 0.5s ease-in-out;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}

/* Animación para mensajes de error */
@keyframes slideInError {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-slideInError {
    animation: slideInError 0.4s ease-out;
}

/* Efectos de hover para inputs */
input:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(93, 118, 139, 0.1);
}

input:focus {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(93, 118, 139, 0.15);
}

/* Botones de toggle de contraseña */
.password-toggle:focus {
    outline: 2px solid #5D768B;
    outline-offset: 2px;
    border-radius: 4px;
}

.password-toggle:active {
    transform: translateY(-50%) scale(0.95);
}

/* Efecto de gradiente animado para el divisor */
.w-20.h-0\.5.bg-gradient-to-r {
    animation: shimmerLine 3s ease-in-out infinite;
}

@keyframes shimmerLine {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.6; transform: scaleX(1.1); }
}

/* Animación del fondo de información de contraseña */
.password-strength-info {
    background-size: 200% 200%;
    animation: gradientShift 4s ease-in-out infinite;
}

@keyframes gradientShift {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

/* Efectos de hover para elementos de la lista de requisitos */
.password-strength-info li {
    transition: all 0.3s ease;
    position: relative;
    padding-left: 0.5rem;
}

.password-strength-info li:hover {
    transform: translateX(4px);
    color: #5D768B;
}

.password-strength-info li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 3px;
    height: 0;
    background: #C8B39B;
    transition: height 0.3s ease;
}

.password-strength-info li:hover::before {
    height: 100%;
}

/* Spinner de carga */
.loading-spinner {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid #ffffff;
    border-radius: 50%;
    border-top-color: transparent;
    animation: spin 0.8s ease-in-out infinite;
}

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

/* Animaciones de entrada para elementos */
.form-field-group,
.form-submit-section,
.password-strength-info,
.error-content {
    transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Efecto de respiración para el emoji en error */
.text-5xl {
    animation: breathe 3s ease-in-out infinite;
}

@keyframes breathe {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

/* Estados de focus mejorados para accesibilidad */
button:focus,
input:focus,
a:focus {
    outline: 2px solid #5D768B;
    outline-offset: 2px;
    z-index: 10;
    position: relative;
}

/* Efectos especiales para el contenedor de error */
.bg-gradient-to-br.from-error\/5.to-error\/10 {
    position: relative;
    overflow: hidden;
}

.bg-gradient-to-br.from-error\/5.to-error\/10::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(220, 53, 69, 0.1) 0%, transparent 70%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.bg-gradient-to-br.from-error\/5.to-error\/10:hover::before {
    opacity: 1;
}

/* Mejoras de transición para todos los elementos interactivos */
.transition-all {
    transition-property: all;
    transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
}

/* Responsive enhancements */
@media (max-width: 768px) {
    .reset-submit-btn,
    a[href*="password_reset"] {
        padding: 1rem 2rem;
        font-size: 1rem;
    }
    
    input {
        padding: 1rem;
        font-size: 1rem;
    }
    
    .text-3xl {
        font-size: 1.75rem !important;
    }

    .password-strength-info {
        margin: 1rem 0;
        padding: 0.75rem;
    }

    .password-strength-info li {
        font-size: 0.8rem;
    }
}

@media (max-width: 480px) {
    .reset-submit-btn,
    a[href*="password_reset"] {
        padding: 0.875rem 1.5rem;
        font-size: 0.95rem;
    }
    
    input {
        padding: 0.875rem;
        font-size: 0.95rem;
    }
    
    .text-3xl {
        font-size: 1.5rem !important;
    }
    
    .w-14.h-14 {
        width: 3rem !important;
        height: 3rem !important;
    }

    .text-5xl {
        font-size: 2.5rem !important;
    }
}

/* Modo de contraste alto */
@media (prefers-contrast: high) {
    input {
        border-width: 3px !important;
    }
    
    .reset-submit-btn,
    a[href*="password_reset"] {
        border: 2px solid currentColor !important;
    }
    
    .bg-gradient-to-r {
        background: #5D768B !important;
    }

    .password-strength-info {
        border-left-width: 6px !important;
    }
}

/* Modo reducción de movimiento */
@media (prefers-reduced-motion: reduce) {
    .animate-iconPulse,
    .error-icon,
    .text-5xl,
    .w-20.h-0\.5.bg-gradient-to-r,
    .password-strength-info {
        animation: none !important;
    }

    .password-strength-info li:hover {
        transform: none !important;
    }

    *,
    *::before,
    *::after {
        transition-duration: 0.01ms !important;
    }
}

/* Efectos de loading específicos */
.reset-submit-btn.loading {
    pointer-events: none;
    opacity: 0.8;
}

.reset-submit-btn.loading::before {
    display: none;
}

/* Efecto de éxito cuando se cambia la contraseña */
.reset-submit-btn.success {
    background: linear-gradient(135deg, #28A745, #20C997) !important;
    animation: successPulse 0.6s ease-out;
}

@keyframes successPulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

/* Mejoras visuales para SVG */
svg path {
    transition: fill 0.3s ease;
}

.animate-iconPulse:hover svg path {
    fill: #4a6375;
}

.error-icon:hover svg path {
    fill: #b91c2c;
}

/* Validación visual mejorada para contraseñas que coinciden */
input[data-match="true"] {
    border-color: #28A745 !important;
    box-shadow: 0 0 0 3px rgba(40, 167, 69, 0.1) !important;
}

input[data-match="false"] {
    border-color: #DC3545 !important;
    box-shadow: 0 0 0 3px rgba(220, 53, 69, 0.1) !important;
}