/* In-house cookie consent. Uses the site's v2 brand tokens when present, with neutral fallbacks for the old design. */
.wl-consent-banner, .wl-consent-overlay {
  --c-ink: var(--color-text, #172033);
  --c-muted: #5b6474;
  --c-line: var(--color-border, #e3e6eb);
  --c-surface: #fff;
  --c-soft: var(--color-surface-subtle, #f6f7f9);
  --c-main: var(--color-brand-dark, #1f2a44);
  --c-on-main: #fff;
  --c-accent: var(--color-accent, #1f2a44);
  font-family: var(--font-family-brand, system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif);
  color: var(--c-ink);
  box-sizing: border-box;
}
.wl-consent-banner *, .wl-consent-overlay * { box-sizing: border-box; }

/* Banner */
.wl-consent-banner {
  position: fixed; left: 16px; right: 16px; bottom: 16px; z-index: 2147483000;
  margin: 0 auto; max-width: 1040px;
  background: var(--c-surface); border: 1px solid var(--c-line); border-radius: 16px;
  box-shadow: 0 18px 50px rgba(15, 23, 42, 0.18);
  animation: wl-consent-up .35s ease-out both;
}
@keyframes wl-consent-up { from { transform: translateY(16px); opacity: 0; } to { transform: none; opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .wl-consent-banner { animation: none; } }
.wl-consent-inner { display: flex; gap: 24px; align-items: center; padding: 20px 24px; }
.wl-consent-copy { flex: 1 1 auto; min-width: 0; }
.wl-consent-title { margin: 0 0 4px; font-size: 18px; line-height: 1.3; font-weight: 700; color: var(--c-ink); }
.wl-consent-copy p { margin: 0; font-size: 14px; line-height: 1.55; color: var(--c-muted); }
.wl-consent-copy a, .wl-consent-intro a { color: var(--c-ink); text-decoration: underline; font-weight: 600; }
.wl-consent-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; flex: 0 0 auto; width: 320px; }
.wl-consent-actions .wl-consent-btn--link { grid-column: 1 / -1; }

/* Buttons: "Reject all" and "Accept all" look the same, as the ICO expects */
.wl-consent-btn {
  appearance: none; cursor: pointer; font: inherit; font-size: 14px; font-weight: 700; line-height: 1.2;
  padding: 12px 16px; border-radius: 10px; border: 1px solid transparent; text-align: center;
  transition: filter .15s ease, background-color .15s ease;
}
.wl-consent-btn--main { background: var(--c-main); color: var(--c-on-main); }
.wl-consent-btn--main:hover { filter: brightness(1.12); }
.wl-consent-btn--ghost { background: var(--c-surface); color: var(--c-ink); border-color: var(--c-line); }
.wl-consent-btn--ghost:hover { background: var(--c-soft); }
.wl-consent-btn--link { background: none; color: var(--c-ink); text-decoration: underline; padding: 6px; font-weight: 600; }
.wl-consent-btn:focus-visible, .wl-consent-x:focus-visible, .wl-consent-switch input:focus-visible + span, .wl-consent-list summary:focus-visible,
.wl-consent-open:focus-visible, .wl-consent-inline:focus-visible { outline: 3px solid var(--c-accent); outline-offset: 2px; }

/* Settings panel */
html.wl-consent-locked { overflow: hidden; }
.wl-consent-overlay {
  position: fixed; inset: 0; z-index: 2147483001; background: rgba(15, 23, 42, 0.55);
  display: flex; align-items: center; justify-content: center; padding: 16px;
}
.wl-consent-dialog {
  background: var(--c-surface); border-radius: 18px; width: 100%; max-width: 680px; max-height: calc(100vh - 32px);
  display: flex; flex-direction: column; box-shadow: 0 24px 70px rgba(15, 23, 42, 0.3);
}
.wl-consent-dialog-head { display: flex; align-items: center; justify-content: space-between; padding: 20px 24px 12px; }
.wl-consent-dialog-head h2 { margin: 0; font-size: 22px; font-weight: 700; color: var(--c-ink); }
.wl-consent-x { appearance: none; background: var(--c-soft); border: 0; width: 36px; height: 36px; border-radius: 50%; font-size: 22px; line-height: 1; cursor: pointer; color: var(--c-ink); }
.wl-consent-dialog-body { overflow: auto; padding: 0 24px 8px; }
.wl-consent-intro { margin: 0 0 12px; font-size: 14px; line-height: 1.55; color: var(--c-muted); }
.wl-consent-cat { border-top: 1px solid var(--c-line); padding: 16px 0; }
.wl-consent-cat-head { display: flex; gap: 16px; align-items: flex-start; justify-content: space-between; }
.wl-consent-cat h3 { margin: 0 0 4px; font-size: 16px; font-weight: 700; color: var(--c-ink); }
.wl-consent-cat p { margin: 0; font-size: 13.5px; line-height: 1.5; color: var(--c-muted); }
.wl-consent-always { flex: 0 0 auto; font-size: 12px; font-weight: 700; color: var(--c-muted); background: var(--c-soft); border-radius: 999px; padding: 6px 10px; white-space: nowrap; }
.wl-consent-switch { position: relative; flex: 0 0 auto; width: 48px; height: 28px; cursor: pointer; }
.wl-consent-switch input { position: absolute; opacity: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.wl-consent-switch span { position: absolute; inset: 0; border-radius: 999px; background: #c9ced6; transition: background-color .2s ease; pointer-events: none; }
.wl-consent-switch span::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, 0.25); transition: transform .2s ease; }
.wl-consent-switch input:checked + span { background: var(--c-main); }
.wl-consent-switch input:checked + span::after { transform: translateX(20px); }
.wl-consent-list { margin-top: 10px; }
.wl-consent-list summary { cursor: pointer; font-size: 13px; font-weight: 600; color: var(--c-ink); }
.wl-consent-dialog-foot { display: flex; gap: 8px; justify-content: flex-end; flex-wrap: wrap; padding: 14px 24px 20px; border-top: 1px solid var(--c-line); }

/* Cookie tables (settings panel and legal page) */
.wl-consent-table-wrap { overflow-x: auto; margin-top: 8px; }
.wl-consent-table { width: 100%; border-collapse: collapse; font-size: 12.5px; line-height: 1.45; }
.wl-consent-table th, .wl-consent-table td { text-align: left; vertical-align: top; padding: 7px 8px; border-bottom: 1px solid var(--c-line, #e3e6eb); }
.wl-consent-table th { font-weight: 700; background: var(--c-soft, #f6f7f9); }
.wl-consent-table code { font-size: 12px; white-space: nowrap; }
.wl-consent-policy .wl-consent-table-wrap { margin-bottom: 18px; }

/* Footer link and inline link */
.wl-consent-open, .wl-consent-inline { appearance: none; background: none; border: 0; padding: 0; font: inherit; color: inherit; cursor: pointer; text-decoration: underline; }

@media (max-width: 760px) {
  .wl-consent-banner { left: 8px; right: 8px; bottom: 8px; }
  .wl-consent-inner { flex-direction: column; align-items: stretch; gap: 14px; padding: 16px; }
  .wl-consent-actions { width: auto; }
  .wl-consent-dialog-foot { justify-content: stretch; }
  .wl-consent-dialog-foot .wl-consent-btn { flex: 1 1 100%; }
  .wl-consent-overlay { padding: 0; align-items: flex-end; }
  .wl-consent-dialog { border-radius: 18px 18px 0 0; max-height: 92vh; }
}
@media print { .wl-consent-banner, .wl-consent-overlay { display: none !important; } }
