/* The HTML banner is the initial state, including when both scripts fail. */
html body #cc-banner:not([hidden]) {
  display: flex !important;
  max-height: none !important;
  pointer-events: auto !important;
}

html body #cc-banner[hidden],
html body #cc-modal[hidden],
html body #cc-icon-panel[hidden],
html body #cc-banner button[hidden],
html body #cc-script-fallback[hidden] {
  display: none !important;
}

html body #cc-icon-panel:not([hidden]) {
  display: flex !important;
}

#cc-banner button:not([hidden]),
#cc-modal button,
#cc-script-fallback summary {
  pointer-events: auto !important;
  touch-action: manipulation !important;
}

#cc-script-fallback {
  margin: 1rem auto 0;
  color: #ffd700;
}

#cc-script-fallback summary {
  width: fit-content;
  margin-inline: auto;
  padding: 12px 18px;
  border: 2px solid #ffd700;
  cursor: pointer;
}

#cc-script-fallback summary:focus-visible {
  outline: 3px solid #ffd700;
  outline-offset: 3px;
}

/* Native details supplies a page-only dismissal without storing consent. */
html body #cc-banner:not([data-consent-ready="true"]):has(#cc-script-fallback[open]) {
  display: none !important;
}
