/*!
 * Cookie Consent  v1.0.0 - styles
 * All selectors are prefixed with .cc- to avoid collisions.
 * Theme with the custom properties below (override on .cc-root or :root).
 */
.cc-root {
  --cc-font: inherit;
  --cc-bg: #ffffff;
  --cc-surface: #f5f6f8;
  --cc-text: #1b1f24;
  --cc-muted: #4a525c;
  --cc-border: #d9dde3;
  --cc-accent: #1f4fd1;          /* buttons + toggles */
  --cc-accent-text: #ffffff;
  --cc-accent-hover: #173fa8;
  --cc-focus: #f2a900;
  --cc-backdrop: rgba(15, 18, 24, 0.55);
  --cc-radius: 10px;
  --cc-shadow: 0 -6px 28px rgba(15, 18, 24, 0.14);
  --cc-z: 2147483000;
  --cc-max: 1180px;

  font-family: var(--cc-font);
  color: var(--cc-text);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

.cc-root.cc-theme-dark {
  --cc-bg: #15181d;
  --cc-surface: #1e2229;
  --cc-text: #eef1f5;
  --cc-muted: #b4bcc7;
  --cc-border: #343a44;
  --cc-accent: #6f9bff;
  --cc-accent-text: #0b0d10;
  --cc-accent-hover: #93b4ff;
  --cc-shadow: 0 -6px 28px rgba(0, 0, 0, 0.5);
}

@media (prefers-color-scheme: dark) {
  .cc-root.cc-theme-auto {
    --cc-bg: #15181d;
    --cc-surface: #1e2229;
    --cc-text: #eef1f5;
    --cc-muted: #b4bcc7;
    --cc-border: #343a44;
    --cc-accent: #6f9bff;
    --cc-accent-text: #0b0d10;
    --cc-accent-hover: #93b4ff;
    --cc-shadow: 0 -6px 28px rgba(0, 0, 0, 0.5);
  }
}

.cc-root *,
.cc-root *::before,
.cc-root *::after { box-sizing: border-box; }

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

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

/* ---------- Sticky banner ---------- */
.cc-banner {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  z-index: var(--cc-z);
  background: var(--cc-bg);
  color: var(--cc-text);
  border-top: 1px solid var(--cc-border);
  box-shadow: var(--cc-shadow);
  padding: 20px 20px calc(20px + env(safe-area-inset-bottom, 0px));
  transform: translateY(100%);
  opacity: 0;
  transition: transform 0.28s ease, opacity 0.28s ease;
}
.cc-pos-top .cc-banner {
  top: 0; bottom: auto;
  border-top: 0; border-bottom: 1px solid var(--cc-border);
  padding-top: calc(20px + env(safe-area-inset-top, 0px));
  padding-bottom: 20px;
  transform: translateY(-100%);
}
.cc-banner.cc-is-visible { transform: translateY(0); opacity: 1; }

.cc-banner__inner {
  max-width: var(--cc-max);
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 24px;
}
.cc-banner__content { flex: 1 1 auto; min-width: 0; }
.cc-banner__title { margin: 0 0 4px; font-size: 1.05rem; font-weight: 700; line-height: 1.3; color: var(--cc-text); }
.cc-banner__text { margin: 0; font-size: 0.92rem; color: var(--cc-muted); }
.cc-banner__actions { flex: 0 0 auto; display: flex; gap: 10px; flex-wrap: wrap; justify-content: flex-end; }

.cc-gpc {
  margin: 10px 0 0;
  padding: 8px 12px;
  font-size: 0.85rem;
  color: var(--cc-text);
  background: var(--cc-surface);
  border-left: 3px solid var(--cc-accent);
  border-radius: 4px;
}

.cc-link { color: var(--cc-accent); text-decoration: underline; text-underline-offset: 2px; }
.cc-link:hover { color: var(--cc-accent-hover); }

/* ---------- Buttons ----------
 * Accept All and Reject All share identical styling (equal prominence),
 * as required by EDPB guidance on deceptive design patterns.
 */
.cc-btn {
  appearance: none;
  font: inherit;
  font-size: 0.92rem;
  font-weight: 600;
  line-height: 1.2;
  min-height: 44px;            /* WCAG 2.5.5 target size */
  padding: 11px 20px;
  border-radius: 8px;
  border: 2px solid var(--cc-accent);
  cursor: pointer;
  white-space: nowrap;
  transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}
.cc-btn--solid { background: var(--cc-accent); color: var(--cc-accent-text); }
.cc-btn--solid:hover { background: var(--cc-accent-hover); border-color: var(--cc-accent-hover); }
.cc-btn--ghost { background: transparent; color: var(--cc-accent); }
.cc-btn--ghost:hover { background: var(--cc-surface); }

.cc-root :focus-visible {
  outline: 3px solid var(--cc-focus);
  outline-offset: 2px;
}

/* ---------- Modal ---------- */
.cc-modal {
  position: fixed;
  inset: 0;
  z-index: calc(var(--cc-z) + 1);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  opacity: 0;
  transition: opacity 0.2s ease;
}
.cc-modal.cc-is-visible { opacity: 1; }
.cc-modal__backdrop { position: absolute; inset: 0; background: var(--cc-backdrop); }

.cc-modal__dialog {
  position: relative;
  width: 100%;
  max-width: 600px;
  max-height: calc(100vh - 32px);
  max-height: calc(100dvh - 32px);
  display: flex;
  flex-direction: column;
  background: var(--cc-bg);
  color: var(--cc-text);
  border-radius: var(--cc-radius);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  transform: translateY(12px);
  transition: transform 0.2s ease;
}
.cc-modal.cc-is-visible .cc-modal__dialog { transform: translateY(0); }
.cc-modal__dialog:focus { outline: none; }
.cc-modal__dialog:focus-visible { outline: 3px solid var(--cc-focus); outline-offset: 2px; }

.cc-modal__header {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 18px 22px;
  border-bottom: 1px solid var(--cc-border);
}
.cc-modal__title { margin: 0; font-size: 1.15rem; font-weight: 700; line-height: 1.3; color: var(--cc-text); }

.cc-close {
  appearance: none;
  display: inline-flex; align-items: center; justify-content: center;
  width: 40px; height: 40px;
  border: 0; border-radius: 8px;
  background: transparent;
  color: var(--cc-muted);
  cursor: pointer;
  flex: 0 0 auto;
}
.cc-close:hover { background: var(--cc-surface); color: var(--cc-text); }

.cc-modal__body { padding: 18px 22px; overflow-y: auto; overscroll-behavior: contain; }
.cc-modal__desc { margin: 0 0 14px; font-size: 0.92rem; color: var(--cc-muted); }

.cc-modal__footer {
  display: flex; gap: 10px; justify-content: flex-end; flex-wrap: wrap;
  padding: 16px 22px;
  border-top: 1px solid var(--cc-border);
}

/* ---------- Categories ---------- */
.cc-category {
  padding: 14px 16px;
  margin-top: 10px;
  background: var(--cc-surface);
  border: 1px solid var(--cc-border);
  border-radius: 8px;
  transition: box-shadow 0.2s ease;
}
.cc-category.cc-highlight { box-shadow: 0 0 0 3px var(--cc-accent); }
.cc-category__head { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.cc-category__title { font-weight: 700; font-size: 0.98rem; cursor: pointer; color: var(--cc-text); }
.cc-category__desc { margin: 6px 0 0; font-size: 0.86rem; color: var(--cc-muted); }

.cc-badge {
  font-size: 0.78rem; font-weight: 700;
  padding: 4px 10px;
  border-radius: 999px;
  color: var(--cc-text);
  background: var(--cc-bg);
  border: 1px solid var(--cc-border);
  white-space: nowrap;
}

/* ---------- Toggle switch (native checkbox, role="switch") ---------- */
.cc-switch { position: relative; display: inline-flex; flex: 0 0 auto; width: 48px; height: 28px; }
.cc-switch input {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  margin: 0; opacity: 0;
  cursor: pointer;
  z-index: 1;
}
.cc-switch__track {
  position: absolute; inset: 0;
  border-radius: 999px;
  background: #8a929c;
  transition: background-color 0.2s ease;
}
.cc-switch__thumb {
  position: absolute; top: 3px; left: 3px;
  width: 22px; height: 22px;
  border-radius: 50%;
  background: #ffffff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
  transition: transform 0.2s ease;
}
.cc-switch input:checked + .cc-switch__track { background: var(--cc-accent); }
.cc-switch input:checked + .cc-switch__track .cc-switch__thumb { transform: translateX(20px); }
.cc-switch input:focus-visible + .cc-switch__track { outline: 3px solid var(--cc-focus); outline-offset: 2px; }

/* Lock page scroll while the modal is open */
html.cc-modal-open, html.cc-modal-open body { overflow: hidden; }

/* ---------- Responsive ---------- */
@media (max-width: 860px) {
  .cc-banner__inner { flex-direction: column; align-items: stretch; gap: 14px; }
  .cc-banner__actions { justify-content: stretch; }
  .cc-banner__actions .cc-btn { flex: 1 1 0; }
}
@media (max-width: 520px) {
  .cc-banner { padding-left: 16px; padding-right: 16px; }
  .cc-banner__actions, .cc-modal__footer { flex-direction: column-reverse; }
  .cc-banner__actions .cc-btn, .cc-modal__footer .cc-btn { width: 100%; white-space: normal; }
  .cc-modal { padding: 0; align-items: flex-end; }
  .cc-modal__dialog { max-width: none; max-height: 92vh; max-height: 92dvh; border-radius: var(--cc-radius) var(--cc-radius) 0 0; }
  .cc-modal__footer { padding-bottom: calc(16px + env(safe-area-inset-bottom, 0px)); }
}

@media (prefers-reduced-motion: reduce) {
  .cc-banner, .cc-modal, .cc-modal__dialog, .cc-switch__track, .cc-switch__thumb, .cc-btn { transition: none !important; }
}

@media print { .cc-root { display: none !important; } }

/* Windows High Contrast / forced colors */
@media (forced-colors: active) {
  .cc-switch__track { border: 2px solid CanvasText; }
  .cc-switch input:checked + .cc-switch__track { background: Highlight; }
  .cc-btn { border: 2px solid ButtonText; }
}

.cc-root{--cc-accent:#0E1A2B;--cc-accent-hover:#121417;--cc-accent-text:#FFFFFF;--cc-focus:#E4572E;--cc-surface:#F5F1EA;--cc-border:#E0D9CC;--cc-text:#121417;--cc-muted:#4A4E56;z-index:2147483000}
.cc-root .cc-link{color:#B9401C}.cc-root .cc-link:hover{color:#8F3115}
.cc-root .cc-gpc{border-left-color:#B9401C}
.cc-root .cc-switch input:checked+.cc-switch__track{background:#B9401C}
