/* Banner de cookies propio (HTML en themes/Plannet Theme/cookies.php, lógica en js/banner-cookies.js) */

.cookieBanner[hidden], .cookieModal[hidden] {
    display: none !important;
}

.cookieBanner {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 100000;
    background: #ffffff;
    border-top: 4px solid #09172b;
    box-shadow: 0 -8px 30px rgba(9, 23, 43, 0.15);
    font-family: 'Inter';
    color: #333;
    animation: cookieSubir 0.4s ease-out;
}

@keyframes cookieSubir {
    from { transform: translateY(100%); }
    to { transform: translateY(0); }
}

.cookieBannerInner {
    display: flex;
    align-items: center;
    gap: 40px;
    padding: 26px 6.4%;
}

.cookieBannerText {
    flex: 1;
}

.cookieBannerText p,
.cookieModalCaja p {
    margin: 0;
    font-size: 0.92em;
    line-height: 160%;
}

.cookieBanner a,
.cookieModal a {
    color: #09172b;
    text-decoration: underline;
}

.cookieEyebrow {
    margin-bottom: 4px !important;
    font-size: 0.75em !important;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #09172b;
}

.cookieTitle {
    margin-bottom: 8px !important;
    font-size: 1.35em !important;
    font-weight: 600;
    line-height: 120% !important;
    color: #09172b;
}

.cookieBannerButtons {
    display: flex;
    gap: 12px;
    flex-shrink: 0;
}

.cookieBtn {
    border: 1px solid #09172b;
    border-radius: 5px;
    background: #09172b;
    color: #ffffff;
    font-family: 'Inter';
    font-size: 0.9em;
    padding: 12px 22px;
    cursor: pointer;
    white-space: nowrap;
    transition: background-color 0.2s ease-in-out, color 0.2s ease-in-out;
}

.cookieBtn:hover {
    background: #ffffff;
    color: #09172b;
}

.cookieBtnLinea {
    background: #ffffff;
    color: #09172b;
}

.cookieBtnLinea:hover {
    background: #09172b;
    color: #ffffff;
}

.cookieBtn:focus-visible,
.cookieModalCerrar:focus-visible,
.cookieSwitch input:focus-visible + span {
    outline: 2px solid #09172b;
    outline-offset: 2px;
}

/* ---------- panel de configuración ---------- */

html.cookieModalAbierto {
    overflow: hidden;
}

.cookieModal {
    position: fixed;
    inset: 0;
    z-index: 100001;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    font-family: 'Inter';
    color: #333;
}

.cookieModalFondo {
    position: absolute;
    inset: 0;
    background: rgba(9, 23, 43, 0.55);
}

.cookieModalCaja {
    position: relative;
    width: 100%;
    max-width: 640px;
    max-height: calc(100vh - 40px);
    overflow-y: auto;
    background: #ffffff;
    border-radius: 5px;
    padding: 40px 44px 34px;
    box-sizing: border-box;
}

.cookieModalCerrar {
    position: absolute;
    top: 14px;
    right: 16px;
    width: 36px;
    height: 36px;
    border: none;
    background: none;
    color: #09172b;
    font-size: 1.8em;
    line-height: 1;
    cursor: pointer;
}

.cookieSeparator {
    width: 70px;
    height: 4px;
    background: #09172b;
    margin: 6px 0 20px;
}

.cookieModalIntro {
    margin-bottom: 22px !important;
}

.cookieCat {
    border-top: 1px solid #e3e5e9;
    padding: 18px 0;
}

.cookieCat p {
    color: #555;
}

.cookieCatHead {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 6px;
}

.cookieCatTitle {
    margin: 0 !important;
    font-size: 1em !important;
    font-weight: 600;
    color: #09172b !important;
    cursor: pointer;
}

.cookieCatSiempre {
    font-size: 0.82em;
    font-weight: 500;
    color: #09172b;
    background: #f4f5f7;
    border-radius: 5px;
    padding: 5px 10px;
}

.cookieSwitch {
    position: relative;
    display: inline-block;
    width: 46px;
    height: 26px;
    flex-shrink: 0;
    cursor: pointer;
}

.cookieSwitch input {
    position: absolute;
    opacity: 0;
    width: 100%;
    height: 100%;
    margin: 0;
    cursor: pointer;
}

.cookieSwitch span {
    position: absolute;
    inset: 0;
    background: #c9ccd2;
    border-radius: 26px;
    transition: background-color 0.2s ease-in-out;
    pointer-events: none;
}

.cookieSwitch span::before {
    content: '';
    position: absolute;
    top: 3px;
    left: 3px;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #ffffff;
    transition: transform 0.2s ease-in-out;
}

.cookieSwitch input:checked + span {
    background: #09172b;
}

.cookieSwitch input:checked + span::before {
    transform: translateX(20px);
}

.cookieModalButtons {
    display: flex;
    gap: 12px;
    border-top: 1px solid #e3e5e9;
    padding-top: 22px;
}

.cookieModalButtons .cookieBtn {
    flex: 1;
    padding: 12px 10px;
}

/* ---------- mapas y vídeos bloqueados hasta que se aceptan ---------- */

.cookieEmbed {
    position: relative;
    width: 100%;
    height: 100%;
    min-height: 220px;
}

.cookieEmbed iframe {
    display: block;
    width: 100%;
    height: 100%;
    border: 0;
}

.cookieEmbedVideo {
    height: auto;
    aspect-ratio: 16 / 9;
    max-width: 720px;
}

.cookieEmbedVideo iframe {
    position: absolute;
    inset: 0;
}

.cookieEmbedAviso {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 20px;
    box-sizing: border-box;
    background: #f4f5f7;
    font-family: 'Inter';
    text-align: center;
    color: #09172b;
}

.cookieEmbedAviso p {
    margin: 0;
    max-width: 340px;
    font-size: 0.9em;
    line-height: 150%;
}

.cookieEmbedVer {
    border: 1px solid #09172b;
    border-radius: 5px;
    background: #09172b;
    color: #ffffff;
    font-family: 'Inter';
    font-size: 0.9em;
    padding: 10px 26px;
    cursor: pointer;
}

.cookieEmbedVer:hover {
    background: #ffffff;
    color: #09172b;
}

.cookieEmbedEnlace {
    font-size: 0.85em;
    color: #09172b;
    text-decoration: underline;
}

.cookieEmbedNota {
    max-width: 340px;
    font-size: 0.75em;
    line-height: 140%;
    color: #555;
}

.cookieEmbedNota a {
    color: #555;
    text-decoration: underline;
}

.cookieEmbed.cargado .cookieEmbedAviso {
    display: none;
}

/* enlace "Configurar cookies" del pie (footer.php) */
.footerBottomR2 .footerConfigCookies {
    cursor: pointer;
}

/* ---------- tablet y móvil ---------- */

@media only screen and (max-width: 1000px) {
    .cookieBannerInner {
        flex-direction: column;
        align-items: stretch;
        gap: 18px;
    }
    .cookieBannerButtons .cookieBtn {
        flex: 1;
    }
}

@media only screen and (max-width: 800px) {
    .footerBottomR2 .footerBottomDot:has(+ .footerConfigCookies) {
        display: none;
    }
    .footerBottomR2 .footerConfigCookies {
        flex-basis: 100%;
        text-align: center;
    }
}

@media only screen and (max-width: 600px) {
    .cookieBannerInner {
        padding: 20px 6.4% 18px;
        gap: 14px;
    }
    .cookieBannerText p {
        font-size: 0.85em;
    }
    .cookieTitle {
        font-size: 1.15em !important;
    }
    .cookieBannerButtons {
        flex-wrap: wrap;
        gap: 8px;
    }
    .cookieBannerButtons .cookieBtn {
        flex: 1 1 40%;
        padding: 12px 8px;
    }
    .cookieBannerButtons .cookieBtnLinea {
        order: 3;
        flex-basis: 100%;
    }
    .cookieModal {
        padding: 0;
        align-items: flex-end;
    }
    .cookieModalCaja {
        max-height: 92vh;
        padding: 30px 22px 22px;
        border-radius: 5px 5px 0 0;
    }
    .cookieModalButtons {
        flex-direction: column;
        gap: 8px;
    }
}
