/* ============================================================
   AVISO DE COOKIES
   Copia del banner del original (CookieYes): tarjeta blanca
   abajo a la izquierda, 440px, radio 6px, botones azul marino.
   La tipografía es la del sistema, como en el original: aquí
   NO se usa Walbaum.
   ============================================================ */

.ck-caja,
.ck-modal,
.ck-badge {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
                 Helvetica, Arial, sans-serif;
    color: #212121;
    box-sizing: border-box;
}

.ck-caja *,
.ck-modal * { box-sizing: border-box; }

/* --------- tarjeta del aviso --------- */
.ck-caja {
    position: fixed;
    left: 35px;
    bottom: 33px;
    z-index: 3000;
    width: 440px;
    max-width: calc(100vw - 40px);
    background: #fff;
    border: 1px solid #f4f4f4;
    border-radius: 6px;
    box-shadow: 0 -1px 10px 0 rgba(172, 171, 171, .3);
    padding: 20px 26px;
    opacity: 0;
    transform: translateY(12px);
    visibility: hidden;
    transition: opacity .3s ease, transform .3s ease, visibility .3s ease;
}

.ck-caja.abierto {
    opacity: 1;
    transform: none;
    visibility: visible;
}

.ck-titulo {
    font-size: 18px;
    font-weight: 700;
    line-height: 24px;
    margin: 0 0 10px;
}

.ck-texto {
    font-size: 14px;
    font-weight: 400;
    line-height: 24px;
    margin: 0 0 18px;
}

.ck-botones {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.ck-btn {
    flex: 1 1 auto;
    min-height: 44px;
    padding: 8px;
    font-family: inherit;
    font-size: 14px;
    font-weight: 500;
    line-height: 20px;
    border: 2px solid var(--navy, #2f2a6d);
    border-radius: 2px;
    cursor: pointer;
    transition: background-color .2s ease, color .2s ease;
}

.ck-btn-linea {
    background: transparent;
    color: var(--navy, #2f2a6d);
}

.ck-btn-linea:hover {
    background: var(--navy, #2f2a6d);
    color: #fff;
}

.ck-btn-solido {
    background: var(--navy, #2f2a6d);
    color: #fff;
}

.ck-btn-solido:hover { opacity: .88; }

/* --------- panel de preferencias --------- */
.ck-modal {
    position: fixed;
    inset: 0;
    z-index: 3100;
    background: rgba(0, 0, 0, .5);
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.ck-modal.abierto { display: flex; }

.ck-panel {
    background: #fff;
    border-radius: 6px;
    width: 100%;
    max-width: 845px;
    max-height: 88vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.ck-panel-cabecera {
    padding: 22px 24px 16px;
    border-bottom: 1px solid #f0f0f0;
    position: relative;
}

.ck-panel-cabecera h2 {
    font-size: 18px;
    font-weight: 700;
    line-height: 24px;
    margin: 0 0 10px;
    padding-right: 40px;
}

.ck-panel-cabecera p {
    font-size: 14px;
    line-height: 24px;
    margin: 0;
}

.ck-cerrar {
    position: absolute;
    top: 16px;
    right: 18px;
    background: none;
    border: none;
    font-family: inherit;
    font-size: 26px;
    line-height: 1;
    color: #212121;
    cursor: pointer;
    padding: 0;
}

.ck-panel-cuerpo {
    padding: 8px 24px 16px;
    overflow-y: auto;
}

.ck-grupo { border-bottom: 1px solid #f0f0f0; }
.ck-grupo:last-child { border-bottom: none; }

.ck-grupo-fila {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 0 10px;
}

.ck-flecha {
    background: none;
    border: none;
    font-size: 13px;
    line-height: 1;
    color: #212121;
    cursor: pointer;
    padding: 4px;
    transition: transform .2s ease;
}

.ck-grupo.desplegado .ck-flecha { transform: rotate(90deg); }

.ck-grupo-nombre {
    flex: 1 1 auto;
    font-size: 15px;
    font-weight: 600;
    line-height: 20px;
}

.ck-siempre {
    font-size: 13px;
    font-weight: 600;
    color: #2f7c31;
    white-space: nowrap;
}

/* interruptor */
.ck-switch { position: relative; width: 42px; height: 22px; flex: 0 0 auto; }
.ck-switch input { position: absolute; opacity: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }

.ck-switch span {
    position: absolute;
    inset: 0;
    background: #d0d0d0;
    border-radius: 22px;
    transition: background-color .2s ease;
    pointer-events: none;
}

.ck-switch span::after {
    content: '';
    position: absolute;
    top: 3px;
    left: 3px;
    width: 16px;
    height: 16px;
    background: #fff;
    border-radius: 50%;
    transition: transform .2s ease;
}

.ck-switch input:checked + span { background: var(--navy, #2f2a6d); }
.ck-switch input:checked + span::after { transform: translateX(20px); }

.ck-grupo-desc {
    display: none;
    font-size: 14px;
    line-height: 22px;
    padding: 0 0 16px 34px;
    margin: 0;
}

.ck-grupo.desplegado .ck-grupo-desc { display: block; }

.ck-panel-pie {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    padding: 16px 24px;
    border-top: 1px solid #f0f0f0;
}

/* --------- botón flotante para reabrir las preferencias --------- */
.ck-badge {
    position: fixed;
    left: 18px;
    bottom: 18px;
    z-index: 2900;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    border: none;
    background: var(--navy, #2f2a6d);
    color: #fff;
    font-size: 17px;
    line-height: 1;
    cursor: pointer;
    display: none;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(0, 0, 0, .25);
}

.ck-badge.visible { display: flex; }
.ck-badge:hover { opacity: .85; }

/* --------- móvil --------- */
@media (max-width: 768px) {
    .ck-caja {
        left: 12px;
        right: 12px;
        bottom: 12px;
        width: auto;
        max-width: none;
        padding: 18px 18px 16px;
    }

    .ck-btn { flex: 1 1 100%; }

    .ck-panel-cabecera { padding: 18px 18px 14px; }
    .ck-panel-cuerpo { padding: 6px 18px 14px; }
    .ck-panel-pie { padding: 14px 18px; }
    .ck-panel-pie .ck-btn { flex: 1 1 100%; }

    .ck-badge { left: 12px; bottom: 12px; }
}
