/* IRS Basquet - Estilos del Login - Actualizado 31/08/2025 9:56 AM - Espaciado mejorado */

/* Asegurar que el login se vea siempre */
#irs-basquet-login-container {
    min-height: 100vh !important; /* Pantalla completa sin admin bar */
    height: 100vh !important;
    background: linear-gradient(135deg, var(--accent-orange), var(--accent-yellow), var(--accent-gold)) !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    padding: 20px 20px; /* Reducido padding vertical */
    position: fixed !important;
    top: 0 !important; /* Sin espacio para admin bar */
    left: 0 !important;
    width: 100% !important;
    z-index: 999999 !important; /* Z-index alto */
    visibility: visible !important;
    opacity: 1 !important;
    margin: 0 !important;
    border: none !important;
}

/* Ajustes para móviles - pantalla completa */
@media screen and (max-width: 782px) {
    #irs-basquet-login-container {
        top: 0 !important;
        height: 100vh !important;
        min-height: 100vh !important;
        padding: 15px 15px; /* Padding aún más reducido en móviles */
    }
}

/* Siempre usar pantalla completa */
#irs-basquet-login-container {
    top: 0 !important;
    height: 100vh !important;
    min-height: 100vh !important;
}

#irs-basquet-login-container .irs-login-wrapper {
    width: 45% !important; /* Ligeramente más estrecho */
    max-width: 420px !important; /* Más compacto */
    min-width: 320px !important; /* Menor ancho mínimo */
    margin: 0 auto !important;
}

#irs-basquet-login-container .irs-login-card {
    background: rgba(255, 255, 255, 0.97); /* Ligeramente más opaco */
    border-radius: 16px; /* Bordes menos redondeados */
    padding: 24px 28px !important; /* Padding más compacto */
    margin: 0 10% !important; /* Menos margen lateral */
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.12), 0 2px 6px rgba(0, 0, 0, 0.08); /* Sombra más elegante */
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    animation: slideIn 0.5s ease-out;
    text-align: center;
}

.irs-login-wrapper {
    width: 45% !important;
    max-width: 420px !important;
    min-width: 320px !important;
    margin: 0 auto !important;
}

.irs-login-card {
    background: rgba(255, 255, 255, 0.97);
    border-radius: 16px;
    padding: 24px 28px !important; /* Más compacto */
    margin: 0 10% !important;
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.12), 0 2px 6px rgba(0, 0, 0, 0.08);
    backdrop-filter: blur(12px); /* Más blur para efecto premium */
    border: 1px solid rgba(255, 255, 255, 0.3); /* Borde más visible */
    animation: slideIn 0.4s cubic-bezier(0.4, 0, 0.2, 1); /* Animación más suave */
    text-align: center;
}

.irs-login-header {
    text-align: center;
    margin-bottom: 20px; /* Aumentado ligeramente para mejor espaciado */
}

.irs-logo {
    font-size: 3rem; /* Reducido de 4rem */
    margin-bottom: 8px; /* Más espaciado */
}

.irs-logo-img {
    max-width: 100px !important; /* Más compacto */
    width: 100px !important;
    height: auto !important;
    display: block !important;
    margin: 0 auto 10px auto !important; /* Margen inferior agregado */
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.1)); /* Sombra sutil */
}

/* Estilo más específico para forzar el tamaño */
.irs-login-header .irs-logo .irs-logo-img {
    max-width: 130px !important;
    width: 130px !important;
    height: auto !important;
}

@keyframes bounce {
    0%, 100% { 
        transform: translateY(0); 
    }
    50% { 
        transform: translateY(-10px); 
    }
}

.irs-login-header h1 {
    color: var(--accent-orange);
    font-size: 1.8rem; /* Más compacto */
    font-weight: 700; /* Más moderno */
    margin: 0 0 8px 0;
    text-shadow: none; /* Removida sombra para look más limpio */
    letter-spacing: 1px; /* Menos espaciado */
    background: linear-gradient(135deg, var(--accent-orange), var(--accent-yellow));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.irs-login-header p {
    color: #5f6368; /* Gris más profesional */
    margin: 0 0 16px 0; /* Margen inferior agregado */
    font-size: 0.9rem; /* Ligeramente más pequeño */
    font-weight: 400; /* Peso normal */
    opacity: 0.8; /* Sutil transparencia */
}

/* Formulario */
#irs-basquet-login-container .irs-login-form {
    margin-bottom: 20px !important; /* Más compacto */
}

#irs-basquet-login-container .form-group {
    margin-bottom: 16px !important; /* Espaciado optimizado */
}

.irs-login-form {
    margin-bottom: 20px;
}

.form-group {
    margin-bottom: 16px;
}

.form-group label {
    display: block;
    margin-bottom: 6px; /* Reducido */
    color: #374151; /* Gris más moderno */
    font-weight: 500; /* Menos bold */
    font-size: 13px; /* Ligeramente más pequeño */
    text-transform: uppercase;
    letter-spacing: 0.5px;
    opacity: 0.9;
}

.form-group input {
    width: 100%;
    padding: 14px 16px !important; /* Más compacto */
    border: 1.5px solid #e5e7eb; /* Borde más sutil */
    border-radius: 8px; /* Menos redondeado, más moderno */
    font-size: 15px; /* Ligeramente más pequeño */
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1); /* Transición más suave */
    box-sizing: border-box;
    background: rgba(255, 255, 255, 0.95);
    color: #374151;
    font-weight: 400;
}

.form-group input:focus {
    outline: none;
    border-color: var(--accent-orange);
    box-shadow: 0 0 0 3px rgba(255, 107, 53, 0.08); /* Sombra más sutil */
    background: white;
    transform: translateY(-1px); /* Efecto lift sutil */
}

.form-group input:hover {
    border-color: #d1d5db; /* Hover más sutil */
    background: white;
}

/* Reglas específicas para asegurar padding correcto */
#irs-basquet-login-container .form-group input {
    padding: 14px 16px !important;
}

#irs-basquet-login-container .password-input-wrapper input {
    padding: 14px 45px 14px 16px !important; /* Menos padding, más compacto */
}

/* Contenedor de contraseña con ojo */
.password-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.password-input-wrapper input {
    padding-right: 55px !important; /* Más espacio para el botón del ojo */
}

.password-toggle {
    position: absolute;
    right: 10px; /* Más cerca del borde */
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px; /* Más compacto */
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    color: #6b7280; /* Gris más moderno */
    z-index: 10;
}

.password-toggle:hover {
    background: rgba(255, 107, 53, 0.08); /* Más sutil */
    color: var(--accent-orange);
    transform: translateY(-50%) scale(1.05); /* Efecto de escala */
}

.password-toggle:focus {
    outline: none;
    background: rgba(255, 107, 53, 0.12);
    color: var(--accent-orange);
}

.eye-icon {
    width: 20px;
    height: 20px;
    transition: all 0.3s ease;
}

.password-toggle:hover .eye-icon {
    transform: scale(1.1);
}

/* Botón de login - FORZAR APLICACIÓN */
body #irs-basquet-login-container .irs-login-btn {
    width: 100%;
    padding: 12px 24px !important; /* Más compacto */
    background: linear-gradient(135deg, var(--accent-orange) 0%, var(--accent-yellow) 100%) !important;
    color: white;
    border: none;
    border-radius: 8px; /* Menos redondeado, más moderno */
    font-size: 15px; /* Ligeramente más pequeño */
    font-weight: 600; /* Menos bold */
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    line-height: 1.2;
    height: auto !important;
    min-height: auto !important;
    box-shadow: 0 2px 8px rgba(255, 107, 53, 0.25); /* Sombra elegante */
    letter-spacing: 0.5px; /* Espaciado de letras */
}

#irs-basquet-login-container .irs-login-btn {
    width: 100%;
    padding: 12px 24px !important;
    background: linear-gradient(135deg, var(--accent-orange) 0%, var(--accent-yellow) 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    line-height: 1.2;
}

.irs-login-btn {
    width: 100%;
    padding: 12px 24px !important;
    background: linear-gradient(135deg, var(--accent-orange) 0%, var(--accent-yellow) 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    line-height: 1.2;
    box-shadow: 0 2px 8px rgba(255, 107, 53, 0.25);
    letter-spacing: 0.5px;
}

.irs-login-btn:hover {
    transform: translateY(-1px); /* Efecto más sutil */
    box-shadow: 0 4px 16px rgba(255, 107, 53, 0.35);
    background: linear-gradient(135deg, var(--accent-yellow) 0%, var(--accent-orange) 100%); /* Gradiente invertido */
}

.irs-login-btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(255, 107, 53, 0.25);
}

.irs-login-btn.loading {
    pointer-events: none;
}

.irs-login-btn.loading .btn-text {
    opacity: 0;
}

.irs-login-btn.loading .btn-loading {
    opacity: 1;
}

.btn-loading {
    opacity: 0;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    transition: opacity 0.3s ease;
}

/* Mensajes */
.login-message {
    margin-top: 15px;
    padding: 12px;
    border-radius: 8px;
    text-align: center;
    font-weight: 500;
    display: none;
    animation: fadeIn 0.3s ease-out;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.login-message.error {
    background: rgba(220, 53, 69, 0.1);
    color: #dc3545;
    border: 1px solid rgba(220, 53, 69, 0.3);
}

.login-message.success {
    background: rgba(40, 167, 69, 0.1);
    color: #28a745;
    border: 1px solid rgba(40, 167, 69, 0.3);
}

/* Footer */
.irs-login-footer {
    margin-top: 20px; /* Más compacto */
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px; /* Gap más pequeño */
}

.cdo-logo-container {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 2px; /* Menos margen */
}

.cdo-logo {
    height: 28px; /* Más pequeño */
    width: auto;
    max-width: 85px; /* Más compacto */
    object-fit: contain;
    opacity: 0.7; /* Más sutil */
    transition: opacity 0.25s ease;
    filter: brightness(0.85);
}

.cdo-logo:hover {
    opacity: 0.9; /* No tan prominente en hover */
    filter: brightness(1);
}

.company-text {
    color: #9ca3af; /* Gris más moderno */
    font-size: 10px; /* Más pequeño */
    font-weight: 400;
    margin: 0;
    letter-spacing: 0.3px;
    opacity: 0.75;
    font-style: italic;
}

/* Responsividad */
@media (min-width: 1200px) {
    .irs-login-wrapper {
        width: 45% !important;
        max-width: 600px !important;
    }
    
    .irs-login-card {
        padding: 55px 45px !important;
        margin: 0 18% !important;
    }
}

@media (min-width: 768px) and (max-width: 1199px) {
    .irs-login-wrapper {
        width: 55% !important;
        max-width: 520px !important;
    }
    
    .irs-login-card {
        padding: 50px 40px !important;
        margin: 0 15% !important;
    }
}

@media (max-width: 767px) {
    .irs-login-wrapper {
        width: 90% !important;
        max-width: none !important;
        min-width: 320px !important;
    }
    
    .irs-login-card {
        padding: 40px 30px !important;
        margin: 0 10% !important;
    }
    
    /* Ajustes para el toggle de contraseña en móviles */
    .password-toggle {
        right: 10px;
        padding: 8px;
    }
    
    .eye-icon {
        width: 22px;
        height: 22px;
    }
    
    .password-input-wrapper input {
        padding-right: 55px !important; /* Más espacio en móviles */
    }
}

@media (max-width: 480px) {
    #irs-basquet-login-container {
        padding: 15px;
    }
    
    .irs-login-wrapper {
        width: 95% !important;
        max-width: none !important;
        min-width: 300px !important;
    }
    
    .irs-login-card {
        padding: 18px 25px !important;
        border-radius: 15px;
        margin: 0 5% !important;
    }
    
    .irs-logo {
        font-size: 3rem;
    }
    
    .irs-logo-img {
        max-width: 105px !important;
        width: 105px !important;
    }
    
    .irs-login-header h1 {
        font-size: 1.8rem;
    }
    
    .form-group input {
        padding: 16px 20px !important;
        font-size: 16px; /* Evita zoom en iOS */
    }
}

/* Loading spinner */
.btn-loading::after {
    content: '';
    width: 16px;
    height: 16px;
    margin: 0 0 0 8px;
    border: 2px solid transparent;
    border-top-color: currentColor;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    display: inline-block;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* ========================================
   ESTILOS PARA ENLACE DE RECUPERACIÓN
   ======================================== */

.forgot-password-link {
    text-align: center;
    margin: 20px 0 10px 0;
}

.forgot-password-link a {
    color: #e8751a;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: color 0.3s ease;
}

.forgot-password-link a:hover {
    color: #d45f00;
    text-decoration: underline;
}

/* REGLAS FINALES PARA FORZAR PADDING - MÁXIMA ESPECIFICIDAD */
body #irs-basquet-login-container .irs-login-card .irs-login-form .form-group input {
    padding: 14px 16px !important; /* Compacto */
    box-sizing: border-box !important;
}

body #irs-basquet-login-container .irs-login-card .irs-login-form .form-group .password-input-wrapper input {
    padding: 14px 45px 14px 16px !important; /* Compacto */
    box-sizing: border-box !important;
}

/* Mejoras responsivas para móviles */
@media screen and (max-width: 480px) {
    .irs-login-wrapper {
        width: 90% !important;
        min-width: 280px !important;
    }
    
    .irs-login-card {
        padding: 20px 20px !important;
        margin: 0 5% !important;
        border-radius: 12px;
    }
    
    .irs-logo-img {
        max-width: 80px !important;
        width: 80px !important;
    }
    
    .irs-login-header h1 {
        font-size: 1.6rem;
    }
    
    body #irs-basquet-login-container .irs-login-card .irs-login-form .form-group input {
        padding: 12px 14px !important;
        font-size: 16px; /* Evitar zoom en iOS */
    }
    
    body #irs-basquet-login-container .irs-login-card .irs-login-form .form-group .password-input-wrapper input {
        padding: 12px 40px 12px 14px !important;
    }
}
