/* Floating card anchored to the bottom of the viewport, rather than a
   full-width edge-to-edge bar — pointer-events:none on the wrapper (only
   re-enabled on the card itself) so the empty margin around it never
   blocks clicks on whatever's behind it.
   display:flex is scoped to :not([hidden]) for the same reason documented
   below on .consent-settings-panel — an unconditional `display` here would
   beat the browser's own [hidden]{display:none} regardless of specificity,
   so toggling the hidden attribute in consent.js would stop actually
   hiding anything. This exact bug is what made the banner keep reappearing
   after accepting cookies and refreshing. */
.consent-banner:not([hidden]) {
  display: flex;
}
.consent-banner {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 500;
  justify-content: center;
  padding: 0 16px 16px;
  pointer-events: none;
}
.consent-banner-inner {
  pointer-events: auto;
  max-width: 720px;
  width: 100%;
  display: flex;
  align-items: flex-start;
  gap: 16px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 20px 24px;
}
.consent-banner-icon {
  font-size: 26px;
  line-height: 1;
  flex: none;
}
.consent-banner-body {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.consent-banner-text {
  margin: 0;
  font-size: 13.5px;
  line-height: 1.5;
  color: var(--ink-soft);
}
.consent-banner-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}
/* All three actions are deliberately the same visual weight (no filled
   "primary" button among them) — a visitor choosing "Only necessary"
   should not be steered toward "Accept all" by button styling alone. */
.consent-banner-actions .btn,
.consent-settings-actions .btn {
  white-space: nowrap;
}
.consent-accept-btn {
  border-color: var(--navy);
  color: var(--navy-dark);
}
.consent-accept-btn:hover {
  background: var(--navy-tint);
}

.consent-settings-panel {
  position: fixed;
  inset: 0;
  z-index: 501;
  background: rgba(0, 0, 0, 0.45);
  align-items: center;
  justify-content: center;
  padding: 16px;
}
/* [hidden] is only display:none by default in the browser's UA stylesheet —
   an author rule setting `display` unconditionally (like the block above
   used to) wins over it regardless of specificity, since author origin
   always beats user-agent origin. Scoping the flex display to :not([hidden])
   keeps toggling the `hidden` attribute in JS authoritative. */
.consent-settings-panel:not([hidden]) {
  display: flex;
}
.consent-settings-inner {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 24px;
  max-width: 480px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
}
.consent-settings-header {
  display: flex;
  align-items: center;
  gap: 10px;
}
.consent-settings-header h2 {
  margin: 0;
}
.consent-settings-inner > p {
  margin-top: 8px;
}
.consent-category-row {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
  cursor: pointer;
}
.consent-category-row:last-of-type {
  border-bottom: none;
}
.consent-category-row input[type="checkbox"] {
  width: 18px;
  height: 18px;
  margin-top: 2px;
  flex-shrink: 0;
}
.consent-settings-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 16px;
  flex-wrap: wrap;
}

@media (max-width: 560px) {
  .consent-banner-inner {
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
  }
  .consent-banner-icon {
    display: none;
  }
  .consent-banner-actions {
    justify-content: stretch;
  }
  .consent-banner-actions .btn {
    flex: 1;
  }
}
