/* Colours and shape come from custom properties, so a theme sets --ca-bg and the rest once, on :root, and needs no selector of its own.
   The fallbacks are neutral and belong to no site: they only serve a site that sets none. Logical properties only, so a right-to-left page mirrors. */
.ca[hidden] { display: none; }
.ca {
  position: fixed;
  inset-block-end: .75rem;
  inset-inline: .75rem;
  z-index: 60;
  box-sizing: border-box;
  max-inline-size: 28rem;
  padding: 1rem 1.25rem;
  background: var(--ca-bg, #fff);
  color: var(--ca-fg, #111);
  border: 1px solid var(--ca-border, #d1d5db);
  border-radius: var(--ca-radius, .5rem);
  box-shadow: 0 .5rem 1.5rem rgb(0 0 0 / .18);
  font-size: 1rem;
  line-height: 1.5;
  font-family: var(--ca-font, inherit);
}
@media (min-width: 40rem) { .ca { inset-inline-end: auto; inset-inline-start: 1rem; inset-block-end: 1rem; } }
.ca:focus-visible, .ca a:focus-visible, .ca-btn:focus-visible { outline: 3px solid var(--ca-focus, #1e40af); outline-offset: 2px; }
.ca-title { margin: 0 0 .25rem; font-weight: 800; }
.ca-text { margin: 0 0 1rem; }
.ca-text a { color: var(--ca-link, #1e40af); font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }
.ca-current { margin: -.5rem 0 1rem; font-weight: 600; }
.ca-current[hidden] { display: none; }
.ca-actions { display: flex; gap: .75rem; }
.ca-btn {
  flex: 1 1 0;
  min-block-size: 2.75rem;
  padding: .5rem 1rem;
  font: inherit;
  font-weight: 600;
  color: var(--ca-btn-fg, #fff);
  background: var(--ca-btn-bg, #1f2937);
  border: 2px solid var(--ca-btn-bg, #1f2937);
  border-radius: var(--ca-radius, .5rem);
  cursor: pointer;
}
/* Darker, not lighter: white text keeps its contrast on the hover colour. */
.ca-btn:hover { filter: brightness(.88); }
.ca-btn-outline { color: var(--ca-btn-bg, #1f2937); background: var(--ca-bg, #fff); }
.ca-btn-outline:hover { filter: none; background: var(--ca-tint, #e5e7eb); }
/* While the banner is up the page can scroll past it, and a focused link scrolls into view above it instead of under it. */
.ca-open { scroll-padding-block-end: var(--ca-h, 0px); }
/* Only where the banner spans the page: from 40rem it sits in a corner and a gap under the footer would be wasted. */
@media not (min-width: 40rem) { .ca-open body { padding-block-end: var(--ca-h, 0px); } }
