/* Aviso de cookies */

.ckc,
.ckc-capa {
    font-family: 'Poppins', sans-serif;
    color: #252034;
}

.ckc *,
.ckc-capa *,
.ckc *::before,
.ckc-capa *::before,
.ckc *::after,
.ckc-capa *::after {
    box-sizing: border-box;
}

.ckc-oculto {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
}

/* Tarjeta al entrar */

.ckc {
    position: fixed;
    left: 24px;
    bottom: 24px;
    z-index: 1080;
    width: 420px;
    max-width: calc(100vw - 32px);
    padding: 22px;
    border-radius: 20px;
    background: #fff;
    box-shadow: 0 24px 60px rgba(37, 32, 52, .28);
    animation: ckc-entra .3s ease-out;
}

.ckc[hidden] {
    display: none;
}

@keyframes ckc-entra {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
}

.ckc__cab {
    display: flex;
    align-items: center;
    gap: 14px;
}

.ckc__icono {
    position: relative;
    flex-shrink: 0;
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: #FFF0F1;
}

/* Galleta dibujada con CSS */
.ckc__icono::before {
    content: '';
    position: absolute;
    left: 11px;
    top: 11px;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: radial-gradient(circle at 35% 40%, #EA1621 0 2px, transparent 2.5px),
        radial-gradient(circle at 65% 60%, #EA1621 0 2px, transparent 2.5px),
        radial-gradient(circle at 45% 72%, #EA1621 0 1.6px, transparent 2px),
        #F5C99B;
}

.ckc__titulo {
    margin: 0;
    font-family: 'Anton', 'Poppins', sans-serif;
    font-size: 24px;
    line-height: 1;
    text-transform: uppercase;
}

.ckc__titulo span,
.ckc-panel__titulo span {
    color: #EA1621;
}

.ckc__texto {
    margin: 12px 0 0;
    font-size: 13px;
    line-height: 1.55;
    color: #5B566A;
}

.ckc__texto a {
    color: #EA1621;
    font-weight: 700;
    text-decoration: underline;
}

.ckc__botones {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    margin-top: 16px;
}

.ckc__configurar {
    display: block;
    width: 100%;
    margin-top: 6px;
    padding: 8px;
    border: 0;
    background: none;
    font-family: inherit;
    font-size: 12px;
    font-weight: 800;
    color: #252034;
    text-decoration: underline;
    cursor: pointer;
}

.ckc-boton {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 12px 14px;
    border: 2px solid transparent;
    border-radius: 999px;
    font-family: inherit;
    font-size: 13px;
    font-weight: 800;
    cursor: pointer;
    transition: background .2s ease;
}

.ckc-boton--rojo {
    border-color: #EA1621;
    background: #EA1621;
    color: #fff;
}

.ckc-boton--rojo:hover {
    border-color: #C50F19;
    background: #C50F19;
}

.ckc-boton--oscuro {
    border-color: #252034;
    background: #252034;
    color: #fff;
}

.ckc-boton--oscuro:hover {
    background: #1C1828;
}

.ckc-boton--linea {
    border-color: #252034;
    background: #fff;
    color: #252034;
}

.ckc-boton--linea:hover {
    background: #F6F5F8;
}

.ckc-boton:focus-visible,
.ckc__configurar:focus-visible,
.ckc-panel__cerrar:focus-visible,
.ckc-capa summary:focus-visible,
.ckc-interruptor input:focus-visible + span {
    outline: 2px solid #EA1621;
    outline-offset: 2px;
}

/* Panel para elegir */

html.ckc-abierto,
html.ckc-abierto body {
    overflow: hidden;
}

.ckc-capa {
    position: fixed;
    inset: 0;
    z-index: 1090;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 16px;
}

.ckc-capa[hidden] {
    display: none;
}

.ckc-capa__fondo {
    position: absolute;
    inset: 0;
    background: rgba(28, 24, 40, .55);
}

.ckc-panel {
    position: relative;
    display: flex;
    flex-direction: column;
    width: 100%;
    max-width: 580px;
    max-height: calc(100vh - 80px);
    max-height: calc(100dvh - 80px);
    border-radius: 20px;
    background: #fff;
    box-shadow: 0 30px 80px rgba(0, 0, 0, .4);
    overflow: hidden;
}

.ckc-panel:focus {
    outline: none;
}

.ckc-panel__cab {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 20px 24px;
    background: linear-gradient(110deg, #1C1828, #2A243B);
    color: #fff;
}

.ckc-panel__titulo {
    margin: 0;
    font-family: 'Anton', 'Poppins', sans-serif;
    font-size: 26px;
    line-height: 1;
    text-transform: uppercase;
}

.ckc-panel__titulo span {
    color: #FF4A53;
}

.ckc-panel__cerrar {
    position: relative;
    flex-shrink: 0;
    width: 36px;
    height: 36px;
    border: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, .18);
    cursor: pointer;
}

.ckc-panel__cerrar::before,
.ckc-panel__cerrar::after {
    content: '';
    position: absolute;
    left: 50%;
    top: 50%;
    width: 14px;
    height: 2px;
    background: #fff;
    transform: translate(-50%, -50%) rotate(45deg);
}

.ckc-panel__cerrar::after {
    transform: translate(-50%, -50%) rotate(-45deg);
}

.ckc-panel__cuerpo {
    flex: 1 1 auto;
    min-height: 0;
    padding: 8px 24px 12px;
    overflow-y: auto;
    overscroll-behavior: contain;
}

.ckc-info {
    margin: 10px 0 4px;
    padding: 12px 14px;
    border-radius: 12px;
    background: #F6F5F8;
    font-size: 13px;
    color: #5B566A;
}

.ckc-info summary,
.ckc-lista summary {
    font-size: 12px;
    font-weight: 700;
    color: #EA1621;
    cursor: pointer;
}

.ckc-info__texto {
    margin-top: 10px;
    line-height: 1.55;
}

.ckc-info__texto p {
    margin: 0 0 8px;
}

.ckc-tipo {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    padding: 14px 0;
    border-top: 1px solid #F1EFF4;
}

.ckc-info + .ckc-tipo {
    border-top: 0;
}

.ckc-tipo__texto {
    flex: 1;
    min-width: 0;
}

.ckc-tipo__nombre {
    margin: 0;
    font-size: 14px;
    font-weight: 800;
}

.ckc-tipo__nombre small {
    font-size: 11px;
    font-weight: 700;
    color: #8A859A;
}

.ckc-tipo__desc {
    margin: 2px 0 0;
    font-size: 12.5px;
    line-height: 1.45;
    color: #5B566A;
}

.ckc-lista {
    margin-top: 6px;
}

.ckc-lista table {
    width: 100%;
    margin-top: 8px;
    border-collapse: collapse;
    font-size: 11.5px;
    color: #5B566A;
}

.ckc-lista th,
.ckc-lista td {
    padding: 6px 8px;
    border-bottom: 1px solid #F1EFF4;
    text-align: left;
    vertical-align: top;
    overflow-wrap: anywhere;
}

.ckc-lista th {
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: #8A859A;
}

/* Interruptor */

.ckc-interruptor {
    position: relative;
    flex-shrink: 0;
    margin-top: 2px;
    cursor: pointer;
}

.ckc-interruptor input {
    position: absolute;
    opacity: 0;
    width: 44px;
    height: 26px;
    margin: 0;
    cursor: pointer;
}

.ckc-interruptor input + span {
    display: block;
    width: 44px;
    height: 26px;
    border-radius: 999px;
    background: #D9D5E0;
    transition: background .2s ease;
}

.ckc-interruptor input + span::after {
    content: '';
    position: absolute;
    left: 3px;
    top: 3px;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #fff;
    transition: left .2s ease;
}

.ckc-interruptor input:checked + span {
    background: #EA1621;
}

.ckc-interruptor input:checked + span::after {
    left: 21px;
}

.ckc-interruptor input:disabled + span {
    background: #252034;
    opacity: .5;
    cursor: not-allowed;
}

.ckc-panel__pie {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    padding: 14px 24px;
    border-top: 1px solid #ECE9EF;
    background: #F6F5F8;
}

.ckc-panel__pie .ckc-boton {
    padding: 11px 10px;
    font-size: 12px;
}

/* Móvil */

@media (max-width: 575.98px) {
    .ckc {
        left: 0;
        right: 0;
        bottom: 0;
        width: auto;
        max-width: none;
        padding: 18px 16px calc(14px + env(safe-area-inset-bottom));
        border-radius: 20px 20px 0 0;
        box-shadow: 0 -12px 40px rgba(37, 32, 52, .25);
    }

    .ckc__titulo {
        font-size: 20px;
    }

    .ckc-capa {
        padding: 0;
    }

    .ckc-panel {
        max-width: none;
        height: 100%;
        max-height: none;
        border-radius: 0;
    }

    .ckc-panel__pie {
        grid-template-columns: 1fr;
    }
}

@media (prefers-reduced-motion: reduce) {
    .ckc {
        animation: none;
    }

    .ckc-boton,
    .ckc-interruptor input + span,
    .ckc-interruptor input + span::after {
        transition: none;
    }
}
