/* Cookie banner + settings window + Cookie Policy page.
   Dark by default like the site; light when the visitor picks "Light" (this theme puts .active-dark-mode on <body> for its LIGHT look).
   px units: the theme sets html { font-size: 62.5% }. */
:root {
    --cc-bg: #17151f;
    --cc-bg-2: #211e2c;
    --cc-line: rgba(255, 255, 255, .14);
    --cc-heading: #ffffff;
    --cc-text: #c4c4cc;
    --cc-accent: #805af5;
    --cc-accent-2: #6a48f2;
    --cc-shadow: 0 -10px 40px rgba(0, 0, 0, .45);
}
body.active-dark-mode {
    --cc-bg: #ffffff;
    --cc-bg-2: #f3f4f6;
    --cc-line: #e5e7eb;
    --cc-heading: #111827;
    --cc-text: #4b5563;
    --cc-shadow: 0 -10px 40px rgba(17, 24, 39, .12);
}

/* ---------- Banner ---------- */
.cc-banner { position: fixed; z-index: 99990; color: var(--cc-text); font-size: 15px; line-height: 1.6; }
.cc-banner[hidden] { display: none !important; }
.cc-banner--bottom { left: 0; right: 0; bottom: 0; background: var(--cc-bg); border-top: 1px solid var(--cc-line); box-shadow: var(--cc-shadow); }
.cc-banner--bottom .cc-banner__inner { max-width: 1240px; margin: 0 auto; padding: 18px 24px; display: flex; gap: 20px 32px; align-items: center; justify-content: space-between; }
.cc-banner--bottom-left, .cc-banner--bottom-right { bottom: 20px; width: min(420px, calc(100vw - 32px)); background: var(--cc-bg); border: 1px solid var(--cc-line); border-radius: 16px; box-shadow: var(--cc-shadow); }
.cc-banner--bottom-left { left: 20px; }
.cc-banner--bottom-right { right: 20px; }
.cc-banner--bottom-left .cc-banner__inner, .cc-banner--bottom-right .cc-banner__inner { padding: 20px; display: flex; flex-direction: column; gap: 14px; }
.cc-banner__title { margin: 0 0 4px; font-size: 17px; font-weight: 600; color: var(--cc-heading); }
.cc-banner__msg { margin: 0; color: var(--cc-text); font-size: 15px; }
.cc-banner__msg a, .cc-modal a { color: var(--cc-accent); text-decoration: underline; }
.cc-banner__actions { display: flex; flex-wrap: wrap; gap: 10px; flex-shrink: 0; }

/* ---------- Buttons ---------- */
.cc-btn { font-size: 15px; font-weight: 600; line-height: 1.2; padding: 11px 18px; border-radius: 10px; border: 1px solid transparent; cursor: pointer; white-space: nowrap; transition: background .15s, border-color .15s, color .15s; }
.cc-btn--primary { background: var(--cc-accent); color: #fff; }
.cc-btn--primary:hover { background: var(--cc-accent-2); }
.cc-btn--outline { background: transparent; color: var(--cc-heading); border-color: var(--cc-line); }
.cc-btn--outline:hover { border-color: var(--cc-accent); }
.cc-btn--ghost { background: var(--cc-bg-2); color: var(--cc-heading); }
.cc-btn--ghost:hover { border-color: var(--cc-accent); }
.cc-btn:focus-visible, .cc-modal__x:focus-visible, .cc-switch input:focus-visible + .cc-switch__ui { outline: 3px solid var(--cc-accent); outline-offset: 2px; }

/* ---------- Settings window ---------- */
.cc-modal { position: fixed; inset: 0; z-index: 99995; display: flex; align-items: center; justify-content: center; padding: 16px; }
.cc-modal[hidden] { display: none !important; }
.cc-modal__backdrop { position: absolute; inset: 0; background: rgba(0, 0, 0, .6); }
.cc-modal__box { position: relative; width: min(560px, 100%); max-height: calc(100vh - 32px); display: flex; flex-direction: column; background: var(--cc-bg); color: var(--cc-text); border: 1px solid var(--cc-line); border-radius: 16px; box-shadow: 0 20px 60px rgba(0, 0, 0, .5); outline: none; }
.cc-modal__head { display: flex; align-items: center; justify-content: space-between; padding: 18px 22px; border-bottom: 1px solid var(--cc-line); }
.cc-modal__title { margin: 0; font-size: 20px; font-weight: 600; color: var(--cc-heading); }
.cc-modal__x { background: none; border: 0; font-size: 28px; line-height: 1; color: var(--cc-text); cursor: pointer; padding: 0 4px; }
.cc-modal__body { padding: 18px 22px; overflow-y: auto; }
.cc-modal__intro { font-size: 15px; margin: 0 0 14px; }
.cc-modal__foot { display: flex; flex-wrap: wrap; gap: 10px; justify-content: flex-end; padding: 16px 22px; border-top: 1px solid var(--cc-line); }
.cc-cat { padding: 14px 0; border-top: 1px solid var(--cc-line); }
.cc-cat:first-of-type { border-top: 0; }
.cc-cat__row { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.cc-cat__label { font-size: 16px; font-weight: 600; color: var(--cc-heading); margin: 0; }
.cc-cat__always { font-size: 13px; font-weight: 600; color: var(--cc-accent); }
.cc-cat__text { margin: 6px 0 0; font-size: 14px; line-height: 1.6; color: var(--cc-text); }

.cc-switch { position: relative; display: inline-flex; width: 48px; height: 28px; flex-shrink: 0; margin: 0; cursor: pointer; }
.cc-switch input { position: absolute; opacity: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.cc-switch__ui { width: 100%; height: 100%; border-radius: 999px; background: var(--cc-line); transition: background .2s; position: relative; }
.cc-switch__ui::after { content: ""; position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, .3); transition: transform .2s; }
.cc-switch input:checked + .cc-switch__ui { background: var(--cc-accent); }
.cc-switch input:checked + .cc-switch__ui::after { transform: translateX(20px); }

html.cc-lock, html.cc-lock body { overflow: hidden; }

/* footer "Cookie settings" link-button */
.cc-link { background: none; border: 0; padding: 0; color: inherit; font: inherit; cursor: pointer; text-align: left; }
.cc-link:hover { text-decoration: underline; }

/* ---------- Cookie Policy page ---------- */
.cookie-page { padding: 60px 0 80px; color: var(--cc-text); }
.cookie-page__wrap { max-width: 900px; margin: 0 auto; }
.cookie-page h1 { color: var(--cc-heading); font-size: clamp(32px, 5vw, 48px); margin: 0 0 8px; }
.cookie-page__updated { font-size: 14px; color: var(--cc-text); opacity: .8; margin: 0 0 24px; }
.cookie-page__actions { margin: 0 0 32px; }
.cookie-page__body h2 { color: var(--cc-heading); font-size: clamp(22px, 3vw, 28px); margin: 36px 0 12px; }
.cookie-page__body h3 { color: var(--cc-heading); font-size: 20px; margin: 24px 0 10px; }
.cookie-page__body h4 { color: var(--cc-heading); font-size: 18px; margin: 20px 0 8px; }
.cookie-page__body p, .cookie-page__body li { font-size: 16px; line-height: 1.75; color: var(--cc-text); }
.cookie-page__body ul, .cookie-page__body ol { padding-left: 22px; margin: 0 0 16px; }
.cookie-page__body a { color: var(--cc-accent); }
.cookie-page__table { width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; margin: 16px 0 24px; }
.cookie-page__body table { width: 100%; min-width: 560px; border-collapse: collapse; font-size: 15px; }
.cookie-page__body th, .cookie-page__body td { border: 1px solid var(--cc-line); padding: 10px 14px; text-align: left; vertical-align: top; color: var(--cc-text); }
.cookie-page__body th { color: var(--cc-heading); background: var(--cc-bg-2); }

/* ---------- Phones ---------- */
@media (max-width: 767.98px) {
    .cc-banner--bottom .cc-banner__inner { flex-direction: column; align-items: stretch; padding: 16px; gap: 14px; }
    .cc-banner--bottom-left, .cc-banner--bottom-right { left: 16px; right: 16px; bottom: 16px; width: auto; }
    .cc-banner__actions { display: grid; grid-template-columns: 1fr 1fr; }
    .cc-banner__actions .cc-btn--primary { grid-column: 1 / -1; order: -1; }
    .cc-btn { white-space: normal; padding: 12px 14px; }
    .cc-banner__msg { font-size: 13px; line-height: 1.5; }
    .cc-banner__title { font-size: 15px; }
    .cc-btn { padding: 10px 12px; font-size: 14px; }
    .cc-modal { padding: 0; align-items: flex-end; }
    .cc-modal__box { width: 100%; max-height: 92vh; border-radius: 16px 16px 0 0; }
    .cc-modal__foot { display: grid; grid-template-columns: 1fr 1fr; }
    .cc-modal__foot .cc-btn--primary { grid-column: 1 / -1; order: -1; }
    .cookie-page { padding: 32px 0 56px; }
}

/* Phones turned sideways: keep the banner short (one row of buttons) */
@media (max-height: 500px) and (orientation: landscape) {
    .cc-banner--bottom .cc-banner__inner { flex-direction: column; align-items: stretch; padding: 10px 16px; gap: 8px; }
    .cc-banner__title { display: none; }
    .cc-banner__msg { font-size: 13px; line-height: 1.45; }
    .cc-banner__actions { display: flex; flex-wrap: nowrap; justify-content: flex-end; gap: 6px; }
    .cc-banner__actions .cc-btn--primary { order: 0; grid-column: auto; }
    .cc-btn { padding: 9px 12px; font-size: 13px; white-space: nowrap; }
    .cc-banner--bottom-left, .cc-banner--bottom-right { bottom: 8px; }
    .cc-modal__box { max-height: calc(100vh - 16px); }
}
