/* Cookie banner and preferences panel (js/cookie-consent.js) */
.acc-banner, .acc-panel, .acc-reopen {
  --acc-blue: #037ef3;
  --acc-blue-deep: #0257b3;
  --acc-ink: #0b2a5b;
  --acc-ink-soft: #4a5f80;
  --acc-sky: #eaf4fe;
  --acc-line: #d6e6f8;
  font-family: "Lato", system-ui, -apple-system, "Segoe UI", sans-serif;
  color: var(--acc-ink);
  -webkit-font-smoothing: antialiased;
}
.acc-banner *, .acc-panel *, .acc-reopen { box-sizing: border-box; }

/* Banner: stays until a choice is made */
.acc-banner {
  position: fixed;
  z-index: 2147483000;
  left: 16px;
  right: 16px;
  bottom: max(16px, env(safe-area-inset-bottom));
  max-width: 1180px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 16px 28px;
  padding: 20px 24px;
  border-radius: 20px;
  background: #fff;
  box-shadow: 0 0 0 1px var(--acc-line), 0 18px 48px -16px rgba(11, 42, 91, 0.32);
}
.acc-banner__title { margin: 0 0 6px; font-size: 16.8px; line-height: 1.3; font-weight: 700; color: var(--acc-ink); }
.acc-banner__text { margin: 0; font-size: 14.4px; line-height: 1.5; color: var(--acc-ink-soft); max-width: 70ch; }
.acc-banner__actions { display: flex; flex-wrap: wrap; gap: 8px; justify-content: flex-end; }

@media (max-width: 860px) {
  .acc-banner { grid-template-columns: minmax(0, 1fr); padding: 18px; max-height: calc(100dvh - 32px); overflow: auto; }
  .acc-banner .acc-btn, .acc-panel .acc-btn { white-space: normal; }
  .acc-banner__actions { justify-content: stretch; }
  .acc-banner__actions .acc-btn { flex: 1 1 auto; }
}

/* Buttons: Allow all and Reject all carry equal weight */
.acc-btn {
  appearance: none;
  margin: 0;
  min-height: 44px;
  padding: 10px 18px;
  border-radius: 999px;
  border: 2px solid var(--acc-blue);
  font: inherit;
  font-size: 14.4px;
  font-weight: 700;
  line-height: 1.2;
  cursor: pointer;
  white-space: nowrap;
  text-align: center;
  transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}
.acc-btn--primary { background: var(--acc-blue); color: #fff; }
.acc-btn--primary:hover { background: var(--acc-blue-deep); border-color: var(--acc-blue-deep); }
.acc-btn--ghost { background: transparent; color: var(--acc-blue); }
.acc-btn--ghost:hover { background: var(--acc-sky); }
.acc-btn:focus-visible, .acc-reopen:focus-visible, .acc-switch__input:focus-visible + .acc-switch__track,
.acc-panel a:focus-visible, .acc-panel__dialog:focus-visible {
  outline: 3px solid var(--acc-blue);
  outline-offset: 2px;
}
.acc-panel__dialog:focus { outline: none; }

/* Preferences panel */
.acc-panel {
  position: fixed;
  inset: 0;
  z-index: 2147483001;
  display: grid;
  place-items: center;
  padding: 16px;
}
.acc-panel[hidden] { display: none; }
.acc-panel__backdrop { position: absolute; inset: 0; background: rgba(11, 42, 91, 0.45); }
.acc-panel__dialog {
  position: relative;
  width: min(760px, 100%);
  max-height: calc(100vh - 32px);
  max-height: calc(100dvh - 32px);
  overflow: auto;
  padding: 28px;
  border-radius: 20px;
  background: #fff;
  box-shadow: 0 24px 64px -20px rgba(11, 42, 91, 0.5);
}
.acc-panel__title { margin: 0 0 10px; font-size: 21.6px; line-height: 1.25; font-weight: 700; color: var(--acc-ink); }
.acc-panel__intro, .acc-panel__note { margin: 0 0 18px; font-size: 14.7px; line-height: 1.55; color: var(--acc-ink-soft); }
.acc-panel__note { margin: 18px 0 22px; }
.acc-panel__note a { color: var(--acc-blue); font-weight: 700; text-decoration: underline; }

.acc-table { border: 1px solid var(--acc-line); border-radius: 14px; overflow: hidden; }
.acc-row {
  display: grid;
  grid-template-columns: 150px 1fr 110px;
  gap: 16px;
  align-items: center;
  padding: 16px 18px;
  border-top: 1px solid var(--acc-line);
  font-size: 14.4px;
  line-height: 1.5;
}
.acc-row:first-child { border-top: 0; }
.acc-row--head {
  padding-top: 10px;
  padding-bottom: 10px;
  background: var(--acc-sky);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--acc-ink);
}
.acc-row__name { font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em; font-size: 13.1px; }
.acc-row__text { color: var(--acc-ink-soft); }
.acc-row__status { justify-self: end; }
.acc-status-locked { font-weight: 700; font-size: 13.6px; color: var(--acc-ink); white-space: nowrap; }

.acc-panel__actions { display: flex; flex-wrap: wrap; gap: 8px; justify-content: flex-end; }

@media (max-width: 640px) {
  .acc-panel { padding: 0; place-items: end stretch; }
  .acc-panel__dialog { width: 100%; max-height: 92vh; max-height: 92dvh; border-radius: 20px 20px 0 0; padding: 22px 18px; }
  .acc-row--head { display: none; }
  .acc-row { grid-template-columns: 1fr auto; grid-template-areas: "name status" "text text"; gap: 6px 12px; }
  .acc-row__name { grid-area: name; }
  .acc-row__status { grid-area: status; }
  .acc-row__text { grid-area: text; }
  .acc-panel__actions .acc-btn { flex: 1 1 auto; }
}

/* Allow / Off switch */
.acc-switch { display: inline-flex; align-items: center; gap: 10px; cursor: pointer; position: relative; }
.acc-switch__input { position: absolute; opacity: 0; width: 1px; height: 1px; margin: 0; }
.acc-switch__track {
  position: relative;
  width: 44px;
  height: 26px;
  border-radius: 999px;
  background: #b8c4d6;
  transition: background-color 0.15s ease;
  flex: none;
}
.acc-switch__track::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 3px rgba(11, 42, 91, 0.3);
  transition: transform 0.15s ease;
}
.acc-switch__input:checked + .acc-switch__track { background: var(--acc-blue); }
.acc-switch__input:checked + .acc-switch__track::after { transform: translateX(18px); }
.acc-switch__label { min-width: 2.6em; font-weight: 700; font-size: 13.6px; }
.acc-switch__label::before { content: attr(data-off); color: var(--acc-ink-soft); }
.acc-switch__input:checked ~ .acc-switch__label::before { content: attr(data-on); color: var(--acc-blue); }

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

/* "Cookies" button: reopens the panel after a choice */
.acc-reopen {
  position: fixed;
  z-index: 2147482999;
  left: 16px;
  bottom: max(16px, env(safe-area-inset-bottom));
  min-height: 36px;
  padding: 8px 14px;
  border: 1px solid var(--acc-line);
  border-radius: 999px;
  background: #fff;
  color: var(--acc-ink);
  font-size: 12.8px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 6px 18px -8px rgba(11, 42, 91, 0.35);
}
.acc-reopen:hover { color: var(--acc-blue); border-color: var(--acc-blue); }

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

@media (prefers-reduced-motion: reduce) {
  .acc-btn, .acc-switch__track, .acc-switch__track::after { transition: none; }
}
@media print { .acc-banner, .acc-panel, .acc-reopen { display: none !important; } }
