/* Cookie consent banner + preference centre. Self-contained: the standalone
   pages and the 404 page load neither Bootstrap nor style.css. */

.cookie-banner[hidden] { display: none; }

.cookie-banner,
.cookie-prefs {
    --cc-accent: #00AEFF;
    --cc-bg: #060b1f;
    --cc-border: rgba(0, 140, 255, .32);
    --cc-muted: #cccccc;

    box-sizing: border-box;
    color: #fff;
    background: var(--cc-bg);
    font-family: "Poppins", "Segoe UI", Arial, sans-serif;
    font-size: 14px;
    line-height: 1.6;
    text-align: left;
}

.cookie-banner *,
.cookie-prefs * { box-sizing: border-box; font-family: inherit; }

.cookie-banner p,
.cookie-prefs p { margin: 0; color: var(--cc-muted); font-size: 14px; line-height: 1.6; }

.cookie-banner p a,
.cookie-prefs p a { color: var(--cc-accent); text-decoration: underline; text-underline-offset: 2px; }

.cookie-banner a:focus-visible,
.cookie-prefs a:focus-visible,
.cookie-prefs summary:focus-visible,
.cookie-prefs__close:focus-visible,
.cookie-banner__customize:focus-visible,
.cookie-switch:focus-visible,
.cookie-btn:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }

/* ---- banner: floating box, bottom left ---- */
.cookie-banner {
    position: fixed;
    left: 20px;
    bottom: 20px;
    z-index: 100000000; /* above the fixed site header */
    width: 520px;
    max-width: calc(100vw - 40px);
    max-height: calc(100vh - 40px);
    padding: 18px 24px 22px;
    overflow-y: auto;
    border: 1px solid var(--cc-border);
    border-radius: 12px;
    box-shadow: 0 12px 40px rgba(0, 0, 0, .6);
    animation: cookieBannerIn .8s cubic-bezier(.22, 1, .36, 1);
}

/* slides up from below the screen */
@keyframes cookieBannerIn {
    from { transform: translateY(calc(100% + 40px)); opacity: 0; }
    to { transform: none; opacity: 1; }
}

.cookie-banner__head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 4px; }

.cookie-banner .cookie-banner__title { color: #fff; font-size: 16px; font-weight: 600; }

.cookie-banner__actions { display: flex; align-items: center; justify-content: flex-end; gap: 12px; margin-top: 18px; }

.cookie-banner__customize {
    min-height: 44px;
    margin-right: 10px;
    padding: 0;
    border: 0;
    background: none;
    color: var(--cc-accent);
    font-size: 14px;
    font-weight: 600;
    text-decoration: underline;
    text-underline-offset: 3px;
    cursor: pointer;
}

.cookie-banner__customize:hover { color: #4cc7ff; }

/* ---- buttons ---- */
.cookie-btn {
    min-height: 44px;
    padding: 9px 22px;
    border: 1px solid var(--cc-accent);
    border-radius: 8px;
    background: var(--cc-accent);
    color: #020014;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.4;
    white-space: nowrap;
    cursor: pointer;
    transition: background-color .2s, border-color .2s;
}

.cookie-btn:hover { background: #4cc7ff; border-color: #4cc7ff; }
.cookie-btn--light { background: #8fdcff; border-color: #8fdcff; }
.cookie-btn--light:hover { background: #b5e8ff; border-color: #b5e8ff; }

/* ---- preference centre ---- */
.cookie-prefs-open { overflow: hidden; }

.cookie-prefs {
    width: 640px;
    max-width: calc(100vw - 32px);
    height: 590px; /* fixed: opening a row scrolls the body instead of growing the box */
    max-height: calc(100vh - 48px);
    max-height: calc(100dvh - 48px);
    margin: auto;
    padding: 0;
    overflow: hidden;
    border: 1px solid var(--cc-border);
    border-radius: 14px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, .6);
}

.cookie-prefs[open] { display: flex; flex-direction: column; }
.cookie-prefs::backdrop { background: rgba(0, 0, 0, .7); }

.cookie-prefs__head,
.cookie-prefs__foot { flex: 0 0 auto; display: flex; align-items: center; padding: 16px 24px; }

.cookie-prefs__head { justify-content: space-between; border-bottom: 1px solid #ffffff14; }
.cookie-prefs__foot { justify-content: flex-end; gap: 12px; border-top: 1px solid #ffffff14; }
.cookie-prefs__head h2 { margin: 0; color: #fff; font-size: 20px; font-weight: 600; line-height: 1.4; }

.cookie-prefs__close {
    width: 40px;
    height: 40px;
    margin-right: -10px;
    padding: 0;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: #fff;
    font-size: 28px;
    line-height: 1;
    cursor: pointer;
}

.cookie-prefs__close:hover { background: #ffffff14; }

.cookie-prefs__body { flex: 1 1 auto; min-height: 0; padding: 18px 24px; overflow-y: auto; overscroll-behavior: contain; scrollbar-gutter: stable; scrollbar-width: thin; scrollbar-color: #2b4a7a transparent; }

.cookie-prefs .cookie-prefs__more { margin-top: 10px; }
.cookie-prefs__sub { margin: 22px 0 12px; color: #fff; font-size: 16px; font-weight: 600; line-height: 1.4; }

/* accordion rows */
.cookie-cats { border: 1px solid #ffffff24; border-radius: 10px; overflow: hidden; }
.cookie-cat { position: relative; background: #0a1028; }
.cookie-cat + .cookie-cat { border-top: 1px solid #ffffff24; }

.cookie-cat summary {
    display: flex;
    align-items: center;
    gap: 12px;
    min-height: 54px;
    padding: 12px 16px;
    color: #fff;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.4;
    list-style: none;
    cursor: pointer;
}

.cookie-cat summary::-webkit-details-marker { display: none; }
.cookie-cat summary:hover { background: rgba(0, 174, 255, .08); }
.cookie-prefs .cookie-cat summary:focus-visible { outline-offset: -3px; border-radius: 10px; }

/* plus / minus */
.cookie-cat summary::before {
    content: "";
    flex: 0 0 auto;
    width: 12px;
    height: 12px;
    background:
        linear-gradient(var(--cc-accent), var(--cc-accent)) center / 12px 2px no-repeat,
        linear-gradient(var(--cc-accent), var(--cc-accent)) center / 2px 12px no-repeat;
}

.cookie-cat details[open] summary::before { background: linear-gradient(var(--cc-accent), var(--cc-accent)) center / 12px 2px no-repeat; }

/* rows with a switch: it lies over the row, so leave room for it */
.cookie-cat summary[id] { padding-right: 78px; }
.cookie-cat .cookie-switch { position: absolute; top: 14px; right: 16px; }

.cookie-cat__always { margin-left: auto; color: var(--cc-accent); font-size: 13px; white-space: nowrap; }
.cookie-cat__panel { padding: 14px 16px 16px; border-top: 1px solid #ffffff14; background: #111936; }

.cookie-switch {
    position: relative;
    flex: 0 0 auto;
    width: 46px;
    height: 26px;
    margin: 0;
    border-radius: 13px;
    background: #5b6275;
    -webkit-appearance: none;
    appearance: none;
    cursor: pointer;
    transition: background-color .2s;
}

.cookie-switch::after {
    content: "";
    position: absolute;
    top: 3px;
    left: 3px;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #fff;
    transition: transform .2s;
}

.cookie-switch:checked { background: var(--cc-accent); }
.cookie-switch:checked::after { transform: translateX(20px); }

/* a button that reads as a text link (cookie policy) */
.cookie-settings-link { padding: 0; border: 0; background: none; font: inherit; cursor: pointer; }

/* ---- small screens ---- */
@media (max-width: 575px) {
    .cookie-banner { right: 12px; bottom: 12px; left: 12px; width: auto; max-width: none; padding: 12px 16px 14px; }
    .cookie-banner__actions,
    .cookie-prefs__foot { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
    .cookie-banner__actions { margin-top: 12px; }
    .cookie-prefs { height: 100%; } /* up to max-height */
    .cookie-prefs__foot { grid-template-columns: 1fr 1.4fr; }
    .cookie-banner__customize { grid-column: 1 / -1; grid-row: 2; margin: 0; min-height: 36px; }
    .cookie-banner p, .cookie-prefs p { font-size: 13px; }
    .cookie-prefs__head, .cookie-prefs__body, .cookie-prefs__foot { padding: 14px 16px; }
    .cookie-btn { padding: 9px 12px; }
}

@media (prefers-reduced-motion: reduce) {
    .cookie-banner { animation: none; }
    .cookie-btn, .cookie-switch, .cookie-switch::after { transition: none; }
}

@media print { .cookie-banner, .cookie-prefs { display: none !important; } }
