:root {
    --ck-primary: #464646;
    --ck-dark: #353436;
    --ck-grey: #e6e6eb;
    --ck-grey-hover: #d8d8de;
    --ck-text: #212121;
    --ck-text-soft: #5e6266;
    --ck-white: #FFFFFF;
    --ck-border: rgba(213, 213, 221, 0.4);
    --ck-separator: #F4F4F4;
    --ck-shadow: rgba(172, 171, 171, 0.3) 0 -1px 10px 0;
    --ck-radius: 15px;
    --ck-z-banner: 9999998;
    --ck-z-modal: 9999999;
    --font-size-title: 18px;
}
.ck-banner *,
.ck-banner *::before,
.ck-banner *::after,
.ck-modal *,
.ck-modal *::before,
.ck-modal *::after {
    box-sizing: border-box;
}
.ck-visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
    border: 0;
}
.ck-noscript {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 9999999;
    margin: 0;
    padding: 14px 20px;
    background: var(--ck-white);
    color: var(--color-primary);
    font-size: 14px;
    line-height: 1.5;
    border-top: 1px solid var(--ck-border);
}
.ck-noscript a {
    color: var(--ck-primary);
    text-decoration: underline;
}
.ck-banner {
    position: fixed;
    bottom: 40px;
    right: 40px;
    width: 440px;
    max-width: calc(100vw - 80px);
    z-index: var(--ck-z-banner);
}

.ck-banner[hidden] {
    display: none;
}

.ck-banner__box {
    background: var(--ck-white);
    border: 1px solid var(--ck-border);
    border-radius: var(--ck-radius);
    box-shadow: var(--ck-shadow);
    padding: 20px 26px;
    animation: ck-slide-in 0.25s ease-out;
}
.ck-banner__title {
    margin: 0;
    font-size: var(--font-size-title);
    font-weight: bold;
    line-height: 1.35;
}
.ck-banner__text {
    font-size: 14px;
    line-height: 24px;
}
.ck-banner__btns {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 16px;
}
.ck-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 8px 16px;
    border: 2px solid transparent;
    border-radius: var(--ck-radius);
    font-family: inherit;
    font-size: 14px;
    font-weight: 500;
    line-height: 1.2;
    text-align: center;
    cursor: pointer;
    transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.ck-btn:focus-visible {
    outline: 2px solid var(--ck-primary);
    outline-offset: 2px;
}

/* Aceptar */
.ck-btn--primary {
    background: var(--ck-primary);
    border-color: var(--ck-primary);
    color: var(--ck-white);
}

.ck-btn--primary:hover {
    background: var(--ck-dark);
    border-color: var(--ck-dark);
}

/* Rechazar */
.ck-btn--grey {
    background: var(--ck-grey);
    border-color: var(--ck-grey);
    color: var(--ck-dark);
}

.ck-btn--grey:hover {
    background: var(--ck-grey-hover);
    border-color: var(--ck-grey-hover);
}

/* Personalizar (borde oscuro, fondo blanco) */
.ck-btn--ghost {
    background: var(--ck-white);
    border-color: var(--ck-dark);
    color: var(--ck-dark);
}

.ck-btn--ghost:hover {
    background: var(--ck-dark);
    color: var(--ck-white);
}

/* Guardar (negro) */
.ck-btn--dark {
    background: #000000;
    border-color: #000000;
    color: #D5D5DD;
}

.ck-btn--dark:hover {
    background: #2b2b2b;
    border-color: #2b2b2b;
}

/* Enlaces dentro del banner */
.ck-link {
    color: var(--ck-primary) !important;
    text-decoration: underline;
}

.ck-link:hover {
    text-decoration: none;
}

/* =============================================
   Modal de personalización
   ============================================= */
.ck-modal {
    position: fixed;
    inset: 0;
    z-index: var(--ck-z-modal);
    display: flex;
    align-items: center;
    justify-content: center;
}

.ck-modal[hidden] {
    display: none;
}

.ck-overlay {
    position: absolute;
    inset: 0;
    background: #000000;
    opacity: 0.4;
}

.ck-modal__card {
    position: relative;
    display: flex;
    flex-direction: column;
    width: 845px;
    max-width: calc(100vw - 32px);
    max-height: calc(100vh - 64px);
    background: var(--ck-white);
    border-radius: var(--ck-radius);
    color: var(--ck-text);
    overflow: hidden;
    animation: ck-fade-in 0.2s ease-out;
}

/* Cabecera */
.ck-modal__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 22px 24px;
    border-bottom: 1px solid var(--ck-separator);
    flex: 0 0 auto;
}

.ck-modal__title {
    font-size: var(--font-size-title);
    font-weight: bold;
    line-height: 1.35;
}

.ck-modal__close {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: transparent;
    color: var(--color-primary);
    cursor: pointer;
    transition: background-color 0.15s ease;
}

.ck-modal__close:hover {
    background: var(--ck-separator);
}

.ck-modal__close svg {
    width: 14px;
    height: 14px;
    display: block;
}

.ck-modal__close:focus-visible {
    outline: 2px solid var(--ck-primary);
    outline-offset: 2px;
}

/* Cuerpo (con scroll) */
.ck-modal__body {
    flex: 1 1 auto;
    overflow-y: auto;
    padding: 20px 24px;
}

.ck-modal__intro {
    font-size: 14px;
    line-height: 20px;
}

.ck-modal__intro p {
    margin: 0 0 12px;
}

.ck-modal__intro p:last-child {
    margin-bottom: 0;
}

.ck-separator {
    height: 1px;
    margin: 20px 0;
    background: var(--ck-separator);
}

/* =============================================
   Categorías (acordeón)
   ============================================= */
.ck-cat {
    border-bottom: 1px solid var(--ck-separator);
}

.ck-cat__head {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 0;
}

.ck-cat__chevron {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    padding: 0;
    border: 0;
    background: transparent;
    color: var(--ck-text-soft);
    cursor: pointer;
}

.ck-cat__chevron svg {
    width: 10px;
    height: 10px;
    display: block;
    transition: transform 0.2s ease;
}

.ck-cat__chevron[aria-expanded="true"] svg {
    transform: rotate(90deg);
}

.ck-cat__name {
    flex: 1 1 auto;
    padding: 0;
    border: 0;
    background: transparent;
    font-family: inherit;
    font-size: 18px;
    font-weight: 400;
    line-height: 1.35;
    text-align: left;
    cursor: pointer;
}

.ck-cat__always {
    flex: 0 0 auto;
    font-size: 14px;
    font-weight: 600;
    color: #008000;
}

.ck-cat__desc {
    font-size: 14px;
    line-height: 20px;
    margin: 0 0 16px 28px;
}

/* Detalle de cookies (desplegable) */
.ck-cat__detail {
    margin: 0 0 16px 28px;
}

.ck-cat__detail[hidden] {
    display: none;
}

.ck-table {
    width: 100%;
    border-collapse: collapse;
    background: var(--ck-separator);
    border-radius: var(--ck-radius);
    overflow: hidden;
    font-size: 13px;
}

.ck-table th,
.ck-table td {
    padding: 8px 12px;
    text-align: left;
    vertical-align: top;
    border-bottom: 1px solid #EBEBEB;
}

.ck-table th {
    font-weight: 600;
    color: var(--ck-text);
}

.ck-table tr:last-child td {
    border-bottom: 0;
}

.ck-table td {
    color: var(--ck-text-soft);
}

/* =============================================
   Interruptor (toggle)
   ============================================= */
.ck-toggle {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    cursor: pointer;
}

.ck-toggle input {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
    border: 0;
}

.ck-toggle__track {
    position: relative;
    display: block;
    width: 44px;
    height: 24px;
    border-radius: 12px;
    background: #667481;
    transition: background-color 0.2s ease;
}

.ck-toggle__knob {
    position: absolute;
    top: 3px;
    left: 3px;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: var(--ck-white);
    transition: transform 0.2s ease;
}

.ck-toggle input:checked + .ck-toggle__track {
    background: var(--ck-primary);
}

.ck-toggle input:checked + .ck-toggle__track .ck-toggle__knob {
    transform: translateX(20px);
}

.ck-toggle input:focus-visible + .ck-toggle__track {
    outline: 2px solid var(--ck-primary);
    outline-offset: 2px;
}

/* =============================================
   Pie del modal
   ============================================= */
.ck-modal__footer {
    flex: 0 0 auto;
    display: flex;
    gap: 10px;
    padding: 16px 24px 20px;
    border-top: 1px solid var(--ck-separator);
}

.ck-modal__footer .ck-btn {
    flex: 1 1 auto;
    padding: 8px 12px;
}

/* =============================================
   Animaciones
   ============================================= */
@keyframes ck-slide-in {
    from {
        opacity: 0;
        transform: translateY(16px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes ck-fade-in {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@media (prefers-reduced-motion: reduce) {
    .ck-banner__box,
    .ck-modal__card {
        animation: none;
    }
}

/* =============================================
   Móvil (mismo breakpoint que el proyecto: ≤ 950 px)
   ============================================= */
@media (max-width: 950px) {
    .ck-banner {
        bottom: 0;
        right: 0;
        width: 100%;
        max-width: 100%;
    }

    .ck-banner__box {
        border-radius: var(--ck-radius) var(--ck-radius) 0 0;
        border-left: 0;
        border-right: 0;
        border-bottom: 0;
        padding: 18px 20px;
    }

    .ck-banner__title {
        font-size: var(--font-size-title);
    }

    .ck-banner__btns {
        gap: 6px;
    }

    .ck-banner__btns .ck-btn {
        flex: 1 1 auto;
        padding: 8px 10px;
        font-size: 13px;
    }

    .ck-modal {
        align-items: flex-end;
    }

    .ck-modal__card {
        width: 100%;
        max-width: 100%;
        max-height: 92vh;
        border-radius: var(--ck-radius) var(--ck-radius) 0 0;
    }

    .ck-modal__header {
        padding: 16px 18px;
    }

    .ck-modal__title {
        font-size: var(--font-size-title);
    }

    .ck-modal__body {
        padding: 16px 18px;
    }

    .ck-cat__name {
        font-size: 16px;
    }

    .ck-cat__desc,
    .ck-cat__detail {
        margin-left: 0;
    }

    .ck-modal__footer {
        flex-direction: column;
        gap: 8px;
        padding: 14px 18px 18px;
    }
}
