/* UK Cookie Consent — lightweight panel (~1KB gzipped) */
:root {
  --ucc-bg: #f7f7f4;
  --ucc-fg: #1a1a1a;
  --ucc-muted: #4a4a4a;
  --ucc-border: #d4d4ce;
  --ucc-accent: #111111;
  --ucc-accent-fg: #ffffff;
  --ucc-secondary: #fff;
  --ucc-focus: #333333;
  --ucc-shadow: 0 -4px 24px rgba(0, 0, 0, 0.12);
  --ucc-radius: 10px;
  --ucc-font: "Source Sans 3", "Segoe UI", sans-serif;
}

.ucc-root,
.ucc-root * {
  box-sizing: border-box;
}

.ucc-root {
  font-family: var(--ucc-font);
  font-size: 15px;
  line-height: 1.45;
  color: var(--ucc-fg);
  position: fixed;
  inset: auto 0 0 0;
  z-index: 99999;
  pointer-events: none;
}

.ucc-root[hidden] {
  display: none !important;
}

.ucc-banner,
.ucc-modal {
  pointer-events: auto;
  background: var(--ucc-bg);
  color: var(--ucc-fg);
  border: 1px solid var(--ucc-border);
  box-shadow: var(--ucc-shadow);
}

.ucc-banner {
  margin: 0 auto;
  max-width: 72rem;
  padding: 1rem 1.15rem;
  border-radius: var(--ucc-radius) var(--ucc-radius) 0 0;
  border-bottom: 0;
  display: grid;
  gap: 0.9rem;
}

@media (min-width: 720px) {
  .ucc-banner {
    grid-template-columns: 1fr auto;
    align-items: end;
    gap: 1.25rem;
    padding: 1.15rem 1.4rem;
  }
}

.ucc-title {
  margin: 0 0 0.35rem;
  font-size: 1.05rem;
  font-weight: 700;
}

.ucc-text {
  margin: 0;
  color: var(--ucc-muted);
  max-width: 62ch;
}

.ucc-text a {
  color: var(--ucc-accent);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.ucc-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
}

.ucc-btn {
  appearance: none;
  border: 1px solid var(--ucc-accent);
  border-radius: 8px;
  padding: 0.65rem 1rem;
  font: inherit;
  font-weight: 650;
  cursor: pointer;
  min-height: 2.6rem;
  min-width: 8.5rem;
  text-align: center;
}

.ucc-btn:focus-visible {
  outline: 3px solid var(--ucc-focus);
  outline-offset: 2px;
}

.ucc-btn-primary {
  background: var(--ucc-accent);
  color: var(--ucc-accent-fg);
}

.ucc-btn-reject {
  background: var(--ucc-accent);
  color: var(--ucc-accent-fg);
}

.ucc-btn-prefs {
  background: transparent;
  border-color: transparent;
  color: var(--ucc-muted);
  text-decoration: underline;
  text-underline-offset: 2px;
  min-width: auto;
  padding-inline: 0.5rem;
  font-weight: 600;
}

.ucc-overlay {
  position: fixed;
  inset: 0;
  background: rgba(12, 16, 14, 0.45);
  display: grid;
  place-items: center;
  padding: 1rem;
  pointer-events: auto;
  z-index: 100000;
}

.ucc-overlay[hidden] {
  display: none !important;
}

.ucc-modal {
  width: min(34rem, 100%);
  max-height: min(90vh, 40rem);
  overflow: auto;
  border-radius: var(--ucc-radius);
  padding: 1.2rem 1.2rem 1rem;
}

.ucc-modal h2 {
  margin: 0 0 0.4rem;
  font-size: 1.15rem;
}

.ucc-modal > p {
  margin: 0 0 1rem;
  color: var(--ucc-muted);
}

.ucc-cat {
  border-top: 1px solid var(--ucc-border);
  padding: 0.85rem 0;
}

.ucc-cat-head {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: center;
}

.ucc-cat h3 {
  margin: 0;
  font-size: 0.98rem;
}

.ucc-cat p {
  margin: 0.3rem 0 0;
  color: var(--ucc-muted);
  font-size: 0.92rem;
}

.ucc-switch {
  position: relative;
  width: 2.7rem;
  height: 1.55rem;
  flex: 0 0 auto;
}

.ucc-switch input {
  position: absolute;
  inset: 0;
  opacity: 0;
  margin: 0;
  cursor: pointer;
}

.ucc-switch input:disabled {
  cursor: not-allowed;
}

.ucc-switch span {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: 999px;
  background: #c7c7c0;
  transition: background 0.15s ease;
}

.ucc-switch span::after {
  content: "";
  position: absolute;
  top: 0.18rem;
  left: 0.18rem;
  width: 1.2rem;
  height: 1.2rem;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
  transition: transform 0.15s ease;
}

.ucc-switch input:checked + span {
  background: #111111;
}

.ucc-switch input:checked + span::after {
  transform: translateX(1.15rem);
}

.ucc-switch input:focus-visible + span {
  outline: 3px solid var(--ucc-focus);
  outline-offset: 2px;
}

.ucc-switch input:disabled + span {
  opacity: 0.7;
}

.ucc-modal-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.75rem;
  padding-top: 0.85rem;
  border-top: 1px solid var(--ucc-border);
}

.ucc-reopen {
  position: fixed;
  left: 0.75rem;
  bottom: 0.75rem;
  z-index: 99998;
  pointer-events: auto;
  appearance: none;
  border: 1px solid var(--ucc-border);
  background: var(--ucc-bg);
  color: var(--ucc-fg);
  border-radius: 999px;
  padding: 0.45rem 0.8rem;
  font: inherit;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
}

.ucc-reopen:focus-visible {
  outline: 3px solid var(--ucc-focus);
  outline-offset: 2px;
}

.ucc-reopen[hidden] {
  display: none !important;
}

@media (prefers-reduced-motion: reduce) {
  .ucc-switch span,
  .ucc-switch span::after {
    transition: none;
  }
}
