/* Prevenir scroll desde el inicio */
html,
body {
    overflow: hidden !important;
    height: 100vh;
}

/* Reseteo básico */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    overflow-y: hidden !important;
}

body {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    margin: 0;
    background: #f5f7fa;
    overflow-x: hidden;
}

body.halloween-bg {
    background: none;
    position: relative;
    min-height: 100vh;
}

body.halloween-bg::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: -2;
    background-image: url('../../img/fondonostalgico.png');
    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;
    background-attachment: fixed;
    background-color: rgba(241, 241, 241, 0.5);
}

/* 
   @media (width <=768px) {
       body.halloween-bg::before {
         background-image: url('<?= base_url_template(' /assets/img/fondomobile.png') ?>');
       }
   }*/

/* MAIN - AJUSTADO PARA ESPACIADO CORRECTO */
.main {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 1rem;
    padding-bottom: 100px;
    /* Espacio para el footer */
    min-height: calc(100vh - 70px);
}

/* --- INICIO: CÓDIGO DEFINITIVO PARA EL FOOTER --- */
footer.footer-bg {
    background-color: #1C2B36;
    color: #fff;
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    transition: transform 0.4s ease-in-out;
    transform: translateY(calc(100% - 50px));
    box-shadow: 0 -2px 8px rgba(0, 0, 0, 0.3);
    max-height: 85vh;
    display: flex;
    flex-direction: column;
}

footer.footer-bg .footer-content {
    padding: 15px 20px;
    overflow-y: auto;
    flex: 1;
}

#footer-toggle-btn {
    position: fixed;
    left: 50%;
    transform: translateX(-50%);
    bottom: 50px;
    background-color: #1C2B36;
    color: #fff;
    border: none;
    border-radius: 10px 10px 0 0;
    padding: 6px 14px;
    cursor: pointer;
    z-index: 1100;
    transition: bottom 0.4s ease-in-out;
}

.is-bouncing {
    animation: bounceArrow 4s infinite;
}

#footer-toggle-btn i {
    font-size: 16px;
}

@keyframes bounceArrow {

    0%,
    20%,
    50%,
    80%,
    100% {
        transform: translateX(-50%) translateY(0);
    }

    40% {
        transform: translateX(-50%) translateY(-8px);
    }

    60% {
        transform: translateX(-50%) translateY(-4px);
    }
}

/* CARD AUTH - CORREGIDO PARA EVITAR QUE TOQUE EL FOOTER */
.card.auth-card {
    position: relative;
    margin: 0 auto;
    border-radius: 15px;
    padding: 1.5rem 2.5rem;
    transition: all 0.3s ease, max-width 0.4s ease-out;
    z-index: 1;
    max-width: 550px;
    width: 100%;
    overflow: hidden;
    background: rgba(28, 40, 54, 0.3);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    /* ALTURA MÁXIMA PARA QUE NO TOQUE EL FOOTER */
    max-height: calc(100vh - 180px);
}

.card.auth-card.recharge-view-active {
    max-width: 800px;
    max-height: calc(100vh - 180px);
}

/* CARD BODY CON SCROLL INTERNO */
/* Forzar sin scroll durante la carga */
.card.auth-card .card-body {
    max-height: calc(100vh - 240px);
    overflow: hidden !important;
    /* Más agresivo */
    overflow-x: hidden !important;
    -webkit-overflow-scrolling: touch;
}

/* Solo cuando realmente se necesite Y esté cargado */
.card.auth-card .card-body.has-scroll.loaded {
    overflow-y: auto !important;
}

/* Estilos del scrollbar */
.card.auth-card .card-body::-webkit-scrollbar {
    width: 8px;
}

.card.auth-card .card-body::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
}

.card.auth-card .card-body::-webkit-scrollbar-thumb {
    background: rgba(52, 152, 219, 0.5);
    border-radius: 10px;
}

.card.auth-card .card-body::-webkit-scrollbar-thumb:hover {
    background: rgba(52, 152, 219, 0.7);
}

/* Pseudo-elemento para la animación de borde */
.card.auth-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border-radius: 15px;
    pointer-events: none;
    z-index: -1;
    box-shadow: 0 0 0 0 rgba(52, 152, 219, 0.6);
    animation: pulseBorder 2s ease-in-out infinite;
}

.recargaF {
    color: #ffd000 !important;
}

@keyframes pulseBorder {
    0% {
        box-shadow: 0 0 0 0 rgba(52, 152, 219, 0.6);
    }

    50% {
        box-shadow: 0 0 15px 5px rgba(52, 152, 219, 0.3);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(52, 152, 219, 0.6);
    }
}

.invalid-feedback {
    position: absolute;
    margin-bottom: 10px;
    color: #ffc400 !important;
}

.mayus {
    color: #ffc400 !important;
}

.form-icon-container {
    position: relative;
}

.clear-phone-input {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    cursor: pointer;
    color: #aab7c4;
    font-size: 1.2em;
    display: none;
    z-index: 2;
}

.elegant-input {
    width: 100%;
    padding: 1rem 0 0.5rem 0;
    border: none;
    border-bottom: 1px solid #e1e1e1;
    background: transparent;
    font-size: 1rem;
    font-weight: 300;
    color: #ffffffff;
    transition: all 0.3s ease;
    outline: none;
}

.elegant-input:focus {
    border-bottom-color: #FFFFFF;
}

.elegant-label {
    display: block;
    margin-bottom: 5px;
    color: #FFFFFF;
    font-weight: 300;
    transition: all 0.3s ease;
    pointer-events: none;
}

.brand-icon {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, #3498DB, #3498DB);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.social-icon {
    width: 40px;
    height: 40px;
    background-color: #374151;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    text-decoration: none;
}

.social-icon:hover {
    background-color: rgb(255, 255, 255);
    transform: translateY(-2px);
}

.social-icon i {
    color: #d1d5db;
    transition: color 0.3s ease;
}

.social-icon:hover i {
    color: white;
}

.footer-link {
    color: #d1d5db;
    text-decoration: none;
    font-weight: 300;
    transition: color 0.3s ease;
}

.footer-link:hover {
    color: white;
}

.footer-heading {
    color: white;
    font-weight: 500;
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 1.5rem;
}

.brand-text {
    color: white;
    font-weight: 300;
    font-size: 2rem;
    margin-bottom: 0;
}

.brand-description {
    color: #d1d5db;
    font-weight: 300;
    line-height: 1.6;
}

.contact-text {
    color: #d1d5db;
    font-weight: 300;
}

.contact-text small {
    color: #9ca3af;
}

.copyright-text {
    color: #9ca3af;
    font-weight: 300;
    font-size: 0.875rem;
}

.main-content {
    background: white;
    border-radius: 16px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    border: 1px solid #e5e7eb;
}

.main-title {
    font-weight: 300;
    color: #111827;
}

.main-subtitle {
    color: #6b7280;
    font-weight: 300;
}

nav {
    width: 100vw;
    left: 0;
    right: 0;
    background: transparent !important;

}

.logoCompu {
    width: 180px !important;
    max-width: 260px !important;
}

.mayus {
    margin: 0, auto;
}

.logo-cel {
    width: 180px !important;
    max-width: 260px !important;
}

/* Contenedor para el logo */
.logo-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 200px;
    background-color: #f0f0f0;
}

/* El fondo (overlay) semitransparente */
.new-loader-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: transparent;
    z-index: 9998;
}

/* El contenedor del logo y el texto "Cargando..." */
.loading-container {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 9999;
    /* Encima de todo */
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}


.b-loader-wrapper {
    position: relative;
    width: 120px;
    height: 120px;
    display: flex;
    justify-content: center;
    align-items: center;
    perspective: 500px;
    transform-style: preserve-3d;
}

.b-loader-svg {
    width: 90px;
    /* Ajusta el tamaño de tu logo */
    height: 90px;
    overflow: visible;
    position: relative;
    z-index: 2;
    transform: translateZ(25px);
    animation: pulse-b 1.2s infinite ease-in-out;
}


/* 1. Arreglamos el color: Tu 'B' (cls-2) ahora es azul */
.b-loader-svg .cls-2 {
    fill: #23a0db;
}

/* 2. Aplicamos AMBAS animaciones al anillo */
.b-loader-ring {
    position: absolute;
    top: 0;
    left: -5px;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    border: 5px solid rgba(77, 60, 231, 0.2);
    border-top-color: #23a0db;
    box-shadow: 0 0 8px rgba(60, 128, 231, 0.3);

    /* ¡CAMBIO AQUÍ! Añadimos la nueva animación "fade-in-out" */
    animation:
        spin-glow-3d 1.2s infinite ease-in-out,
        fade-in-out 1.2s infinite linear;
    /* <--- Nueva animación */

    z-index: 1;
    transform-style: preserve-3d;
}

@keyframes pulse-b {
    0% {
        transform: translateZ(25px) scale(0.9);
        opacity: 0.7;
    }

    50% {
        transform: translateZ(25px) scale(1.1);
        opacity: 1;
    }

    100% {
        transform: translateZ(25px) scale(0.9);
        opacity: 0.7;
    }
}

@keyframes spin-glow-3d {
    from {
        transform: rotateY(-45deg) rotateX(60deg) rotateZ(0deg);
    }

    to {
        transform: rotateY(-45deg) rotateX(60deg) rotateZ(360deg);
    }
}

/* 3. AÑADE ESTA NUEVA ANIMACIÓN AL FINAL DE TU CSS */

@keyframes fade-in-out {
    25% {
        opacity: 1;
    }

    /* 25% (costado) - Visible */
    75% {
        opacity: 1;
    }

    /* 75% (costado) - Visible */
}



.footer-content {
    position: relative;
}

/* Estilos para el formulario de recarga */
.recharge-step {
    display: none;
}

.recharge-step.active {
    display: block;
}

.plan-card-signin {
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    padding: 12px 15px;
    margin-bottom: 0.75rem;
    cursor: pointer;
    transition: all 0.2s ease-in-out;
    background-color: rgba(255, 255, 255, 0.05);
    display: flex;
    align-items: center;
}

.plan-card-signin:hover {
    background-color: rgba(255, 255, 255, 0.1);
    border-color: #3498DB;
}

.plan-card-signin.selected {
    background-color: rgba(52, 152, 219, 0.15);
    border-color: #3498DB;
    box-shadow: 0 0 12px rgba(52, 152, 219, 0.4);
}

.plan-radio-signin {
    min-width: 16px;
    height: 16px;
    border: 2px solid rgba(255, 255, 255, 0.5);
    border-radius: 50%;
    margin-right: 12px;
    transition: all 0.2s ease;
    flex-shrink: 0;
    position: relative;
}

.plan-card-signin.selected .plan-radio-signin {
    border-color: #3498DB;
    background-color: #3498DB;
}

.plan-card-signin.selected .plan-radio-signin::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 6px;
    height: 6px;
    background: white;
    border-radius: 50%;
}

.plan-details {
    flex-grow: 1;
}

.plan-price {
    font-weight: bold;
    color: white;
    font-size: 1.1rem;
}

#card-element-recharge {
    padding: 10px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 4px;
    background-color: rgba(255, 255, 255, 0.05);
}

#plan-selector-trigger {
    background-color: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 4px;
    padding: 10px;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: rgba(255, 255, 255, 0.7);
}

#plan-selector-trigger.selected {
    color: #ffffff;
    border-color: #3498DB;
}

.nav-tabs .nav-link {
    color: #FFFFFF;
    border-bottom-color: rgba(255, 255, 255, 0.2);
}

.nav-tabs .nav-link.active {
    color: #ffd000 !important;
}

.modal-backdrop.show {
    opacity: var(--phoenix-backdrop-opacity);
    display: none;
}

.elegant-label-register,
.elegant-label-forgot {
    color: #FFFFFF;
    text-decoration: none;
}

/* MEDIA QUERIES PARA DISPOSITIVOS MÓVILES */
@media (max-width: 768px) {
    .main {
        padding-bottom: 80px;
    }

    .card.auth-card {
        max-height: calc(100vh - 160px);
        padding: 1rem 1.5rem;
    }

    .card.auth-card.recharge-view-active {
        max-height: calc(100vh - 160px);
    }

    .card.auth-card .card-body {
        max-height: calc(100vh - 220px);
    }
}

@media (width <=355px) {
    .elegant-label {
        font-size: 14px !important;
    }

    .elegant-label-title {
        font-size: 14px !important;
    }

    .elegant-label-button {
        font-size: 10px !important;
    }

    .elegant-label-register,
    .elegant-label-forgot {
        font-size: 10px !important;
    }
}

/* Para pantallas muy pequeñas en altura */
@media (max-height: 700px) {
    .card.auth-card {
        max-height: calc(100vh - 140px);
    }

    .card.auth-card .card-body {
        max-height: calc(100vh - 200px);
    }
}

.swal2-container {
    z-index: 2000;
}