/* Consent bar. Self-contained: linked by the "consent" partial on the marketing site and in the owner panel.
   Uses the brand tokens when tokens.css is present and falls back to plain values otherwise.
   Compact by design: a short sentence and one row of three buttons; "Settings" unfolds the two optional
   categories as switches. Reject all and Accept all always look the same. */
.qc-bar {
  position: fixed;
  z-index: 90;
  inset-inline-start: max(12px, env(safe-area-inset-left));
  inset-block-end: max(12px, env(safe-area-inset-bottom));
  inline-size: min(372px, calc(100vw - 24px));
  box-sizing: border-box;
  display: grid;
  gap: 10px;
  padding: 12px;
  border-radius: var(--r-lg, 16px);
  background: var(--surface, #fff);
  color: var(--ink, #1b1814);
  border: 1px solid var(--line-strong, #c9c2b6);
  box-shadow: 0 18px 40px -18px rgb(0 0 0 / 0.35);
  font: 400 13px/1.45 var(--font-text, system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif);
}
.qc-bar[hidden], .qc-bar [hidden] { display: none; }
.qc-text { margin: 0; padding-inline: 2px; text-wrap: pretty; }
.qc-text a { color: inherit; text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 0.2em; white-space: nowrap; }
.qc-text a:hover { color: var(--accent-ink, #b93a14); }

.qc-prefs { display: grid; gap: 2px; padding: 4px; border-radius: var(--r-md, 12px); background: var(--sunken, #f1ede6); }
.qc-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 8px 10px; border-radius: 9px; cursor: pointer; }
.qc-row:first-child { cursor: default; }
.qc-what { display: grid; gap: 1px; min-inline-size: 0; }
.qc-what b { font-weight: 600; }
.qc-what small { font-size: 12px; line-height: 1.35; color: var(--ink-2, #5c564d); }
.qc-always { flex: none; font-size: 12px; font-weight: 600; color: var(--ink-2, #5c564d); }
.qc-switch {
  flex: none; appearance: none; -webkit-appearance: none; margin: 0; position: relative;
  inline-size: 38px; block-size: 22px; border-radius: 999px; cursor: pointer;
  background: var(--line-strong, #c9c2b6); transition: background-color 160ms var(--ease, ease);
}
.qc-switch::after {
  content: ''; position: absolute; inset-block-start: 3px; inset-inline-start: 3px; inline-size: 16px; block-size: 16px; border-radius: 50%;
  background: #fff; box-shadow: 0 1px 3px rgb(0 0 0 / 0.3); transition: transform 160ms var(--ease, ease);
}
.qc-switch:checked { background: var(--accent-ink, #b93a14); }
.qc-switch:checked::after { transform: translateX(16px); }
[dir="rtl"] .qc-switch:checked::after { transform: translateX(-16px); }

.qc-actions { display: grid; grid-template-columns: 1fr auto 1fr; gap: 6px; }
.qc-btn {
  min-block-size: 34px;
  padding: 0 10px;
  border: 1px solid var(--line-strong, #c9c2b6);
  border-radius: var(--r-md, 10px);
  background: transparent;
  color: inherit;
  font: 600 13px/1.15 var(--font-text, system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif);
  cursor: pointer;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  transition: background-color 160ms var(--ease, ease), border-color 160ms var(--ease, ease), transform 120ms var(--ease, ease);
}
.qc-btn.qc-quiet { border-color: transparent; font-weight: 500; text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 0.2em; }
.qc-btn:hover { background: var(--sunken, #f1ede6); border-color: var(--ink-3, #8a8378); }
.qc-btn.qc-quiet:hover { border-color: transparent; }
.qc-btn:active { transform: scale(.97); }
.qc-btn:focus-visible, .qc-text a:focus-visible, .qc-switch:focus-visible { outline: 2px solid var(--accent, #e8502a); outline-offset: 2px; }
@media (max-width: 380px) {
  .qc-actions { grid-template-columns: 1fr 1fr; }
  .qc-quiet { grid-column: 1 / -1; grid-row: 2; }
}
@media (prefers-reduced-motion: reduce) {
  .qc-btn, .qc-switch, .qc-switch::after { transition: none; }
  .qc-btn:active { transform: none; }
}
