/* Cookie consent banner and preference centre.
   The privacy statement (2.5.2) says visitors can choose which categories they
   accept and can revisit that choice; this is the interface that makes it true.
   Analytics stays switched off until the visitor opts in. */

.tvc-banner,
.tvc-modal { font-family: "Barlow", "Segoe UI", Arial, sans-serif; color: #25235e; }

/* ---- banner ---- */
.tvc-banner {
  position: fixed;
  left: 16px;
  right: 16px;
  bottom: 16px;
  z-index: 2147483000;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 16px 28px;
  max-width: 1180px;
  margin-inline: auto;
  padding: 20px 24px;
  border: 1px solid #ded7ee;
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 24px 60px -24px rgba(20, 18, 56, .45);
}
.tvc-banner[hidden] { display: none; }
.tvc-banner h2 { margin: 0 0 6px; font-size: 17px; line-height: 1.3; font-weight: 600; color: #25235e; }
.tvc-banner p { margin: 0; font-size: 15px; line-height: 1.55; color: #4b4a6a; max-width: 72ch; }
.tvc-banner a { color: #ae3577; }

.tvc-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.tvc-btn {
  font: inherit;
  font-size: 15px;
  font-weight: 600;
  min-height: 44px;
  padding: 0 20px;
  border-radius: 999px;
  border: 1px solid transparent;
  cursor: pointer;
  white-space: nowrap;
  transition: background .2s cubic-bezier(.33, 1, .68, 1), border-color .2s cubic-bezier(.33, 1, .68, 1), color .2s cubic-bezier(.33, 1, .68, 1);
}
.tvc-btn--primary { background: #25235e; color: #fff; }
.tvc-btn--primary:hover { background: #35326f; }
.tvc-btn--secondary { background: #fff; border-color: #ded7ee; color: #25235e; }
.tvc-btn--secondary:hover { background: #f4f2fb; border-color: #c3b9e2; }
.tvc-btn--quiet { background: none; border-color: transparent; color: #4b4a86; text-decoration: underline; padding-inline: 8px; }
.tvc-btn--quiet:hover { color: #25235e; }
.tvc-btn:focus-visible,
.tvc-switch input:focus-visible + .tvc-switch-track { outline: 2px solid #6759b9; outline-offset: 3px; }

/* ---- preference centre ---- */
.tvc-modal {
  position: fixed;
  inset: 0;
  z-index: 2147483001;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(20, 18, 56, .5);
}
.tvc-modal[hidden] { display: none; }
.tvc-panel {
  width: min(100%, 560px);
  max-height: calc(100vh - 40px);
  overflow: auto;
  padding: 26px 26px 22px;
  border-radius: 20px;
  background: #fff;
  box-shadow: 0 30px 70px -28px rgba(20, 18, 56, .6);
}
.tvc-panel h2 { margin: 0 0 8px; font-size: 20px; line-height: 1.25; font-weight: 600; }
.tvc-panel > p { margin: 0 0 18px; font-size: 15px; line-height: 1.55; color: #4b4a6a; }

.tvc-group { padding: 16px 0; border-top: 1px solid #ece9f4; }
.tvc-group-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.tvc-group h3 { margin: 0; font-size: 16px; font-weight: 600; color: #25235e; }
.tvc-group p { margin: 6px 0 0; font-size: 14px; line-height: 1.5; color: #5b6070; }
.tvc-locked { font-size: 13px; font-weight: 600; color: #7b79a6; white-space: nowrap; }

.tvc-switch { position: relative; flex: none; display: inline-flex; align-items: center; }
.tvc-switch input { position: absolute; opacity: 0; width: 46px; height: 26px; margin: 0; cursor: pointer; }
.tvc-switch-track {
  width: 46px; height: 26px; border-radius: 999px; background: #d5d2e4;
  transition: background .2s cubic-bezier(.33, 1, .68, 1);
}
.tvc-switch-track::after {
  content: ""; display: block; width: 20px; height: 20px; margin: 3px; border-radius: 50%; background: #fff;
  transition: transform .2s cubic-bezier(.33, 1, .68, 1);
}
.tvc-switch input:checked + .tvc-switch-track { background: #2fb36a; }
.tvc-switch input:checked + .tvc-switch-track::after { transform: translateX(20px); }

.tvc-panel-foot { display: flex; flex-wrap: wrap; gap: 10px; justify-content: flex-end; margin-top: 20px; }

/* ---- the footer link that reopens the centre ---- */
.cookie-prefs-link {
  font: inherit;
  padding: 0;
  border: 0;
  background: none;
  color: inherit;
  cursor: pointer;
  text-decoration: underline;
}

@media (max-width: 820px) {
  .tvc-banner { grid-template-columns: minmax(0, 1fr); gap: 14px; padding: 18px; }
  .tvc-actions { gap: 8px; }
  .tvc-btn { flex: 1 1 auto; padding-inline: 14px; }
}
@media (prefers-reduced-motion: reduce) {
  .tvc-btn, .tvc-switch-track, .tvc-switch-track::after { transition: none; }
}
