/* =================================
   ESTILOS UNIFICADOS AUTENTICACIÓN
   GesYoga - Vistas de Login/Auth
   ================================= */

/* =============
   LOGO DE SEDE
   ============= */
.auth-logo-container {
    margin-bottom: 1rem;
}

.auth-logo {
    max-height: 80px;
    border-radius: 5px;
    object-fit: contain;
    width: auto;
    height: auto;
}

/* ===============================
   SISTEMA DE ALERTAS UNIFICADO
   =============================== */
.auth-alert {
    display: flex;
    align-items: flex-start;
    padding: 0.75rem;
    border-radius: 8px;
    border: 1px solid;
    position: relative;
}

.auth-alert-icon {
    margin-right: 0.75rem;
    margin-top: 0.125rem;
    font-size: 1.1rem;
    flex-shrink: 0;
}

.auth-alert-content {
    flex: 1;
}

/* Alertas por tipo - Compatible con Bootstrap y estilos existentes */
.alert-success {
    background-color: #d4edda;
    border-color: #c3e6cb;
    color: #155724;
}

.alert-danger {
    background-color: #f8d7da;
    border-color: #f5c6cb;
    color: #721c24;
}

.alert-warning {
    background-color: #fff3cd;
    border-color: #ffeaa7;
    color: #856404;
}

.alert-info {
    background-color: #d1ecf1;
    border-color: #bee5eb;
    color: #0c5460;
}

/* Botón de cerrar para alertas dismissible */
.auth-alert .btn-close {
    background: none;
    border: none;
    font-size: 1.2rem;
    opacity: 0.7;
    cursor: pointer;
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    padding: 0.25rem;
}

.auth-alert .btn-close:hover {
    opacity: 1;
}

.alert-danger .btn-close {
    color: #721c24;
}

.alert-success .btn-close {
    color: #0f5132;
}

.alert-warning .btn-close {
    color: #856404;
}

.alert-info .btn-close {
    color: #0c5460;
}

/* ===============================
   INDICADOR DE FORTALEZA PASSWORD
   =============================== */
.password-strength {
    margin-top: 10px;
}

.strength-meter {
    height: 4px;
    background-color: #e9ecef;
    border-radius: 2px;
    overflow: hidden;
    margin-bottom: 5px;
}

.strength-meter-fill {
    height: 100%;
    width: 0%;
    transition: all 0.3s ease;
    border-radius: 2px;
}

.strength-text {
    font-size: 12px;
    font-weight: 500;
}

/* Colores para diferentes niveles de fortaleza */
.strength-meter-fill.weak {
    background-color: #dc3545;
}

.strength-meter-fill.medium {
    background-color: #ffc107;
}

.strength-meter-fill.strong {
    background-color: #28a745;
}

/* ===============================
   ESTRUCTURA DE PÁGINA AUTH
   =============================== */
.auth-page {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.auth-content {
    flex: 1;
}

/* ===============================
   EFECTOS Y ANIMACIONES
   =============================== */
.auth-alert {
    animation: slideInDown 0.3s ease-out;
}

@keyframes slideInDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Efecto hover suave para tarjetas */
.card-style:hover {
    transform: translateY(-1px);
    transition: transform 0.2s ease;
}

/* ===============================
   COMPATIBILIDAD CON ESTILOS EXISTENTES
   =============================== */

/* Mantenemos compatibilidad con las clases existentes del tema */
.opacity-70 { opacity: 0.7; }
.opacity-80 { opacity: 0.8; }
.opacity-90 { opacity: 0.9; }

.me-2 { margin-right: 0.5rem; }
.mt-2 { margin-top: 0.5rem; }
.mb-0 { margin-bottom: 0; }

/* ===============================
   RESPONSIVE DESIGN
   =============================== */
@media (max-width: 576px) {
    .auth-logo {
        max-height: 60px;
    }
    
    .auth-alert {
        padding: 0.5rem;
        font-size: 0.9rem;
    }
    
    .auth-alert-icon {
        font-size: 1rem;
        margin-right: 0.5rem;
    }
    
    .auth-alert .btn-close {
        font-size: 1rem;
        top: 0.25rem;
        right: 0.25rem;
    }
}

@media (max-width: 480px) {
    .auth-logo {
        max-height: 50px;
    }
    
    .auth-alert {
        padding: 0.4rem;
        font-size: 0.8rem;
    }
}

/* ===============================
   UTILIDADES ADICIONALES
   =============================== */

/* Espaciado consistente */
.auth-spacing {
    margin-bottom: 1.5rem;
}

/* Colores de estado consistentes con el tema */
.auth-success { color: #28a745; }
.auth-danger { color: #dc3545; }
.auth-warning { color: #ffc107; }
.auth-info { color: #17a2b8; }

/* Estado loading/disabled */
.auth-loading {
    opacity: 0.6;
    pointer-events: none;
    position: relative;
}

.auth-loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid #3498db;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

/* ===============================
   COUNTDOWN TIMER SPECIFIC
   =============================== */
.countdown-timer {
    font-size: 1.25rem;
    font-weight: 600;
    color: #ffffff;
    text-shadow: 0 1px 2px rgba(0,0,0,0.3);
}

/* Animación pulsante para countdown crítico */
.countdown-timer.critical {
    animation: pulse 1s infinite;
    color: #ff4444;
}

@keyframes pulse {
    0% { opacity: 1; }
    50% { opacity: 0.5; }
    100% { opacity: 1; }
}

/* Mejoras para las tarjetas de información */
.card.bg-theme {
    background: linear-gradient(135deg, #007bff 0%, #0056b3 100%);
}

.card.bg-highlight {
    background: linear-gradient(135deg, #28a745 0%, #1e7e34 100%);
}

/* ===============================
   REQUISITOS DE CONTRASEÑA
   =============================== */

/* NOTA: Usando clases nativas de la plantilla:
 * - .icon-list para listas con iconos
 * - .color-green-light y .color-red-light para colores
 * - .card-style y .bg-highlight para cards
 * No se requiere CSS personalizado adicional.
 */

/* ===============================
   TOGGLE PASSWORD Y VALIDACIÓN
   =============================== */

/* Icono del candado - Mantener posición fija siempre */
.input-style.has-icon > i.fa-lock,
.input-style.has-icon > i:first-child {
	position: absolute !important;
	top: 22px !important;
	left: 0 !important;
	pointer-events: none;
	line-height: 1;
}

/* Toggle Password Icon (ojo para mostrar/ocultar) */
.toggle-password {
	position: absolute;
	top: 20px;
	right: 30px;
	cursor: pointer;
	font-size: 15px;
	color: #6c757d;
	transition: color 0.2s ease;
	z-index: 5;
	pointer-events: all;
	line-height: 1;
}

.toggle-password:hover {
	color: #DA4453;
}

/* Validation Icons - Reposicionados y simplificados */
.input-style .validation-icon {
	position: absolute;
	top: 22px;
	right: 12px;
	pointer-events: none;
	font-size: 15px;
	z-index: 4;
	line-height: 1;
}

/* Asegurar que solo se muestre un icono a la vez */
.input-style .validation-icon.disabled {
	display: none !important;
	opacity: 0;
	visibility: hidden;
}

.input-style .validation-icon:not(.disabled) {
	display: inline-block !important;
	opacity: 1;
	visibility: visible;
}

/* Helper Text - Reposicionado debajo del input */
.input-style .input-helper-text {
	position: relative;
	display: block;
	margin-top: -8px;
	margin-bottom: 8px;
	font-size: 10px;
	font-style: normal;
	opacity: 0.5;
	text-align: right;
	pointer-events: none;
}

/* Ocultar el <em> por defecto si no tiene la clase específica */
.input-style em:not(.input-helper-text) {
	display: none !important;
}

/* Ajustes para inputs con iconos */
.input-style.has-icon .toggle-password {
	right: 30px;
}

.input-style.has-icon .validation-icon {
	right: 12px;
}

/* Alineación vertical perfecta para iconos */
.input-style .fa-times,
.input-style .fa-check,
.input-style .fa-eye,
.input-style .fa-eye-slash {
	line-height: 1;
	vertical-align: middle;
}

/* Tema oscuro - ajustes */
.theme-dark .toggle-password {
	color: #adb5bd;
}

.theme-dark .toggle-password:hover {
	color: #ED5565;
}