/* =====================================================
   ETER COMUNICACIONES
   COOKIE CONSENT - BANNER RESPONSIVE DEFECTO/MÓVIL FIX
===================================================== */

:root {
    --eter-blue: #0e6497;
    --eter-dark: #05263d;
    --eter-cyan: #00d4ff;
    --eter-bg: rgba(12, 20, 35, .97);
}

/* Reset estricto */
#eterConsentOverlay,
#eterConsentOverlay * {
    box-sizing: border-box !important;
}

/* -----------------------------------------------------
   1. OVERLAY (Fondo transparente pegado abajo)
----------------------------------------------------- */
#eterConsentOverlay {
    position: fixed !important;
    top: auto !important;
    bottom: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: auto !important;
    display: block !important; /* Desactivamos Flexbox en la capa madre */
    padding: 0 !important;
    background: transparent !important;
    pointer-events: none !important;

    opacity: 0 !important;
    visibility: hidden !important;

    transition: opacity .35s ease, visibility .35s ease;
    z-index: 999999999 !important;
}

#eterConsentOverlay.show {
    opacity: 1 !important;
    visibility: visible !important;
}

/* -----------------------------------------------------
   2. CONTENEDOR MODAL DE ALTURA DINÁMICA
----------------------------------------------------- */
#eterConsentModal {
    position: relative !important;
    width: 100% !important;
    max-width: 100% !important;
    height: auto !important; /* Mide estrictamente lo que ocupa su interior */
    min-height: 0 !important;
    background: var(--eter-bg) !important;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: 16px 16px 0 0 !important;
    color: #fff !important;
    box-shadow: 0 -10px 40px rgba(0, 0, 0, .6) !important;
    border-top: 1px solid rgba(255, 255, 255, .15) !important;
    pointer-events: auto !important;
    transform: translateY(100%);
    transition: transform .35s ease;
}

#eterConsentOverlay.show #eterConsentModal {
    transform: translateY(0);
}

/* Línea luminosa animada superior */
#eterConsentModal::before {
    content: "" !important;
    display: block !important;
    height: 3px !important;
    background: linear-gradient(90deg, transparent, var(--eter-cyan), transparent) !important;
    background-size: 200% !important;
    animation: eterScan 5s linear infinite !important;
}

@keyframes eterScan {
    0% { background-position: -200%; }
    100% { background-position: 200%; }
}

.eterConsentHeader {
    display: none !important;
}

/* -----------------------------------------------------
   3. ESCRITORIO (Alineado en fila limpia)
----------------------------------------------------- */
.eterConsentBody {
    max-width: 1450px !important;
    margin: 0 auto !important;
    padding: 12px 20px !important;
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 15px !important;
    height: auto !important;
}

.eterConsentBody > p {
    font-size: 11.5px !important;
    line-height: 1.3 !important;
    margin: 0 !important;
    opacity: .9 !important;
    flex: 1 1 220px !important;
}

.eterOption {
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
    padding: 5px 10px !important;
    border-radius: 8px !important;
    background: rgba(255, 255, 255, .05) !important;
    margin: 0 !important;
    white-space: nowrap !important;
}

.eterOption strong {
    font-size: 11.5px !important;
}

.eterOption small {
    display: none !important;
}

/* Switches */
.eterSwitch {
    width: 36px !important;
    height: 18px !important;
    background: #555 !important;
    border-radius: 20px !important;
    position: relative !important;
    cursor: pointer !important;
    transition: .3s !important;
    display: inline-block !important;
    flex-shrink: 0 !important;
}

.eterSwitch::after {
    content: "" !important;
    width: 12px !important;
    height: 12px !important;
    background: white !important;
    border-radius: 50% !important;
    position: absolute !important;
    top: 3px !important;
    left: 3px !important;
    transition: .3s !important;
}

input[type=checkbox] {
    display: none !important;
}

input[type=checkbox]:checked + .eterSwitch {
    background: #00b894 !important;
}

input[type=checkbox]:checked + .eterSwitch::after {
    transform: translateX(18px) !important;
}

/* Botonera PC */
.eterButtons {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    gap: 6px !important;
    margin: 0 !important;
    white-space: nowrap !important;
}

#eterAccept {
    height: 34px !important;
    padding: 0 14px !important;
    background: linear-gradient(135deg, #18c7ff, #0e6497) !important;
    color: white !important;
    font-size: 11.5px !important;
    font-weight: 700 !important;
    border: none !important;
    border-radius: 6px !important;
    cursor: pointer !important;
}

#eterReject,
#eterSave {
    height: 34px !important;
    padding: 0 10px !important;
    border: none !important;
    border-radius: 6px !important;
    cursor: pointer !important;
    font-size: 11px !important;
    font-weight: 700 !important;
}

#eterReject {
    background: #c62828 !important;
    color: white !important;
}

#eterSave {
    background: #343434 !important;
    color: white !important;
}

.eterConsentFooter {
    padding: 0 20px 6px 20px !important;
    text-align: center !important;
    border: none !important;
    font-size: 0.7rem !important;
}

.eterConsentFooter a {
    color: var(--eter-cyan) !important;
    text-decoration: none !important;
    margin: 0 6px !important;
}

/* Botón flotante reabrir */
#eterCookieBtn {
    position: fixed !important;
    bottom: 20px !important;
    left: 20px !important;
    width: 42px !important;
    height: 42px !important;
    border-radius: 50% !important;
    background: var(--eter-dark) !important;
    color: var(--eter-cyan) !important;
    border: 1px solid rgba(255, 255, 255, 0.15) !important;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.4) !important;
    cursor: pointer !important;
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    z-index: 999999990 !important;
    pointer-events: auto !important;
}

/* -----------------------------------------------------
   4. MÓVIL BLINDADO (Elimina estiramientos y espacios vacíos)
----------------------------------------------------- */
@media (max-width: 1024px) {
    #eterConsentModal {
        max-height: 85vh !important;
        overflow-y: auto !important;
        border-radius: 14px 14px 0 0 !important;
        -webkit-overflow-scrolling: touch !important;
    }

    .eterConsentBody {
        display: block !important; /* Cambiamos de flex a block para matar la distribución de espacios vacíos */
        height: auto !important;
        padding: 12px 12px 6px 12px !important;
    }

    .eterConsentBody > p {
        text-align: center !important;
        font-size: 11px !important;
        line-height: 1.3 !important;
        margin-bottom: 8px !important;
        display: block !important;
    }

    .eterOption {
        display: flex !important;
        justify-content: space-between !important;
        align-items: center !important;
        width: 100% !important;
        padding: 6px 10px !important;
        margin-bottom: 6px !important; /* Espaciado manual exacto entre casillas */
    }

    .eterOption strong {
        font-size: 11px !important;
        word-break: break-word !important;
    }

    .eterSwitch {
        width: 34px !important;
        height: 18px !important;
        flex-shrink: 0 !important;
    }

    .eterSwitch::after {
        width: 12px !important;
        height: 12px !important;
    }

    input[type=checkbox]:checked + .eterSwitch::after {
        transform: translateX(16px) !important;
    }

    .eterButtons {
        display: flex !important;
        flex-direction: column !important;
        width: 100% !important;
        gap: 5px !important;
        margin-top: 8px !important;
    }

    #eterAccept, 
    #eterReject, 
    #eterSave {
        width: 100% !important;
        height: 34px !important;
        font-size: 11px !important;
        padding: 0 8px !important;
    }

    .eterConsentFooter {
        padding: 4px 10px 10px 10px !important;
        text-align: center !important;
        font-size: 0.65rem !important;
        display: flex !important;
        flex-wrap: wrap !important;
        justify-content: center !important;
        gap: 4px !important;
    }
}