/**
 * CBK Cookie Consent
 *
 * Light palette drawn from the theme (#194C9F primary, #00AEEF accent) so the
 * notice reads as part of the site rather than a bolted-on widget.
 */

.cbk-cc {
    --cbk-cc-primary: #194c9f;
    --cbk-cc-primary-dark: #123a7a;
    --cbk-cc-accent: #00aeef;
    --cbk-cc-ink: #16151c;
    --cbk-cc-muted: #4a4a55;
    --cbk-cc-line: #d4dae6;
    --cbk-cc-surface: #ffffff;
    --cbk-cc-tint: #f2f6fd;
    --cbk-cc-radius: 6px;
    --cbk-cc-font: inherit;
}

.cbk-cc-sr {
    position: absolute !important;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    overflow: hidden;
    clip: rect(0 0 0 0);
    clip-path: inset(50%);
    white-space: nowrap;
    border: 0;
}

.cbk-cc [hidden] {
    display: none !important;
}

.cbk-cc-locked {
    overflow: hidden;
}

/* ------------------------------------------------------------------ banner */

.cbk-cc-banner {
    position: fixed;
    z-index: 2147482000;
    right: 0;
    bottom: 0;
    left: 0;
    box-sizing: border-box;
    background: var(--cbk-cc-surface);
    border-top: 4px solid var(--cbk-cc-primary);
    box-shadow: 0 -6px 28px rgba(22, 21, 28, 0.18);
    color: var(--cbk-cc-ink);
    font-family: var(--cbk-cc-font);
    font-size: 15px;
    line-height: 1.55;
}

.cbk-cc-banner:focus {
    outline: none;
}

.cbk-cc-banner__inner {
    display: flex;
    align-items: center;
    gap: 28px;
    max-width: 1240px;
    margin: 0 auto;
    padding: 20px 24px;
}

.cbk-cc-banner__copy {
    flex: 1 1 auto;
    min-width: 0;
}

.cbk-cc-banner__title {
    margin: 0 0 6px;
    color: var(--cbk-cc-primary);
    font-size: 18px;
    font-weight: 700;
    line-height: 1.3;
}

.cbk-cc-banner__text {
    margin: 0;
    max-width: 82ch;
    color: var(--cbk-cc-muted);
    font-size: 14.5px;
}

.cbk-cc-banner__policy {
    color: var(--cbk-cc-primary);
    font-weight: 600;
    text-decoration: underline;
    white-space: nowrap;
}

.cbk-cc-banner__actions {
    display: flex;
    flex: 0 0 auto;
    flex-wrap: wrap;
    gap: 10px;
}

/* Box layout: a card in the corner rather than a full-width bar. */
.cbk-cc[data-cbk-layout="box"] .cbk-cc-banner {
    right: 24px;
    bottom: 24px;
    left: auto;
    max-width: 420px;
    border: 1px solid var(--cbk-cc-line);
    border-top: 4px solid var(--cbk-cc-primary);
    border-radius: var(--cbk-cc-radius);
}

.cbk-cc[data-cbk-layout="box"] .cbk-cc-banner__inner {
    display: block;
    padding: 22px;
}

.cbk-cc[data-cbk-layout="box"] .cbk-cc-banner__actions {
    margin-top: 18px;
}

.cbk-cc[data-cbk-layout="box"] .cbk-cc-btn {
    flex: 1 1 auto;
}

/*
 * Pop-up layout: a centred dialog over a scrim.
 *
 * The scrim wrapper is inert in the bar and box layouts — display:contents
 * removes it from the box tree entirely, so the banner keeps behaving as a
 * fixed element there and only one set of rules has to change here.
 */
.cbk-cc-scrim {
    display: contents;
}

.cbk-cc[data-cbk-layout="popup"] .cbk-cc-scrim {
    position: fixed;
    z-index: 2147482000;
    inset: 0;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 24px;
    background: rgba(9, 17, 34, 0.62);
    overflow-y: auto;
}

.cbk-cc[data-cbk-layout="popup"].cbk-cc--banner-open .cbk-cc-scrim {
    display: flex;
}

.cbk-cc[data-cbk-layout="popup"] .cbk-cc-banner {
    position: relative;
    right: auto;
    bottom: auto;
    left: auto;
    width: 100%;
    max-width: 560px;
    max-height: calc(100vh - 48px);
    overflow-y: auto;
    border: 1px solid var(--cbk-cc-line);
    border-top: 4px solid var(--cbk-cc-primary);
    border-radius: var(--cbk-cc-radius);
    box-shadow: 0 24px 60px rgba(9, 17, 34, 0.35);
}

.cbk-cc[data-cbk-layout="popup"] .cbk-cc-banner__inner {
    display: block;
    padding: 26px 28px 24px;
}

.cbk-cc[data-cbk-layout="popup"] .cbk-cc-banner__title {
    padding-right: 36px;
    font-size: 20px;
}

.cbk-cc[data-cbk-layout="popup"] .cbk-cc-banner__actions {
    margin-top: 22px;
}

.cbk-cc[data-cbk-layout="popup"] .cbk-cc-banner__actions .cbk-cc-btn {
    flex: 1 1 auto;
}

.cbk-cc-banner__close {
    position: absolute;
    top: 10px;
    right: 10px;
    display: grid;
    place-items: center;
    width: 36px;
    height: 36px;
    padding: 0;
    border: 1px solid transparent;
    border-radius: var(--cbk-cc-radius);
    background: transparent;
    color: var(--cbk-cc-muted);
    font-size: 24px;
    line-height: 1;
    cursor: pointer;
}

.cbk-cc-banner__close:hover {
    background: var(--cbk-cc-tint);
    color: var(--cbk-cc-ink);
}

/* ------------------------------------------------------------------ buttons */

.cbk-cc-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    min-height: 44px;
    margin: 0;
    padding: 10px 20px;
    border: 2px solid var(--cbk-cc-primary);
    border-radius: var(--cbk-cc-radius);
    background: var(--cbk-cc-primary);
    color: #fff;
    font-family: inherit;
    font-size: 15px;
    font-weight: 600;
    line-height: 1.2;
    text-align: center;
    text-decoration: none;
    cursor: pointer;
    transition: background-color 0.15s ease, color 0.15s ease;
}

.cbk-cc-btn:hover,
.cbk-cc-btn:focus {
    background: var(--cbk-cc-primary-dark);
    border-color: var(--cbk-cc-primary-dark);
    color: #fff;
}

/*
 * "Accept all" and "Reject non-essential" share one class on purpose: giving
 * either a softer treatment would nudge the choice.
 */
.cbk-cc-btn--secondary {
    background: transparent;
    color: var(--cbk-cc-primary);
}

.cbk-cc-btn--secondary:hover,
.cbk-cc-btn--secondary:focus {
    background: var(--cbk-cc-tint);
    border-color: var(--cbk-cc-primary-dark);
    color: var(--cbk-cc-primary-dark);
}

.cbk-cc-btn--link {
    min-height: 0;
    padding: 8px 12px;
    border-color: transparent;
    background: transparent;
    color: var(--cbk-cc-primary);
    text-decoration: underline;
}

.cbk-cc-btn--link:hover,
.cbk-cc-btn--link:focus {
    background: transparent;
    border-color: transparent;
    color: var(--cbk-cc-primary-dark);
}

.cbk-cc-btn:focus-visible,
.cbk-cc-banner__close:focus-visible,
.cbk-cc-modal__close:focus-visible,
.cbk-cc-group__more:focus-visible,
.cbk-cc-reopen:focus-visible,
.cbk-cc-inline-trigger:focus-visible,
.cbk-cc-switch__input:focus-visible + .cbk-cc-switch__track {
    outline: 3px solid var(--cbk-cc-accent);
    outline-offset: 2px;
}

/* ------------------------------------------------------------------- modal */

.cbk-cc-overlay {
    position: fixed;
    z-index: 2147483000;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    background: rgba(9, 17, 34, 0.62);
    overflow-y: auto;
}

.cbk-cc-modal {
    display: flex;
    flex-direction: column;
    box-sizing: border-box;
    width: 100%;
    max-width: 720px;
    max-height: calc(100vh - 48px);
    background: var(--cbk-cc-surface);
    border-radius: var(--cbk-cc-radius);
    box-shadow: 0 24px 60px rgba(9, 17, 34, 0.35);
    color: var(--cbk-cc-ink);
    font-family: var(--cbk-cc-font);
    font-size: 15px;
    line-height: 1.55;
}

.cbk-cc-modal__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 20px 24px;
    border-bottom: 1px solid var(--cbk-cc-line);
}

.cbk-cc-modal__title {
    margin: 0;
    color: var(--cbk-cc-primary);
    font-size: 20px;
    font-weight: 700;
}

.cbk-cc-modal__close {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    padding: 0;
    border: 1px solid transparent;
    border-radius: var(--cbk-cc-radius);
    background: transparent;
    color: var(--cbk-cc-muted);
    font-size: 26px;
    line-height: 1;
    cursor: pointer;
}

.cbk-cc-modal__close:hover {
    background: var(--cbk-cc-tint);
    color: var(--cbk-cc-ink);
}

.cbk-cc-modal__body {
    flex: 1 1 auto;
    padding: 20px 24px;
    overflow-y: auto;
}

.cbk-cc-modal__intro {
    margin: 0 0 20px;
    color: var(--cbk-cc-muted);
}

.cbk-cc-modal__policy {
    margin: 20px 0 0;
}

.cbk-cc-modal__policy a {
    color: var(--cbk-cc-primary);
    font-weight: 600;
}

.cbk-cc-modal__foot {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    padding: 16px 24px;
    border-top: 1px solid var(--cbk-cc-line);
    background: var(--cbk-cc-tint);
    border-radius: 0 0 var(--cbk-cc-radius) var(--cbk-cc-radius);
}

/* ------------------------------------------------------------- categories */

.cbk-cc-group {
    padding: 16px 0;
    border-bottom: 1px solid var(--cbk-cc-line);
}

.cbk-cc-group:last-of-type {
    border-bottom: 0;
}

.cbk-cc-group__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.cbk-cc-group__label {
    display: flex;
    align-items: center;
    gap: 12px;
}

.cbk-cc-group__badge {
    padding: 3px 10px;
    border-radius: 999px;
    background: var(--cbk-cc-tint);
    color: var(--cbk-cc-primary);
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    white-space: nowrap;
}

.cbk-cc-group__summary {
    margin: 10px 0 0;
    color: var(--cbk-cc-muted);
    font-size: 14px;
}

.cbk-cc-group__more {
    margin-top: 10px;
    padding: 4px 0;
    border: 0;
    background: none;
    color: var(--cbk-cc-primary);
    font-family: inherit;
    font-size: 14px;
    font-weight: 600;
    text-decoration: underline;
    cursor: pointer;
}

.cbk-cc-group__detail {
    margin-top: 12px;
    overflow-x: auto;
}

/* Switch: a real checkbox, restyled. The input stays operable by keyboard. */
.cbk-cc-switch {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
}

.cbk-cc-switch__input {
    position: absolute;
    width: 44px;
    height: 26px;
    margin: 0;
    opacity: 0;
    cursor: pointer;
}

.cbk-cc-switch__track {
    position: relative;
    flex: 0 0 auto;
    width: 44px;
    height: 26px;
    border: 2px solid var(--cbk-cc-muted);
    border-radius: 999px;
    background: #fff;
    transition: background-color 0.15s ease, border-color 0.15s ease;
}

.cbk-cc-switch__track::after {
    content: "";
    position: absolute;
    top: 3px;
    left: 3px;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: var(--cbk-cc-muted);
    transition: transform 0.15s ease, background-color 0.15s ease;
}

.cbk-cc-switch__input:checked + .cbk-cc-switch__track {
    border-color: var(--cbk-cc-primary);
    background: var(--cbk-cc-primary);
}

.cbk-cc-switch__input:checked + .cbk-cc-switch__track::after {
    background: #fff;
    transform: translateX(18px);
}

.cbk-cc-switch__input:disabled + .cbk-cc-switch__track {
    border-color: #8d93a1;
    background: #8d93a1;
    cursor: not-allowed;
}

.cbk-cc-switch__input:disabled ~ .cbk-cc-switch__text {
    cursor: not-allowed;
}

.cbk-cc-switch__text {
    font-size: 16px;
    font-weight: 700;
}

/* ------------------------------------------------------------ cookie table */

.cbk-cc-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13.5px;
}

.cbk-cc-table th,
.cbk-cc-table td {
    padding: 8px 12px;
    border: 1px solid var(--cbk-cc-line);
    text-align: left;
    vertical-align: top;
}

.cbk-cc-table thead th {
    background: var(--cbk-cc-tint);
    color: var(--cbk-cc-primary);
    font-weight: 700;
}

.cbk-cc-table code {
    font-size: 12.5px;
    word-break: break-word;
}

/* --------------------------------------------------------- blocked embeds */

.cbk-cc-embed {
    position: relative;
    display: block;
    box-sizing: border-box;
    border: 1px dashed var(--cbk-cc-line);
    border-radius: var(--cbk-cc-radius);
    background: var(--cbk-cc-tint);
}

.cbk-cc-embed.is-loaded {
    border: 0;
    background: none;
}

.cbk-cc-embed iframe[data-cbk-blocked] {
    display: none !important;
}

.cbk-cc-embed__notice {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 14px;
    min-height: 220px;
    padding: 28px 22px;
    text-align: center;
}

.cbk-cc-embed__text {
    max-width: 46ch;
    margin: 0;
    color: var(--cbk-cc-muted);
    font-size: 14.5px;
    line-height: 1.55;
}

.cbk-cc-embed__actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

/* --------------------------------------------------------- reopen triggers */

.cbk-cc-reopen {
    position: fixed;
    z-index: 2147481000;
    bottom: 18px;
    left: 18px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 40px;
    padding: 8px 14px;
    border: 1px solid var(--cbk-cc-line);
    border-radius: 999px;
    background: var(--cbk-cc-surface);
    box-shadow: 0 4px 16px rgba(22, 21, 28, 0.18);
    color: var(--cbk-cc-primary);
    font-family: inherit;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
}

.cbk-cc-reopen:hover {
    background: var(--cbk-cc-tint);
}

.cbk-cc-inline-trigger {
    padding: 0;
    border: 0;
    background: none;
    color: inherit;
    font: inherit;
    text-decoration: underline;
    cursor: pointer;
}

/* -------------------------------------------------------------- responsive */

@media (max-width: 900px) {
    .cbk-cc-banner__inner {
        display: block;
        padding: 18px 18px calc(18px + env(safe-area-inset-bottom, 0px));
    }

    .cbk-cc-banner__actions {
        margin-top: 16px;
    }

    .cbk-cc-banner__actions .cbk-cc-btn {
        flex: 1 1 100%;
    }

    .cbk-cc[data-cbk-layout="box"] .cbk-cc-banner {
        right: 0;
        bottom: 0;
        left: 0;
        max-width: none;
        border-radius: 0;
    }

    .cbk-cc-banner {
        max-height: 72vh;
        overflow-y: auto;
    }

    .cbk-cc[data-cbk-layout="popup"] .cbk-cc-scrim {
        padding: 14px;
    }

    .cbk-cc[data-cbk-layout="popup"] .cbk-cc-banner {
        max-height: calc(100vh - 28px);
    }

    .cbk-cc[data-cbk-layout="popup"] .cbk-cc-banner__inner {
        padding: 22px 20px 20px;
    }
}

@media (max-width: 640px) {
    .cbk-cc-overlay {
        padding: 0;
    }

    .cbk-cc-modal {
        max-width: none;
        max-height: 100vh;
        height: 100%;
        border-radius: 0;
    }

    .cbk-cc-modal__foot {
        border-radius: 0;
    }

    .cbk-cc-modal__foot .cbk-cc-btn {
        flex: 1 1 100%;
    }

    /* Stack the cookie table into labelled rows rather than scrolling it. */
    .cbk-cc-table thead {
        position: absolute;
        width: 1px;
        height: 1px;
        overflow: hidden;
        clip: rect(0 0 0 0);
        clip-path: inset(50%);
    }

    .cbk-cc-table,
    .cbk-cc-table tbody,
    .cbk-cc-table tr,
    .cbk-cc-table td {
        display: block;
        width: 100%;
        box-sizing: border-box;
    }

    .cbk-cc-table tr {
        margin-bottom: 10px;
        border: 1px solid var(--cbk-cc-line);
    }

    .cbk-cc-table td {
        border: 0;
        border-bottom: 1px solid var(--cbk-cc-line);
    }

    .cbk-cc-table td:last-child {
        border-bottom: 0;
    }

    .cbk-cc-table td::before {
        display: block;
        color: var(--cbk-cc-primary);
        content: attr(data-label);
        font-size: 11px;
        font-weight: 700;
        letter-spacing: 0.04em;
        text-transform: uppercase;
    }

    .cbk-cc-reopen span {
        display: none;
    }

    .cbk-cc-reopen {
        padding: 10px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .cbk-cc-btn,
    .cbk-cc-switch__track,
    .cbk-cc-switch__track::after {
        transition: none;
    }
}

@media (prefers-contrast: more), (forced-colors: active) {
    .cbk-cc-banner {
        border-top-width: 6px;
    }

    .cbk-cc-btn {
        border-width: 2px;
    }

    .cbk-cc-switch__track {
        border-width: 3px;
    }
}
