/* Cookie consent banner (Google Consent Mode v2). Uses site tokens from styles.css. */
.cc {
  position: fixed;
  z-index: 5000;
  left: 50%;
  bottom: calc(clamp(12px, 2vw, 24px) + env(safe-area-inset-bottom, 0px));
  transform: translateX(-50%);
  display: grid;
  grid-template-columns: 1fr auto;
  column-gap: 20px;
  align-items: center;
  width: min(680px, calc(100vw - 24px));
  max-height: calc(100dvh - 24px);
  overflow-y: auto;
  padding: 14px 44px 14px 18px;
  background: var(--paper, #f1eee7);
  color: var(--ink, #090909);
  border: 1px solid var(--ink, #090909);
  font-family: Inter, "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-size: 13px;
  line-height: 1.45;
  overscroll-behavior: contain;
  transition: opacity 220ms, transform 220ms cubic-bezier(.22,.61,.36,1);
}
.cc[hidden],
.cc [hidden] { display: none !important }
.cc.is-entering { opacity: 0; transform: translate(-50%, 10px) }

.cc__title {
  grid-column: 1;
  margin: 0 0 2px;
  font-size: 13px;
  font-weight: 600;
}
.cc__text {
  grid-column: 1;
  margin: 0;
  color: var(--muted, #5f5c56);
}
.cc__text a { color: var(--ink, #090909); text-underline-offset: 3px }

.cc__close {
  position: absolute;
  top: 8px;
  right: 8px;
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--ink, #090909);
  cursor: pointer;
}
.cc__close:hover { background: rgba(9,9,9,.07) }

.cc__actions {
  grid-column: 2;
  grid-row: 1 / span 2;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
}
.cc__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 32px;
  padding: 0 13px;
  border: 1px solid var(--ink, #090909);
  border-radius: 999px;
  background: transparent;
  color: var(--ink, #090909);
  font: inherit;
  font-size: 11px;
  font-weight: 600;
  line-height: 1;
  letter-spacing: .09em;
  text-transform: uppercase;
  white-space: nowrap;
  cursor: pointer;
  transition: background-color 180ms, color 180ms;
}
.cc__btn--solid { background: var(--ink, #090909); color: var(--paper, #f1eee7) }
.cc__btn--link {
  border-color: transparent;
  padding: 0 4px;
  text-decoration: underline;
  text-underline-offset: 3px;
}
@media (hover: hover) {
  .cc__btn:hover { background: var(--ink, #090909); color: var(--paper, #f1eee7) }
  .cc__btn--solid:hover { background: transparent; color: var(--ink, #090909) }
  .cc__btn--link:hover { background: transparent; color: var(--ink, #090909); text-decoration-thickness: 2px }
}
.cc__btn:focus-visible,
.cc__close:focus-visible,
.cc__switch input:focus-visible + .cc__track {
  outline: 2px solid var(--ink, #090909);
  outline-offset: 2px;
}

/* Settings view */
.cc--open {
  grid-template-columns: 1fr;
  width: min(460px, calc(100vw - 24px));
  padding: 16px 18px;
}
.cc--open .cc__title,
.cc--open .cc__text { padding-right: 28px }
.cc--open .cc__actions { grid-column: 1; grid-row: auto }

.cc__prefs {
  grid-column: 1 / -1;
  margin: 12px 0 14px;
  padding: 0;
  border: 0;
  border-top: 1px solid rgba(9,9,9,.14);
}
.cc__legend {
  float: left;
  width: 100%;
  margin: 0;
  padding: 12px 0 0;
}
.cc__legend + .cc__row { clear: both }
.cc__row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 2px 16px;
  align-items: center;
  padding: 10px 0;
  border-bottom: 1px solid rgba(9,9,9,.14);
}
.cc__row-name { font-weight: 600 }
.cc__row-desc {
  grid-column: 1;
  color: var(--muted, #5f5c56);
  font-size: 12px;
}
.cc__row-state {
  color: var(--muted, #5f5c56);
  font-size: 11px;
}
.cc__switch {
  grid-row: 1 / span 2;
  grid-column: 2;
  position: relative;
  display: inline-block;
  cursor: pointer;
}
.cc__switch input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  opacity: 0;
  cursor: pointer;
}
.cc__track {
  display: block;
  width: 34px;
  height: 20px;
  border: 1px solid var(--ink, #090909);
  border-radius: 999px;
  transition: background-color 180ms;
}
.cc__track::after {
  content: "";
  position: absolute;
  top: 4px;
  left: 4px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--ink, #090909);
  transition: transform 180ms cubic-bezier(.22,.61,.36,1), background-color 180ms;
}
.cc__switch input:checked + .cc__track { background: var(--ink, #090909) }
.cc__switch input:checked + .cc__track::after {
  transform: translateX(14px);
  background: var(--paper, #f1eee7);
}

@media (max-width: 640px) {
  .cc,
  .cc--open {
    left: 0;
    right: 0;
    bottom: 0;
    width: auto;
    transform: none;
    grid-template-columns: 1fr;
    border-width: 1px 0 0;
    padding: 14px 16px calc(14px + env(safe-area-inset-bottom, 0px));
  }
  .cc.is-entering { transform: translateY(10px) }
  .cc__title,
  .cc__text { padding-right: 30px }
  .cc__actions {
    grid-column: 1;
    grid-row: auto;
    margin-top: 12px;
  }
  .cc__actions .cc__btn:not(.cc__btn--link) { flex: 1 1 0 }
}
@media (prefers-reduced-motion: reduce) {
  .cc, .cc__btn, .cc__track, .cc__track::after { transition: none }
}
