/* Cookie consent bar, preferences window and cookie button (see js/consent.js), styled after CrumbSignal */
.consent {
    --consent-accent: #9e1f63;
    --consent-bg: #fff;
    --consent-text: #082f49;
    color: var(--consent-text);
    font-family: inherit;
    font-size: 16px;
    line-height: 1.5;
    position: relative;
    z-index: 2147483000;
}
.consent [hidden] { display: none !important; }
.consent *, .consent *::before, .consent *::after { box-sizing: border-box; }
.consent button, .consent input { font-family: inherit; }

.consent__banner {
    align-items: center;
    background: var(--consent-bg);
    border: 1px solid color-mix(in srgb, var(--consent-text) 13%, transparent);
    border-radius: 16px;
    bottom: 20px;
    box-shadow: 0 18px 60px rgba(8, 47, 73, .18);
    display: flex;
    gap: 32px;
    left: 20px;
    margin: auto;
    max-width: 1180px;
    padding: 24px;
    position: fixed;
    right: 20px;
}
.consent__copy { flex: 1; min-width: 0; }
.consent__copy h2, .consent__modal h2 {
    color: var(--consent-text);
    font-size: 20px;
    font-weight: 800;
    letter-spacing: -.01em;
    line-height: 1.2;
    margin: 0 0 6px;
}
.consent__copy p, .consent__category p {
    color: color-mix(in srgb, var(--consent-text) 72%, transparent);
    font-size: 14px;
    margin: 0;
}
.consent a { color: var(--consent-accent); font-weight: 600; text-decoration: underline; text-underline-offset: 2px; }
.consent a:hover { text-decoration: none; }

.consent__actions { display: flex; flex-shrink: 0; flex-wrap: wrap; gap: 10px; justify-content: flex-end; }
.consent__button {
    border: 1px solid var(--consent-accent);
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 700;
    min-height: 44px;
    padding: 10px 18px;
}
.consent__button--primary { background: var(--consent-accent); color: #fff; }
.consent__button--secondary { background: transparent; border-color: color-mix(in srgb, var(--consent-text) 25%, transparent); color: var(--consent-text); }
.consent__button--reject { background: var(--consent-text); border-color: var(--consent-text); color: var(--consent-bg); }
.consent__button:hover { filter: brightness(.94); }
.consent__button:focus-visible, .consent__close:focus-visible, .consent__revisit:focus-visible, .consent__switch input:focus-visible + span {
    outline: 3px solid color-mix(in srgb, var(--consent-accent) 35%, transparent);
    outline-offset: 3px;
}

.consent__overlay { background: rgba(8, 18, 32, .55); inset: 0; position: fixed; }
.consent__modal {
    background: var(--consent-bg);
    border-radius: 16px;
    box-shadow: 0 24px 80px rgba(0, 0, 0, .28);
    left: 50%;
    max-height: min(720px, calc(100vh - 40px));
    max-width: 640px;
    overflow: auto;
    position: fixed;
    top: 50%;
    transform: translate(-50%, -50%);
    width: calc(100% - 40px);
}
.consent__modal header {
    align-items: flex-start;
    border-bottom: 1px solid color-mix(in srgb, var(--consent-text) 12%, transparent);
    display: flex;
    justify-content: space-between;
    padding: 24px;
}
.consent__modal header span {
    color: var(--consent-accent);
    display: block;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: .12em;
    margin-bottom: 6px;
    text-transform: uppercase;
}
.consent__modal header h2 { margin: 0; }
.consent__close { background: transparent; border: 0; color: var(--consent-text); cursor: pointer; font-size: 32px; line-height: 1; padding: 0 4px; }
.consent__categories { padding: 8px 24px; }
.consent__category {
    align-items: center;
    border-bottom: 1px solid color-mix(in srgb, var(--consent-text) 10%, transparent);
    display: flex;
    gap: 24px;
    justify-content: space-between;
    padding: 20px 0;
}
.consent__category:last-child { border-bottom: 0; }
.consent__category h3 { color: var(--consent-text); font-size: 16px; font-weight: 700; margin: 0 0 4px; }
.consent__always { color: var(--consent-accent); font-size: 12px; font-weight: 800; white-space: nowrap; }
.consent__switch { display: block; flex: 0 0 auto; }
.consent__switch input { height: 1px; opacity: 0; position: absolute; width: 1px; }
.consent__switch span:last-child {
    background: #cbd5e1;
    border-radius: 22px;
    cursor: pointer;
    display: block;
    height: 26px;
    position: relative;
    transition: .2s;
    width: 46px;
}
.consent__switch span:last-child::after {
    background: #fff;
    border-radius: 50%;
    box-shadow: 0 1px 4px rgba(0, 0, 0, .25);
    content: "";
    height: 20px;
    left: 3px;
    position: absolute;
    top: 3px;
    transition: .2s;
    width: 20px;
}
.consent__switch input:checked + span { background: var(--consent-accent); }
.consent__switch input:checked + span::after { transform: translateX(20px); }
.consent__sr { clip: rect(0 0 0 0); height: 1px; overflow: hidden; position: absolute; white-space: nowrap; width: 1px; }
.consent__modal footer {
    border-top: 1px solid color-mix(in srgb, var(--consent-text) 12%, transparent);
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    padding: 20px 24px;
}

.consent__revisit {
    align-items: center;
    background: var(--consent-accent);
    border: 0;
    border-radius: 50%;
    bottom: 18px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, .2);
    color: #fff;
    cursor: pointer;
    display: flex;
    height: 50px;
    justify-content: center;
    left: 18px;
    padding: 12px;
    position: fixed;
    width: 50px;
}
.consent__revisit svg { fill: currentColor; height: 26px; width: 26px; }
.consent-open { overflow: hidden; }

@media (max-width: 760px) {
    .consent__banner { align-items: stretch; bottom: 10px; flex-direction: column; gap: 18px; left: 10px; padding: 20px; right: 10px; }
    .consent__actions { display: grid; grid-template-columns: 1fr 1fr; }
    .consent__actions .consent__button--primary { grid-column: 1 / -1; grid-row: 1; }
    .consent__modal { max-height: calc(100vh - 20px); width: calc(100% - 20px); }
    .consent__modal footer { align-items: stretch; flex-direction: column; }
    .consent__category { align-items: flex-start; }
}
@media (prefers-reduced-motion: reduce) {
    .consent * { transition: none !important; }
}
