/* ==========================================================================
   Cookie consent — banner + preferences panel
   Styles live here (not injected from JS) so the banner never flashes
   unstyled and the page needs no inline <script>/<style>.
   ========================================================================== */
.cc {
  position: fixed;
  inset: auto 0 0 0;
  z-index: 60;
  display: none;
  padding: 16px;
  font-family: var(--sans, system-ui, sans-serif);
}
.cc[data-open='true'] { display: block; }

.cc__card {
  max-width: 1440px;
  margin: 0 auto;
  background: #1e1e1e;
  color: #f3f1ed;
  border: 1px solid rgba(243, 241, 237, 0.16);
  border-radius: 3px;
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.28);
  padding: 24px 28px;
  display: flex;
  align-items: center;
  gap: 32px;
}

.cc__copy { flex: 1 1 auto; min-width: 0; }
.cc__title {
  margin: 0 0 6px;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.02em;
}
.cc__text {
  margin: 0;
  font-size: 13px;
  line-height: 1.6;
  color: rgba(243, 241, 237, 0.72);
  max-width: 76ch;
}
.cc__text a { color: #3fa8ad; text-decoration: underline; }

.cc__actions {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 20px;
}

.cc__btn {
  font: inherit;
  font-size: 13px;
  line-height: 1;
  border-radius: 2px;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}
/* Accepting is one click on the most prominent control on screen. */
.cc__btn--accept {
  background: #007c82;
  border: 1px solid #007c82;
  color: #f3f1ed;
  padding: 14px 32px;
  font-weight: 600;
}
.cc__btn--accept:hover { background: #00676c; border-color: #00676c; }
/* Declining is a deliberate second step, via preferences. */
.cc__btn--ghost {
  background: transparent;
  border: 0;
  color: rgba(243, 241, 237, 0.7);
  text-decoration: underline;
  text-underline-offset: 3px;
  padding: 14px 0;
}
.cc__btn--ghost:hover { color: #f3f1ed; }
.cc__btn--outline {
  background: transparent;
  border: 1px solid rgba(243, 241, 237, 0.4);
  color: #f3f1ed;
  padding: 13px 24px;
}
.cc__btn--outline:hover { border-color: #f3f1ed; }

/* --- preferences panel --- */
.cc__panel { display: none; }
.cc[data-view='panel'] .cc__panel { display: block; }
.cc[data-view='panel'] .cc__banner { display: none; }

.cc__panel .cc__card { display: block; }
.cc__panel-head { margin-bottom: 20px; }

.cc__group {
  display: flex;
  gap: 16px;
  padding: 18px 0;
  border-top: 1px solid rgba(243, 241, 237, 0.14);
}
.cc__group-copy { flex: 1 1 auto; }
.cc__group-name {
  margin: 0 0 4px;
  font-size: 13px;
  font-weight: 600;
}
.cc__group-desc {
  margin: 0;
  font-size: 12.5px;
  line-height: 1.6;
  color: rgba(243, 241, 237, 0.62);
}
.cc__group-state {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 12px;
  color: rgba(243, 241, 237, 0.62);
}
.cc__switch {
  appearance: none;
  width: 40px;
  height: 22px;
  border-radius: 11px;
  background: rgba(243, 241, 237, 0.22);
  position: relative;
  cursor: pointer;
  margin: 0;
  transition: background 0.15s ease;
}
.cc__switch::after {
  content: '';
  position: absolute;
  top: 3px;
  left: 3px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #f3f1ed;
  transition: transform 0.15s ease;
}
.cc__switch:checked { background: #007c82; }
.cc__switch:checked::after { transform: translateX(18px); }
.cc__switch:disabled { opacity: 0.5; cursor: not-allowed; }

.cc__panel-actions {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  padding-top: 20px;
  border-top: 1px solid rgba(243, 241, 237, 0.14);
}

@media (max-width: 860px) {
  .cc__card { flex-direction: column; align-items: stretch; gap: 20px; padding: 20px; }
  .cc__actions { flex-direction: column-reverse; align-items: stretch; gap: 8px; }
  .cc__btn--accept { width: 100%; }
  .cc__btn--ghost { text-align: center; }
  .cc__group { flex-direction: row; }
  .cc__panel-actions > * { flex: 1 1 auto; }
}
