/* Signal Consent: banner, settings dialog and the cookie list.
   Self-contained (no framework classes). Override the custom properties in a
   theme to restyle. */
:root {
  --sc-ink: #1f2937;
  --sc-ink-soft: #374151;
  --sc-brand: #042454;
  --sc-brand-hover: #1b6b70;
  --sc-on-brand: #ffffff;
  --sc-surface: #ffffff;
  --sc-line: #e2e5ea;
  --sc-icon: #8b95a1;
  --sc-focus: #1a6dff;
}

/* ---- banner: slim card, bottom left (text and buttons on one row on
   desktop). Sits above the chatbot launcher so Reject is never covered. ---- */
.sc-banner {
  position: fixed; left: 16px; bottom: 16px; z-index: 2147483647;
  width: min(510px, calc(100vw - 32px));
  display: flex; align-items: center; gap: 12px;
  padding: 10px 10px 10px 14px;
  background: color-mix(in srgb, var(--sc-surface) 96%, transparent);
  border: 1px solid var(--sc-line); border-radius: 14px;
  box-shadow: 0 10px 30px rgba(4, 36, 84, .14);
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
  font: inherit; color: var(--sc-ink-soft);
}
.sc-banner[hidden], .sc-modal[hidden] { display: none !important; }
.sc-banner__text { flex: 1; min-width: 0; display: flex; gap: 8px; align-items: center; }
.sc-banner__icon { flex: none; margin-top: 0; color: var(--sc-icon); }
.sc-banner p { margin: 0; font-size: 12.5px; line-height: 1.4; color: var(--sc-ink-soft); }
.sc-banner a, .sc-modal a, .sc-list a { color: var(--sc-brand); font-weight: 700; text-decoration: underline; text-underline-offset: 2px; }
.sc-banner__actions { flex: none; display: flex; flex-wrap: nowrap; align-items: center; gap: 6px; }

/* Accept and Reject look exactly the same: neither is the "easy" one. */
.sc-btn {
  appearance: none; border: 1px solid var(--sc-brand); cursor: pointer;
  background: var(--sc-brand); color: var(--sc-on-brand);
  font: inherit; font-size: 12.5px; font-weight: 700; line-height: 1;
  padding: 9px 14px; border-radius: 999px; min-height: 34px;
  transition: background-color .15s, border-color .15s;
}
.sc-btn:hover { background: var(--sc-brand-hover); border-color: var(--sc-brand-hover); }
.sc-btn--ghost { background: var(--sc-surface); color: var(--sc-brand); }
.sc-btn--ghost:hover { background: #eef2f7; color: var(--sc-brand); border-color: var(--sc-brand); }
.sc-textbtn {
  appearance: none; border: 0; background: none; cursor: pointer; margin-left: 2px;
  font: inherit; font-size: 12.5px; font-weight: 700; color: var(--sc-brand);
  text-decoration: underline; text-underline-offset: 2px; padding: 8px 4px;
}
/* Smaller buttons in the banner only (the settings dialog keeps the sizes above).
   Accept and Reject still share one rule, so they stay identical. */
.sc-banner .sc-btn { font-size: 12px; padding: 7px 12px; min-height: 30px; min-width: 72px; } /* equal width whatever the label */
.sc-banner .sc-textbtn { font-size: 12px; padding: 6px 2px; margin-left: 0; }
.sc-btn:focus-visible, .sc-textbtn:focus-visible, .sc-modal__x:focus-visible,
.sc-banner a:focus-visible, .sc-modal a:focus-visible, .sc-switch input:focus-visible + span {
  outline: 3px solid var(--sc-focus); outline-offset: 2px;
}

/* ---- settings dialog ---- */
html.sc-lock { overflow: hidden; }
.sc-modal {
  position: fixed; inset: 0; z-index: 2147483647; /* same as the banner, and later in the page, so the dialog covers it */
  display: flex; align-items: center; justify-content: center;
  padding: 16px; background: rgba(4, 36, 84, .45);
  font: inherit; color: var(--sc-ink);
}
.sc-modal__box {
  width: min(540px, 100%); max-height: calc(100vh - 32px); overflow: auto;
  background: var(--sc-surface); border-radius: 18px; padding: 20px 20px 18px;
  box-shadow: 0 24px 60px rgba(4, 36, 84, .3);
}
.sc-modal__head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.sc-modal__head h2 { margin: 0; font-size: 20px; font-weight: 700; color: var(--sc-brand); line-height: 1.2; }
.sc-modal__x { appearance: none; border: 0; background: none; cursor: pointer; font-size: 26px; line-height: 1; color: var(--sc-ink-soft); padding: 2px 6px; border-radius: 8px; }
.sc-modal__intro, .sc-modal__note { font-size: 13.5px; line-height: 1.5; color: var(--sc-ink-soft); margin: 10px 0 0; }
.sc-modal__note { font-size: 12.5px; padding: 10px 12px; background: #f3f6f9; border-radius: 10px; margin-top: 14px; }
.sc-cat { border: 1px solid var(--sc-line); border-radius: 12px; padding: 12px 14px; margin-top: 12px; }
.sc-cat__row { display: flex; align-items: center; justify-content: space-between; gap: 12px; cursor: pointer; }
.sc-cat__row strong { font-size: 14.5px; color: var(--sc-ink); }
.sc-cat p { margin: 6px 0 0; font-size: 13px; line-height: 1.5; color: var(--sc-ink-soft); }
.sc-cat__always { font-size: 12px; font-weight: 700; color: #1d6a4c; }
.sc-switch { position: relative; display: inline-flex; flex: none; }
.sc-switch input { position: absolute; opacity: 0; width: 44px; height: 26px; margin: 0; cursor: pointer; }
.sc-switch span { width: 44px; height: 26px; border-radius: 999px; background: #c5ccd5; transition: background-color .15s; position: relative; }
.sc-switch span::after { content: ""; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgba(0,0,0,.2); transition: transform .15s; }
.sc-switch input:checked + span { background: var(--sc-brand-hover); }
.sc-switch input:checked + span::after { transform: translateX(18px); }
.sc-modal__actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }

/* ---- cookie list on the cookie policy ---- */
.sc-list h3 { margin: 1.6em 0 .3em; }
.sc-list__note { margin: 0 0 .6em; font-size: .92em; color: var(--sc-ink-soft); }
.sc-list__wrap { overflow-x: auto; border: 1px solid var(--sc-line); border-radius: 10px; }
.sc-list table { width: 100%; border-collapse: collapse; font-size: .9em; min-width: 560px; }
.sc-list th, .sc-list td { text-align: left; padding: 8px 12px; border-bottom: 1px solid var(--sc-line); vertical-align: top; }
.sc-list th { background: #f3f6f9; font-weight: 700; color: var(--sc-ink); white-space: nowrap; }
.sc-list tbody tr:last-child td { border-bottom: 0; }
.sc-list code { font-size: .92em; white-space: nowrap; }

@media (max-width: 480px) {
  .sc-banner { left: 12px; right: 12px; bottom: 12px; width: auto; flex-wrap: wrap; gap: 8px; }
  .sc-banner__actions { width: 100%; }
  .sc-banner__actions .sc-btn { flex: 1 1 0; min-height: 36px; }
}
@media print { .sc-banner, .sc-modal { display: none !important; } }
