/* Zidos consent v1 — banner, settings sheet, policy document and the consent stand.
   Built on the site tokens: no colors outside var(--…), both themes, no gradients,
   no 1px rules, glass only on the two floating layers. */

/* ---------------------------------------------------------------- shared bits */

.zc-banner,
.zc-dialog {
  font: inherit;
  color: var(--ink);
}

.zc-banner a:focus-visible,
.zc-banner button:focus-visible,
.zc-dialog a:focus-visible,
.zc-dialog button:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 3px;
}

.zc-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 44px;
  min-height: 44px;
  padding: 0 20px;
  border-radius: var(--pill);
  font-size: var(--fs-ui);
  font-weight: 500;
  line-height: 1.2;
  white-space: nowrap;
  transition: background-color var(--fast) var(--ease), color var(--fast) var(--ease), opacity var(--fast) var(--ease);
}

.zc-btn-main {
  background: var(--action);
  color: var(--action-ink);
}

.zc-btn-main:hover {
  opacity: .85;
}

.zc-btn-tonal {
  background: var(--panel);
  color: var(--ink);
}

.zc-btn-tonal:hover {
  background: var(--frame);
}

.zc-btn-text {
  background: transparent;
  color: var(--ink);
  padding: 0 14px;
}

.zc-btn-text:hover {
  background: var(--panel);
}

.zc-link {
  display: inline;
  color: inherit;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  transition: color var(--fast) var(--ease);
}

.zc-link:hover {
  color: var(--muted);
}

/* ------------------------------------------------------------- banner (bottom) */

.zc-banner {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 80;
  margin: 0;
  padding: 0 0 env(safe-area-inset-bottom);
  background: var(--glass);
  backdrop-filter: blur(20px) saturate(1.2);
  -webkit-backdrop-filter: blur(20px) saturate(1.2);
  border-radius: var(--radius) var(--radius) 0 0;
  box-shadow: var(--shadow);
  transform: translateY(24px);
  opacity: 0;
  visibility: hidden;
  transition: transform 220ms var(--ease), opacity 180ms var(--ease), visibility 0s 220ms;
}

.zc-banner.zc-on {
  transform: none;
  opacity: 1;
  visibility: visible;
  transition: transform 360ms var(--ease), opacity 260ms var(--ease);
}

.zc-banner[hidden] {
  display: none;
}

.zc-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  width: 100%;
  max-width: calc(var(--max) + var(--gut) * 2);
  margin: 0 auto;
  padding: 20px var(--gut);
}

.zc-copy {
  display: grid;
  gap: 5px;
  min-width: 0;
  max-width: 640px;
}

.zc-title {
  font-size: 18px;
  line-height: 1.25;
  letter-spacing: -.02em;
  font-weight: 500;
}

.zc-text {
  margin: 0;
  font-size: 14px;
  line-height: 1.5;
  color: var(--muted);
  text-wrap: pretty;
}

.zc-dialog .zc-text {
  font-size: 15px;
  max-width: 58ch;
}

.zc-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  flex: none;
  flex-wrap: wrap;
}

/* ------------------------------------------------------------ settings (dialog) */

.zc-dialog {
  position: fixed;
  inset: auto 0 0 0;
  margin: 0 auto;
  width: 100%;
  max-width: 720px;
  max-height: 92dvh;
  padding: 0;
  border: 0;
  border-radius: var(--radius) var(--radius) 0 0;
  background: var(--glass);
  backdrop-filter: blur(20px) saturate(1.2);
  -webkit-backdrop-filter: blur(20px) saturate(1.2);
  box-shadow: var(--shadow);
  overflow: auto;
  overscroll-behavior: contain;
}

.zc-dialog::backdrop {
  background: var(--scrim);
}

.zc-dialog[open] {
  animation: zc-rise 420ms var(--ease) both;
}

.zc-dialog.zc-closing {
  animation: zc-sink 180ms var(--ease) both;
}

/* While the sheet itself is moving, its controls must not animate their own
   colour: the pointer can land on a button mid-rise and the two motions add up. */
.zc-dialog.zc-opening .zc-btn,
.zc-dialog.zc-opening .zc-link,
.zc-dialog.zc-opening .zc-close,
.zc-dialog.zc-opening .zc-switch-track,
.zc-dialog.zc-opening .zc-switch-knob,
.zc-dialog.zc-closing .zc-btn,
.zc-dialog.zc-closing .zc-link {
  transition: none;
}

@keyframes zc-rise {
  from {
    opacity: 0;
    transform: translateY(100%);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@keyframes zc-sink {
  from {
    opacity: 1;
    transform: none;
  }
  to {
    opacity: 0;
    transform: translateY(100%);
  }
}

.zc-dialog-inner {
  display: grid;
  gap: 20px;
  padding: 28px 28px calc(24px + env(safe-area-inset-bottom));
}

.zc-dialog-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.zc-dialog-title {
  font-size: clamp(22px, 2.4vw, 28px);
  line-height: 1.15;
  letter-spacing: -.03em;
  font-weight: 500;
}

.zc-close {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  min-width: 44px;
  border-radius: var(--pill);
  background: var(--panel);
  color: var(--ink);
  transition: background-color var(--fast) var(--ease);
}

.zc-close:hover {
  background: var(--frame);
}

.zc-close svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
}

.zc-cats {
  display: grid;
  gap: 4px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.zc-cat {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px 24px;
  align-items: center;
  padding: 16px 0;
}

.zc-cat:first-child {
  padding-top: 8px;
}

.zc-cat-copy {
  display: grid;
  gap: 4px;
}

.zc-cat-title {
  font-size: 16px;
  line-height: 1.3;
  letter-spacing: -.015em;
  font-weight: 500;
}

.zc-cat-text {
  margin: 0;
  font-size: 14px;
  line-height: 1.5;
  color: var(--muted);
  max-width: 52ch;
}

.zc-cat-state {
  margin: 0;
  font-size: 14px;
  color: var(--muted);
  white-space: nowrap;
}

/* The switch is a 44 px target: the track is drawn inside it. Off = muted track,
   on = ink track; the knob is the surface color, so both states keep contrast. */
.zc-switch {
  display: grid;
  place-items: center;
  width: 56px;
  height: 44px;
  padding: 0;
  border-radius: var(--pill);
  background: transparent;
}

.zc-switch-track {
  position: relative;
  display: block;
  width: 48px;
  height: 28px;
  border-radius: var(--pill);
  background: var(--muted);
  transition: background-color 180ms var(--ease);
}

.zc-switch-knob {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--frame);
  transition: transform 180ms var(--ease);
}

.zc-switch[aria-checked="true"] .zc-switch-track {
  background: var(--ink);
}

.zc-switch[aria-checked="true"] .zc-switch-knob {
  transform: translateX(20px);
}

.zc-dialog-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 4px;
}

.zc-actions-link {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  margin-left: auto;
  font-size: 14px;
  font-weight: 500;
}

/* ------------------------------------------------------------------- mobile */

@media (max-width: 899px) {
  .zc-inner {
    flex-direction: column;
    align-items: stretch;
    gap: 16px;
    padding: 18px var(--gut) calc(16px + env(safe-area-inset-bottom));
  }

  .zc-copy {
    max-width: none;
  }

  .zc-actions {
    display: grid;
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .zc-actions .zc-btn-text {
    justify-self: center;
  }
}

@media (max-width: 600px) {
  .zc-dialog-inner {
    padding: 22px var(--gut) calc(20px + env(safe-area-inset-bottom));
  }

  .zc-dialog-actions {
    display: grid;
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .zc-actions-link {
    justify-self: center;
    margin-left: 0;
  }

  .zc-cat {
    gap: 6px 16px;
  }
}

/* --------------------------------------------------------- cookie policy pages */

.zc-doc h2 {
  margin-top: 0;
  font-size: clamp(26px, 3vw, 34px);
  line-height: 1.18;
  letter-spacing: -.03em;
  font-weight: 500;
}

.zc-doc h2 + p {
  margin-top: 14px;
}

.zc-doc h3 {
  margin: 28px 0 0;
  font-size: 18px;
  line-height: 1.3;
  letter-spacing: -.015em;
  font-weight: 500;
}

.zc-doc h3 + p {
  margin-top: 8px;
}

.zc-doc p {
  margin: 0;
  font-size: 18px;
  line-height: 1.7;
  color: var(--muted);
  max-width: 64ch;
  text-wrap: pretty;
}

.zc-doc p + p {
  margin-top: 14px;
}

.zc-doc strong {
  color: var(--ink);
  font-weight: 500;
}

.zc-doc code {
  font-size: .9em;
  padding: 2px 7px;
  border-radius: 8px;
  background: var(--panel);
  color: var(--ink);
  white-space: nowrap;
}

.zc-stores {
  display: grid;
  gap: 10px;
  margin-top: 22px;
}

.zc-store {
  display: grid;
  grid-template-columns: minmax(0, .8fr) minmax(0, 1.4fr);
  gap: 8px 28px;
  padding: 22px 26px;
  background: var(--frame);
  border-radius: 24px;
}

.zc-store h3 {
  margin: 0;
  font-size: 17px;
}

.zc-store p {
  margin: 0;
  font-size: 16px;
  line-height: 1.6;
  color: var(--muted);
}

.zc-store-meta {
  margin-top: 6px;
  font-size: 13px;
  line-height: 1.5;
  color: var(--muted);
}

.zc-doc-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 24px;
  margin-top: 24px;
}

.zc-doc-actions .text-link {
  font-size: 16px;
}

@media (max-width: 768px) {
  .zc-store {
    grid-template-columns: 1fr;
    gap: 6px;
    padding: 20px;
  }

  .zc-doc p {
    font-size: 17px;
    line-height: 1.65;
  }
}

/* --------------------------------------------------------------- consent stand */

.zc-lab-page .sp-hero {
  padding-bottom: 28px;
}

.zc-lab-page .sp-section {
  padding: 0 0 64px;
}

.zc-lab-page h2 {
  font-size: clamp(26px, 3vw, 34px);
  line-height: 1.18;
  letter-spacing: -.03em;
  font-weight: 500;
}

.zc-lab-page .zc-lab-note {
  margin-top: 12px;
}

.zc-lab-page .zc-lab-code {
  margin-top: 20px;
}

.zc-lab-page .zc-lab-h2 {
  margin-top: 56px;
}

.zc-lab-page h2 + .zc-lab-row {
  margin-top: 12px;
}

.zc-lab-panel {
  display: grid;
  gap: 24px;
  padding: 28px;
  background: var(--frame);
  border-radius: var(--radius);
}

.zc-lab-facts {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 20px 24px;
}

.zc-lab-fact {
  display: grid;
  gap: 4px;
}

.zc-lab-label {
  font-size: 13px;
  line-height: 1.4;
  color: var(--muted);
}

.zc-lab-value {
  font-size: 22px;
  line-height: 1.2;
  font-weight: 500;
  letter-spacing: -.02em;
  font-variant-numeric: tabular-nums;
}

.zc-lab-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.zc-lab-log {
  display: grid;
  gap: 4px;
  overflow-x: auto;
  overflow-y: hidden;
  margin: 0;
  padding: 16px;
  background: var(--panel);
  border-radius: 16px;
  font-size: 13px;
  line-height: 1.5;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}

.zc-lab-log:empty::before {
  content: "No network entries yet.";
  color: var(--muted);
}

.zc-log-row {
  display: flex;
  gap: 12px;
  justify-content: space-between;
  min-width: max-content;
  min-height: 22px;
}

.zc-log-name {
  min-width: 0;
  white-space: nowrap;
}

.zc-log-meta {
  color: var(--muted);
  white-space: nowrap;
}

.zc-lab-row {
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr);
  gap: 16px;
  align-items: start;
  padding: 14px 0;
}

.zc-lab-step {
  font-size: 14px;
  font-weight: 500;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

.zc-lab-note {
  font-size: 15px;
  line-height: 1.6;
  color: var(--muted);
  max-width: 66ch;
}

.zc-lab-code {
  margin: 0;
  padding: 16px 18px;
  background: var(--panel);
  border-radius: 16px;
  overflow: auto;
  font-size: 13px;
  line-height: 1.6;
  color: var(--ink);
}

@media (max-width: 899px) {
  .zc-lab-facts {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 600px) {
  .zc-lab-panel {
    padding: 20px;
  }

  .zc-lab-facts {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .zc-lab-row {
    grid-template-columns: 40px minmax(0, 1fr);
    gap: 10px;
  }
}

/* -------------------------------------------------------------- reduced motion */

@media (prefers-reduced-motion: reduce) {
  .zc-banner,
  .zc-banner.zc-on,
  .zc-dialog[open],
  .zc-dialog.zc-closing {
    transition: none;
    animation: none;
  }

  .zc-btn,
  .zc-link,
  .zc-close,
  .zc-switch-track,
  .zc-switch-knob {
    transition: none;
  }
}

/* --------------------------------------------------------------------- print */

@media print {
  .zc-banner,
  .zc-dialog {
    display: none;
  }
}
