/* RH Consent: banner and preference center. Colors fall back to the theme's bar/button tones. */
:root {
  --rh-bg: #32323a;
  --rh-fg: #ffffff;
  --rh-accent: #007a72; /* darker than the theme teal so white text passes WCAG AA (5.1:1) */
  --rh-accent-fg: #ffffff;
  --rh-muted: #d8d8dc;
  --rh-focus: #ffbf47;
  --rh-radius: 4px;
  --rh-font: var(--bodyFontFamily, "Roboto", Helvetica, Arial, sans-serif);
}
.rh-consent-banner, .rh-consent-dialog { font-family: var(--rh-font); font-size: 15px; line-height: 1.5; color: var(--rh-fg); box-sizing: border-box; }
.rh-consent-banner *, .rh-consent-dialog * { box-sizing: border-box; }
.rh-consent-banner[hidden], .rh-consent-overlay[hidden], .rh-consent-items[hidden] { display: none !important; }

/* Banner */
.rh-consent-banner { position: fixed; left: 0; right: 0; bottom: 0; z-index: 99998; background: var(--rh-bg); padding: 16px; box-shadow: 0 -2px 12px rgba(0,0,0,.35); }
.rh-consent-banner__inner { max-width: 1180px; margin: 0 auto; display: flex; flex-wrap: wrap; gap: 16px; align-items: center; }
.rh-consent-banner__text { flex: 1 1 420px; margin: 0; }
.rh-consent-banner__text a { color: var(--rh-fg); text-decoration: underline; }
.rh-consent-banner__gpc { flex-basis: 100%; margin: 0; font-size: 13px; color: var(--rh-muted); }
.rh-consent-banner__actions { flex: 1 1 360px; display: flex; gap: 10px; }
.rh-consent-btn { flex: 1 1 0; min-width: 0; min-height: 44px; padding: 10px 12px; font: inherit; font-weight: 700; font-size: 14px; text-align: center; border: 2px solid var(--rh-fg); border-radius: var(--rh-radius); background: transparent; color: var(--rh-fg); cursor: pointer; }
.rh-consent-btn:hover { background: rgba(255,255,255,.12); }
.rh-consent-btn:focus-visible, .rh-consent-switch:focus-visible, .rh-consent-dialog a:focus-visible, .rh-consent-banner a:focus-visible, .rh-consent-items__toggle:focus-visible { outline: 3px solid var(--rh-focus); outline-offset: 2px; }
/* The banner never takes more than the visible screen; --rh-vvh is the visual-viewport height set by the script (falls back to 100vh). */
.rh-consent-banner { max-height: calc(var(--rh-vvh, 100vh) - 16px); overflow: auto; -webkit-overflow-scrolling: touch; }
/* Pinned mode (set by the script when the theme's layout is wider than the phone screen): the script positions the
   banner and overlay to the visual viewport instead of the layout viewport, so they are on screen at first paint. */
.rh-consent-banner.rh-consent--pinned { right: auto; bottom: auto; }
.rh-consent-overlay.rh-consent--pinned { inset: auto; }
@media (max-width: 640px) {
  .rh-consent-banner { padding: 12px 14px; font-size: 14px; }
  .rh-consent-banner__inner { gap: 10px; }
  .rh-consent-banner__text { flex-basis: 100%; }
  .rh-consent-banner__actions { flex-direction: column; flex-basis: 100%; gap: 8px; }
  .rh-consent-btn { flex-basis: auto; width: 100%; }
}

/* Preference center */
.rh-consent-overlay { position: fixed; inset: 0; z-index: 99999; background: rgba(0,0,0,.55); display: flex; align-items: center; justify-content: center; padding: 16px; }
.rh-consent-dialog { background: var(--rh-bg); width: 100%; max-width: 720px; max-height: calc(var(--rh-vvh, 100vh) - 32px); overflow: auto; -webkit-overflow-scrolling: touch; border-radius: var(--rh-radius); padding: 24px; }
.rh-consent-dialog__head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; }
.rh-consent-dialog h2 { margin: 0 0 8px; font-size: 22px; color: var(--rh-fg); }
.rh-consent-dialog__intro { margin: 0 0 16px; }
.rh-consent-close { background: transparent; border: 0; color: var(--rh-fg); font: inherit; font-size: 15px; text-decoration: underline; cursor: pointer; padding: 4px; }
.rh-consent-cat { border-top: 1px solid rgba(255,255,255,.2); padding: 14px 0; }
.rh-consent-cat__row { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.rh-consent-cat__label { font-weight: 700; font-size: 16px; }
.rh-consent-cat__desc { margin: 6px 0 0; color: var(--rh-muted); font-size: 14px; }
.rh-consent-switch { position: relative; width: 52px; height: 30px; flex: 0 0 52px; border-radius: 15px; border: 2px solid var(--rh-fg); background: transparent; cursor: pointer; padding: 0; }
.rh-consent-switch::after { content: ""; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: var(--rh-fg); transition: left .15s ease; }
.rh-consent-switch[aria-checked="true"] { background: var(--rh-accent); border-color: var(--rh-accent); }
.rh-consent-switch[aria-checked="true"]::after { left: 25px; }
.rh-consent-switch[aria-disabled="true"] { cursor: not-allowed; opacity: .8; }
.rh-consent-switch__label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.rh-consent-cat__status { font-size: 13px; color: var(--rh-muted); white-space: nowrap; }
.rh-consent-items__toggle { background: transparent; border: 0; color: var(--rh-fg); text-decoration: underline; font: inherit; font-size: 13px; cursor: pointer; padding: 4px 0; margin-top: 6px; }
.rh-consent-items { width: 100%; border-collapse: collapse; font-size: 13px; margin-top: 8px; }
.rh-consent-items th, .rh-consent-items td { text-align: left; vertical-align: top; padding: 6px 8px 6px 0; border-top: 1px solid rgba(255,255,255,.12); }
.rh-consent-items th { color: var(--rh-muted); font-weight: 400; }
.rh-consent-items code { font-size: 12px; color: var(--rh-fg); background: transparent; }
.rh-consent-dialog__gpc { margin: 12px 0 0; padding: 10px 12px; border: 1px solid rgba(255,255,255,.3); border-radius: var(--rh-radius); font-size: 14px; }
.rh-consent-dialog__actions { display: flex; gap: 10px; margin-top: 20px; }
.rh-consent-dialog__actions .rh-consent-btn--primary { background: var(--rh-accent); border-color: var(--rh-accent); color: var(--rh-accent-fg); }
@media (max-width: 640px) {
  .rh-consent-overlay { padding: 8px; align-items: flex-end; }
  .rh-consent-dialog { padding: 16px; font-size: 14px; max-height: calc(var(--rh-vvh, 100vh) - 16px); }
  .rh-consent-dialog h2 { font-size: 19px; }
  .rh-consent-dialog__actions { flex-direction: column; gap: 8px; }
  .rh-consent-items th:nth-child(3), .rh-consent-items td:nth-child(3) { display: none; }
  .rh-consent-items { font-size: 12px; }
  .rh-consent-items th, .rh-consent-items td { padding-right: 6px; word-break: break-word; }
}

/* Footer links (shortcode) */
.rh-consent-links { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px 20px; }
.rh-consent-links li { margin: 0; }
.rh-consent-gpc-text { font-size: 13px; margin-top: 8px; }

/* Body lock while the dialog is open */
.rh-consent-no-scroll { overflow: hidden; }

@media (prefers-reduced-motion: reduce) { .rh-consent-switch::after { transition: none; } }
