/* First visit: a non-modal panel, also usable without JavaScript. */
.cookie-notice {
  position: fixed;
  z-index: 120;
  inset-inline-start: max(1.25rem, env(safe-area-inset-left));
  bottom: max(1.25rem, env(safe-area-inset-bottom));
  box-sizing: border-box;
  width: min(30rem, calc(100% - 2.5rem));
  max-height: 65vh;
  max-height: 65dvh;
  overflow: auto;
  overscroll-behavior: contain;
  padding: 1.25rem 1.5rem;
  color: var(--color-text);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-top: .25rem solid var(--color-primary);
  border-radius: 1rem;
  box-shadow: 0 .5rem 2.5rem rgb(25 46 35 / .19);
}
.cookie-notice h2 {
  margin: 0;
  color: var(--color-primary);
  font-size: 1.4rem;
  line-height: 1.2;
}
.cookie-notice p { margin: .65rem 0 .4rem; line-height: 1.45; }
.cookie-settings-link { color: var(--color-primary); text-underline-offset: .18em; }
.cookie-actions { display: flex; flex-wrap: wrap; gap: .65rem; margin-block: .6rem; }
.cookie-actions .button { white-space: normal; min-height: 44px; }
.cookie-notice .cookie-actions { margin: 1rem 0 0; }
.cookie-notice .cookie-actions .button { flex: 1 1 9rem; justify-content: center; }
@media (min-height: 30.01rem) {
  html:has(.cookie-notice) { scroll-padding-block-end: min(23rem, 65vh); }
  body:has(.cookie-notice)::after { content: ""; display: block; height: min(23rem, calc(65vh + 1.25rem)); }
}
@media (max-width: 36rem) {
  .cookie-notice {
    inset-inline: .65rem;
    bottom: max(.65rem, env(safe-area-inset-bottom));
    width: auto;
    padding: 1rem;
  }
  .cookie-notice .cookie-actions { gap: .5rem; }
}
/* Keep the page reachable in landscape and at high browser zoom. */
@media (max-height: 30rem) {
  .cookie-notice {
    position: relative;
    inset: auto;
    width: min(30rem, calc(100% - 2rem));
    max-height: none;
    margin: 1rem auto;
  }
}
@media (prefers-reduced-motion: no-preference) {
  .cookie-notice { animation: cookie-notice-enter .28s ease-out; }
  @keyframes cookie-notice-enter {
    from { opacity: 0; transform: translateY(1.5rem); }
    to { opacity: 1; transform: translateY(0); }
  }
}
@media print {
  .cookie-notice, body:has(.cookie-notice)::after { display: none; }
}
