.cookie-consent { color: var(--text); font-family: var(--font-body); font-size: var(--text-md); line-height: 1.5; }
:root { scroll-padding-bottom: var(--cookie-banner-space, 0px); }
body:has(.cookie-banner:not([hidden])) { padding-bottom: var(--cookie-banner-space, 0px); }
.cookie-consent [hidden] { display: none !important; }
.cookie-consent h2, .cookie-consent h3, .cookie-consent p { margin: 0; }
.cookie-consent a { color: var(--brand); text-decoration: underline; text-underline-offset: .2em; }
.cookie-preferences-footer { padding: var(--space-3) var(--space-4); text-align: center; background: var(--surface); }
.cookie-banner { position: fixed; z-index: 1100; inset: auto var(--space-4) var(--space-4); max-width: var(--container); margin-inline: auto;
  display: flex; align-items: center; gap: var(--space-6); padding: var(--space-5); border: 1px solid var(--border); border-radius: var(--radius-md);
  background: var(--surface); box-shadow: var(--shadow-2); max-height: calc(100dvh - var(--space-6)); overflow: auto; }
.cookie-banner__copy { flex: 1; min-width: 0; }
.cookie-banner h2 { font-size: var(--text-lg); font-weight: var(--font-bold); margin-bottom: var(--space-2); }
.cookie-banner p { color: var(--text-soft); font-size: var(--text-sm); max-width: var(--measure); }
.cookie-actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-2); flex-shrink: 0; }
.cookie-actions > :last-child { grid-column: 1 / -1; }
.cookie-button, .cookie-text-button { font: inherit; cursor: pointer; min-height: 2.75rem; padding: var(--space-2) var(--space-4); border-radius: var(--radius-sm); }
.cookie-button { background: var(--surface); color: var(--text); border: 1px solid var(--border-strong); font-weight: var(--font-semibold); }
.cookie-text-button { color: var(--text-soft); background: transparent; border: 1px solid transparent; text-decoration: underline; text-underline-offset: .2em; }
.cookie-consent :is(button, input, a):focus-visible { outline: 2px solid var(--focus-ring); outline-offset: 3px; }
.cookie-consent button:disabled { cursor: wait; opacity: .65; }
.cookie-dialog { color: var(--text); background: var(--surface); width: min(38rem, calc(100% - var(--space-6))); max-height: calc(100dvh - var(--space-6));
  margin: auto; padding: var(--space-6); border: 1px solid var(--border); border-radius: var(--radius-md); box-shadow: var(--shadow-2); overflow-y: auto; overscroll-behavior: contain; }
.cookie-dialog::backdrop { background: var(--scrim); }
.cookie-dialog { overflow-wrap: anywhere; }
.cookie-dialog__header > h2, .cookie-category > div { min-width: 0; }
.cookie-dialog__header { display: flex; align-items: start; justify-content: space-between; gap: var(--space-4); margin-bottom: var(--space-3); }
.cookie-dialog__header h2 { font-size: var(--text-xl); line-height: 1.3; font-weight: var(--font-bold); }
.cookie-dialog > p { color: var(--text-soft); }
.cookie-category { display: flex; align-items: center; justify-content: space-between; gap: var(--space-5); padding-block: var(--space-5); border-bottom: 1px solid var(--border); }
.cookie-category h3, .cookie-category label { display: inline-block; font-size: var(--text-md); font-weight: var(--font-semibold); }
.cookie-category label { cursor: pointer; padding-block: var(--space-2); }
.cookie-category p { color: var(--text-soft); font-size: var(--text-sm); }
.cookie-category__fixed { flex-shrink: 0; font-size: var(--text-sm); color: var(--text-faint); }
.cookie-category input { appearance: auto; width: 1.5rem; height: 1.5rem; flex: 0 0 1.5rem; accent-color: var(--brand); cursor: pointer; margin: var(--space-2); }
.cookie-dialog .cookie-dialog__note { font-size: var(--text-sm); margin-top: var(--space-4); }
.cookie-dialog__actions { display: flex; justify-content: flex-end; margin-top: var(--space-5); }
.cookie-button--save { background: var(--brand); border-color: var(--brand); color: var(--on-brand); }
.cookie-consent .cookie-error { color: var(--danger); margin-top: var(--space-3); font-size: var(--text-sm); }
@media (hover: hover) {
  .cookie-button:hover { background: var(--surface-2); }
  .cookie-text-button:hover { color: var(--text); }
  .cookie-button--save:hover { background: var(--brand-hover); }
}
@media (max-width: 48rem) {
  .cookie-banner { flex-direction: column; align-items: stretch; gap: var(--space-4); padding: var(--space-4); }
  .cookie-actions { width: 100%; }
  .cookie-dialog { padding: var(--space-5); }
  .cookie-dialog__header, .cookie-category { flex-wrap: wrap; }
  .cookie-category { gap: var(--space-3); }
  .cookie-category > div { flex: 1 1 12rem; }
  .cookie-category__fixed { white-space: normal; max-width: 4rem; }
  .cookie-dialog__actions .cookie-button { width: 100%; }
}
@media (forced-colors: active) { .cookie-button, .cookie-dialog, .cookie-banner { border-color: ButtonText; } }
