/* Cookie consent banner (consent.js). Colours/fonts come from theme.css. */
#cc-root {
  position: fixed;
  left: clamp(12px, 2vw, 24px);
  bottom: clamp(12px, 2vw, 24px);
  z-index: var(--yt-z-consent);
  width: min(660px, calc(100vw - 24px));
  max-height: calc(100vh - 24px);
  overflow: auto;
  padding: 26px 28px 22px;
  background: var(--yt-bg-2);
  color: rgb(var(--yt-white-rgb) / .88);
  border: 1px solid rgb(var(--yt-cream-rgb) / .35);
  border-radius: 22px;
  box-shadow: 0 24px 70px rgb(0 0 0 / .45);
  font: 400 14px/1.55 var(--yt-font-sans);
  -webkit-font-smoothing: antialiased;
  animation: ccIn .45s var(--yt-ease) both;
}
@keyframes ccIn { from { opacity: 0; transform: translateY(24px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { #cc-root { animation: none; } }

#cc-root h2 {
  margin: 0 0 10px;
  font-family: var(--yt-font-serif);
  font-weight: 500;
  font-size: 24px;
  line-height: 1.15;
  color: var(--yt-cream);
}
#cc-root p { margin: 0; }
#cc-root a { color: var(--yt-cyan); text-decoration: underline; text-underline-offset: 2px; }

/* buttons */
#cc-root .cc-btns { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; }
#cc-root button.cc-b {
  flex: 1 1 auto;
  min-height: 44px;
  padding: 10px 18px;
  white-space: nowrap;
  border-radius: var(--yt-radius-pill);
  border: 1px solid rgb(var(--yt-cream-rgb) / .6);
  background: transparent;
  color: var(--yt-cream);
  font: 500 13px/1 var(--yt-font-sans);
  letter-spacing: .08em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background .2s, color .2s;
}
#cc-root button.cc-b:hover { background: rgb(var(--yt-cream-rgb) / .12); }
#cc-root button.cc-b.cc-primary { background: var(--yt-cream); color: var(--yt-bg); border-color: var(--yt-cream); }
#cc-root button.cc-b.cc-primary:hover { background: var(--yt-white); }
#cc-root button:focus-visible,
#cc-root a:focus-visible,
#cc-root input:focus-visible + .cc-sw { outline: 2px solid var(--yt-cyan); outline-offset: 2px; }

#cc-root .cc-x {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 32px;
  height: 32px;
  border: none;
  border-radius: 50%;
  background: none;
  color: var(--yt-cream);
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
}

/* categories */
#cc-root .cc-cats { margin-top: 16px; border-top: 1px solid rgb(var(--yt-cream-rgb) / .2); }
#cc-root .cc-cat { padding: 12px 0; border-bottom: 1px solid rgb(var(--yt-cream-rgb) / .2); }
#cc-root .cc-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; font-weight: 600; color: var(--yt-white); }
#cc-root .cc-desc { margin-top: 4px; font-size: 12.5px; color: rgb(var(--yt-white-rgb) / .65); }
#cc-root .cc-on { font-size: 11px; font-weight: 500; letter-spacing: .08em; text-transform: uppercase; color: var(--yt-cyan); }

/* switch */
#cc-root label.cc-tg { position: relative; display: inline-block; flex: none; width: 42px; height: 24px; cursor: pointer; }
#cc-root label.cc-tg input { position: absolute; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
#cc-root .cc-sw { position: absolute; inset: 0; border-radius: var(--yt-radius-pill); background: rgb(var(--yt-white-rgb) / .18); transition: background .2s; pointer-events: none; }
#cc-root .cc-sw::after { content: ""; position: absolute; left: 3px; top: 3px; width: 18px; height: 18px; border-radius: 50%; background: var(--yt-white); transition: transform .2s; }
#cc-root input:checked + .cc-sw { background: var(--yt-cyan); }
#cc-root input:checked + .cc-sw::after { transform: translateX(18px); }

@media (max-width: 520px) {
  #cc-root { left: 12px; right: 12px; width: auto; padding: 20px 18px 16px; }
  #cc-root h2 { font-size: 21px; }
  #cc-root button.cc-b { flex-basis: 100%; white-space: normal; }
}
