/* Shared privacy controls, using FUSION NOW's existing type and colour palette. */
.cookie-manager,
.consent-embed {
    --consent-blue: var(--main-blue-title, #165189);
    --consent-orange: var(--main-orange, #e94f13);
    font-family: "Aptos", Calibri, sans-serif;
    font-size: 16px;
    line-height: 1.5;
    color: var(--consent-blue);
    text-align: left;
}

.cookie-manager *,
.consent-embed * { box-sizing: border-box; }
.cookie-manager [hidden],
.consent-embed [hidden] { display: none !important; }

.cookie-launcher {
    position: fixed;
    bottom: max(22px, env(safe-area-inset-bottom));
    left: max(22px, env(safe-area-inset-left));
    z-index: 10010;
    display: grid;
    place-items: center;
    width: 54px;
    height: 54px;
    padding: 0;
    border: 2px solid white;
    border-radius: 50%;
    background: var(--consent-orange);
    color: white;
    box-shadow: 0 5px 22px #16518930;
    cursor: pointer;
    transition: background-color .18s, transform .18s;
}
.cookie-launcher:hover { background: var(--consent-blue); transform: translateY(-2px); }

.cookie-banner,
.cookie-preferences {
    border: 1px solid #16518924;
    border-radius: 24px;
    background: #fff;
    box-shadow: 0 16px 64px #12395926;
    color: var(--consent-blue);
}
.cookie-banner {
    position: fixed;
    left: max(22px, env(safe-area-inset-left));
    bottom: calc(max(22px, env(safe-area-inset-bottom)) + 68px);
    z-index: 10009;
    width: min(440px, calc(100vw - 44px));
    max-height: calc(100dvh - 112px);
    overflow-y: auto;
    padding: 26px;
    background: radial-gradient(circle at 100% 0, #86bfd240 0 58px, transparent 59px), #fff;
}
.cookie-eyebrow {
    display: block;
    color: #b83b0b;
    font-family: "AptosBold", Calibri, sans-serif;
    font-size: .73rem;
    letter-spacing: .12em;
    margin-bottom: 10px;
}
.cookie-manager h2 {
    font-family: "Days", sans-serif;
    font-size: 1.35rem;
    font-weight: 400;
    line-height: 1.4;
    color: var(--consent-blue);
    text-align: left;
    margin: 0 0 14px;
}
.cookie-manager p { color: #586570; font-size: 1rem; margin: 0 0 14px; line-height: 1.5; }
.cookie-manager p.cookie-small { font-size: .85rem; margin: 0; }
.cookie-actions { display: flex; gap: 10px; margin-top: 20px; }
.cookie-actions > button { flex: 1; }

.cookie-manager .consent-button,
.consent-embed .consent-button {
    min-width: 0;
    min-height: 44px;
    height: auto;
    padding: 10px 15px;
    border: 1px solid var(--consent-blue);
    border-radius: 12px;
    background: white;
    color: var(--consent-blue);
    font: 600 .95rem/1.35 "Aptos", Calibri, sans-serif;
    letter-spacing: 0;
    text-align: center;
    cursor: pointer;
    box-shadow: none;
    transform: none;
    transition: background-color .18s, color .18s;
}
.cookie-manager .consent-button:hover,
.consent-embed .consent-button:hover { background: var(--consent-blue); color: white; }
.cookie-manager .consent-button--primary,
.consent-embed .consent-button--primary { background: var(--consent-blue); color: white; }
.cookie-manager .consent-button--primary:hover,
.consent-embed .consent-button--primary:hover { background: #103f6c; }
.cookie-banner__links { display: flex; justify-content: space-between; gap: 12px; margin-top: 12px; align-items: center; }
.consent-link {
    display: inline-block;
    border: 0;
    padding: 7px 0;
    background: transparent;
    color: var(--consent-blue, #165189);
    font: inherit;
    font-size: .87rem;
    text-decoration: underline;
    text-underline-offset: 3px;
    cursor: pointer;
}
.cookie-manager a { color: var(--consent-blue); text-decoration: underline; text-underline-offset: 3px; }
.cookie-manager :is(button, a, input):focus-visible,
.consent-embed :is(button, a):focus-visible { outline: 3px solid var(--consent-orange); outline-offset: 4px; }

.cookie-preferences {
    position: fixed;
    inset: 0;
    width: min(590px, calc(100vw - 32px));
    max-width: none;
    max-height: calc(100dvh - 32px);
    margin: auto;
    padding: 0;
    overflow-y: auto;
    overscroll-behavior: contain;
}
.cookie-preferences::backdrop { background: #0c294b80; backdrop-filter: blur(4px); }
html:has(.cookie-preferences[open]) { overflow: hidden; }
.cookie-preferences__header { position: relative; padding: 28px 28px 22px; background: #edf5f8; border-bottom: 1px solid #16518916; }
.cookie-preferences__header h2 { padding-right: 28px; }
.cookie-preferences__header p { margin: 0; }
.cookie-close {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 40px;
    height: 40px;
    border: 0;
    border-radius: 50%;
    background: transparent;
    color: var(--consent-blue);
    font: 28px/1 "Aptos", sans-serif;
    cursor: pointer;
}
.cookie-close:hover { background: #16518912; }
.cookie-services { padding: 0 28px; }
.cookie-service { display: flex; gap: 20px; justify-content: space-between; align-items: center; padding: 20px 0; border-bottom: 1px solid #16518916; }
.cookie-service > div { flex: 1; }
.cookie-manager .cookie-service h3 { font: 600 1.05rem/1.4 "AptosBold", Calibri, sans-serif; color: var(--consent-blue); margin: 0 0 5px; }
.cookie-manager .cookie-service p { font-size: .87rem; margin: 0; }
.cookie-service label { cursor: pointer; }
.cookie-required { flex-shrink: 0; color: #406120; background: #edf5db; border-radius: 20px; font-size: .75rem; padding: 6px 10px; }
.cookie-toggle {
    appearance: none;
    -webkit-appearance: none;
    flex-shrink: 0;
    width: 46px;
    height: 28px;
    margin: 0;
    border: 1px solid #738694;
    border-radius: 20px;
    background: #e1e8ec;
    cursor: pointer;
    position: relative;
}
.cookie-toggle::before { content: ""; position: absolute; width: 20px; height: 20px; top: 3px; left: 3px; border-radius: 50%; background: #596e7f; transition: transform .18s; }
.cookie-toggle:checked { background: var(--consent-blue); border-color: var(--consent-blue); }
.cookie-toggle:checked::before { background: white; transform: translateX(18px); }
.cookie-preferences__footer { padding: 4px 28px 24px; }
.cookie-save { width: 100%; margin: 10px 0 14px; }
.cookie-status { position: fixed; z-index: 10011; bottom: 24px; left: 90px; max-width: min(430px, calc(100vw - 112px)); padding: 12px 16px; background: #fff; border: 1px solid #16518924; border-radius: 12px; box-shadow: 0 5px 22px #16518920; }
.cookie-manager .cookie-status { font-size: .85rem; margin: 0; }

.consent-embed { position: relative; width: 100%; border-radius: 16px; overflow: hidden; background: #edf5f8; }
.consent-embed--video { aspect-ratio: 16 / 9; }
.consent-embed--positioned { position: absolute; inset: 0; height: 100%; aspect-ratio: auto; }
.consent-embed--video > iframe { position: absolute !important; inset: 0; width: 100% !important; height: 100% !important; border: 0; }
.consent-embed__placeholder { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; padding: clamp(18px, 4vw, 36px); text-align: center; }
.consent-embed--video .consent-embed__placeholder { position: absolute; inset: 0; overflow-y: auto; background: radial-gradient(circle at 100% 0, #86bfd230 0 26%, transparent 26.2%), #edf5f8; }
.consent-embed__symbol { display: grid; place-items: center; width: 42px; height: 42px; flex-shrink: 0; background: #fff; border-radius: 50%; color: var(--consent-orange); font-size: 1.1rem; }
.consent-embed p.consent-embed__title { margin: 0 !important; font: 600 1.15rem/1.3 "AptosBold", Calibri, sans-serif !important; color: var(--consent-blue); }
.consent-embed p.consent-embed__description { margin: 0 0 4px !important; font: .92rem/1.45 "Aptos", Calibri, sans-serif !important; color: #586570; max-width: 430px; }
.consent-embed--form .consent-embed__placeholder { min-height: 330px; }

@media (max-width: 540px) {
    .cookie-launcher { bottom: max(14px, env(safe-area-inset-bottom)); left: 14px; width: 50px; height: 50px; }
    .cookie-banner { left: 14px; bottom: calc(max(14px, env(safe-area-inset-bottom)) + 62px); width: calc(100vw - 28px); padding: 22px; max-height: calc(100dvh - 90px); border-radius: 20px; }
    .cookie-manager h2 { font-size: 1.2rem; }
    .cookie-preferences__header { padding: 24px 20px 20px; }
    .cookie-preferences__header .cookie-eyebrow { padding-right: 25px; }
    .cookie-services { padding: 0 20px; }
    .cookie-service { gap: 12px; }
    .cookie-preferences__footer { padding: 0 20px 20px; }
    .consent-embed--video:not(.consent-embed--positioned) { min-height: 280px; }
    div:has(> .consent-embed--positioned) { min-height: 270px; }
    .consent-embed--positioned .consent-embed__placeholder { gap: 6px; padding: 12px; justify-content: flex-start; }
    .consent-embed--positioned .consent-embed__symbol { display: none; }
    .consent-embed--positioned p.consent-embed__title { font-size: 1rem !important; }
    .consent-embed--positioned p.consent-embed__description { font-size: .8rem !important; }
    .consent-embed--positioned .consent-button { font-size: .85rem; padding: 9px 12px; }
    .cookie-status { left: 78px; bottom: 16px; max-width: calc(100vw - 92px); }
}
@media (prefers-reduced-motion: reduce) {
    .cookie-manager *, .consent-embed * { transition: none !important; }
}
@media (forced-colors: active) {
    .cookie-toggle { appearance: auto; }
    .cookie-toggle::before { display: none; }
}
