/* site-consent — ISC Media Group. Theme per site by overriding these on :root:
 *   --sc-accent      brand colour for buttons and switches
 *   --sc-accent-ink  text on the accent colour
 *   --sc-bg / --sc-ink / --sc-muted / --sc-border / --sc-radius / --sc-font / --sc-blocked-bg
 * Accept All and Reject All are deliberately styled the same: regulators expect refusing
 * to be as easy as agreeing.
 */
:root {
  --sc-accent: #1f4e79;
  --sc-accent-ink: #ffffff;
  --sc-bg: #ffffff;
  --sc-ink: #1d2329;
  --sc-muted: #56606b;
  --sc-border: #d7dde3;
  --sc-radius: 10px;
  --sc-font: inherit;
  --sc-blocked-bg: #f6f8fa;
  --sc-z: 2147483000;
}

.sc-banner {
  position: fixed;
  left: 16px;
  right: 16px;
  bottom: 16px;
  z-index: var(--sc-z);
  max-width: 1080px;
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  gap: 16px 28px;
  align-items: center;
  padding: 20px 24px;
  background: var(--sc-bg);
  color: var(--sc-ink);
  border: 1px solid var(--sc-border);
  border-radius: var(--sc-radius);
  box-shadow: 0 10px 40px rgba(16, 24, 32, .18);
  font-family: var(--sc-font);
  font-size: 15px;
  line-height: 1.5;
}
.sc-banner[hidden] { display: none; }
.sc-banner__body { flex: 1 1 420px; min-width: 0; }
.sc-banner__title { margin: 0 0 4px; font-size: 18px; font-weight: 700; line-height: 1.3; color: var(--sc-ink); }
.sc-banner__text, .sc-banner__gpc { margin: 0; color: var(--sc-muted); }
.sc-banner__gpc { margin-top: 6px; font-size: 14px; }
.sc-banner a, .sc-dialog a { color: var(--sc-accent); text-decoration: underline; text-underline-offset: 2px; }
.sc-banner__actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }

.sc-banner .sc-btn, .sc-dialog .sc-btn {
  appearance: none;
  font: inherit;
  font-size: 16px;
  font-weight: 700;
  line-height: 1.2;
  padding: 12px 22px;
  border-radius: var(--sc-radius);
  border: 2px solid var(--sc-accent);
  cursor: pointer;
  text-transform: none;
  letter-spacing: normal;
  box-shadow: none;
  min-height: 0;
  width: auto;
}
.sc-banner .sc-btn--primary, .sc-dialog .sc-btn--primary { background: var(--sc-accent); color: var(--sc-accent-ink); }
.sc-banner .sc-btn--primary:hover, .sc-dialog .sc-btn--primary:hover { filter: brightness(1.08); }
.sc-banner .sc-btn--link { background: transparent; color: var(--sc-accent); border-color: var(--sc-border); }
.sc-banner .sc-btn--link:hover { border-color: var(--sc-accent); }
.sc-banner .sc-btn:focus-visible, .sc-dialog .sc-btn:focus-visible, .sc-switch input:focus-visible + span, .sc-dialog__close:focus-visible {
  outline: 3px solid var(--sc-accent);
  outline-offset: 2px;
}

.sc-dialog {
  margin: auto;
  width: min(640px, calc(100vw - 32px));
  max-height: calc(100vh - 32px);
  padding: 0;
  border: 1px solid var(--sc-border);
  border-radius: var(--sc-radius);
  background: var(--sc-bg);
  color: var(--sc-ink);
  font-family: var(--sc-font);
  font-size: 15px;
  line-height: 1.5;
  box-shadow: 0 20px 60px rgba(16, 24, 32, .3);
}
.sc-dialog::backdrop { background: rgba(16, 24, 32, .55); }
.sc-dialog__inner { position: relative; padding: 28px 28px 24px; margin: 0; }
.sc-dialog h2 { margin: 0 0 8px; font-size: 22px; line-height: 1.3; color: var(--sc-ink); }
.sc-dialog__intro { margin: 0 0 12px; color: var(--sc-muted); }
.sc-dialog .sc-dialog__close {
  position: absolute; top: 12px; right: 12px;
  width: 40px; height: 40px;
  border: 0; border-radius: 50%;
  background: transparent; color: var(--sc-muted);
  font-size: 28px; line-height: 1; cursor: pointer;
}
.sc-row { display: flex; gap: 20px; align-items: flex-start; padding: 16px 0; border-top: 1px solid var(--sc-border); }
.sc-row__text { flex: 1; }
.sc-row h3 { margin: 0 0 4px; font-size: 16px; font-weight: 700; color: var(--sc-ink); }
.sc-row p { margin: 0; color: var(--sc-muted); font-size: 14px; }
.sc-dialog__actions { display: flex; flex-wrap: wrap; gap: 10px; padding-top: 16px; border-top: 1px solid var(--sc-border); }

.sc-switch { position: relative; flex: none; width: 52px; height: 30px; margin-top: 2px; }
.sc-switch input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; }
.sc-switch span {
  position: absolute; inset: 0;
  border-radius: 30px; background: #c3cad2;
  transition: background .2s; pointer-events: none;
}
.sc-switch span::after {
  content: ""; position: absolute; top: 3px; left: 3px;
  width: 24px; height: 24px; border-radius: 50%;
  background: #fff; transition: transform .2s;
  box-shadow: 0 1px 3px rgba(0, 0, 0, .25);
}
.sc-switch input:checked + span { background: var(--sc-accent); }
.sc-switch input:checked + span::after { transform: translateX(22px); }
.sc-switch input:disabled { cursor: not-allowed; }
.sc-switch input:disabled + span { opacity: .6; }

.sc-blocked {
  padding: 24px; text-align: center;
  border: 1px dashed var(--sc-border); border-radius: var(--sc-radius);
  background: var(--sc-blocked-bg); color: var(--sc-muted); font-size: 15px;
}
.sc-blocked button {
  font: inherit; font-weight: 700; color: var(--sc-accent);
  background: none; border: 0; text-decoration: underline; cursor: pointer;
}

@media (max-width: 640px) {
  .sc-banner { left: 12px; right: 12px; bottom: 12px; padding: 18px; }
  .sc-banner__actions { width: 100%; }
  .sc-banner__actions .sc-btn { flex: 1 1 100%; }
  .sc-dialog__inner { padding: 24px 18px 18px; }
  .sc-dialog__actions .sc-btn { flex: 1 1 100%; }
}
@media (prefers-reduced-motion: reduce) {
  .sc-switch span, .sc-switch span::after { transition: none; }
}
@media print { .sc-banner, .sc-dialog { display: none !important; } }
