.cookie-consent[hidden], .cookie-consent [hidden] { display: none !important; }

.cookie-consent {
  position: fixed;
  z-index: 60;
  inset-inline-end: max(16px, env(safe-area-inset-right));
  inset-block-end: max(16px, env(safe-area-inset-bottom));
  width: min(316px, calc(100% - 24px));
  max-height: calc(100dvh - 36px);
  overflow: auto;
  padding: 11px;
  border: 1px solid rgb(255 255 255 / 70%);
  border-radius: 20px;
  color: #22201d;
  background: #f3f1ec;
  box-shadow: 0 6px 24px rgb(14 14 15 / 16%), inset 0 1px 0 rgb(255 255 255 / 70%);
  font: 400 14px/1.35 var(--sans, system-ui, sans-serif);
}

@supports ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .cookie-consent {
    background: rgb(247 245 240 / 83%);
    -webkit-backdrop-filter: blur(22px) saturate(140%);
    backdrop-filter: blur(22px) saturate(140%);
  }
}

.cookie-consent p { margin: 0; }
.cookie-consent-copy { padding-inline: 3px; }
.cookie-consent:has(.cookie-consent-close:not([hidden])) .cookie-consent-copy { padding-inline-end: 38px; }
.cookie-consent a { color: #0e0e0f; text-decoration: underline; text-underline-offset: 0.16em; }
.cookie-consent .cookie-consent-current { margin: 5px 3px 0; font-weight: 600; }

.cookie-consent-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
  margin-top: 8px;
}
.cookie-consent button {
  min-height: 44px;
  padding: 6px 9px;
  border: 1px solid rgb(40 34 27 / 25%);
  border-radius: 999px;
  background: rgb(255 255 255 / 35%);
  color: #0e0e0f;
  font: 600 14px/1.25 var(--sans, system-ui, sans-serif);
  cursor: pointer;
}
.cookie-consent button:hover { background: rgb(255 255 255 / 68%); }
.cookie-consent :focus-visible { outline: 2px solid #965019; outline-offset: 2px; }
.cookie-consent .cookie-consent-close {
  position: absolute;
  inset-block-start: 0;
  inset-inline-end: 0;
  width: 44px;
  padding: 0;
  border-color: transparent;
  background: transparent;
  font: 400 23px/1 var(--sans, system-ui, sans-serif);
}

@media (max-width: 640px) {
  .cookie-consent {
    inset-inline-end: max(12px, env(safe-area-inset-right));
    inset-block-end: max(12px, env(safe-area-inset-bottom));
    max-width: 300px;
  }
  .cookie-consent:has(~ main .hero-track) {
    inset-block-start: calc(var(--nav-h) + 12px);
    inset-block-end: auto;
    max-height: calc(100dvh - var(--nav-h) - 24px);
  }
  .cookie-consent:has(~ .sticky) {
    inset-block-end: calc(96px + env(safe-area-inset-bottom));
    max-height: calc(100dvh - 112px - env(safe-area-inset-bottom));
  }
}
@media (max-width: 280px) {
  .cookie-consent-actions { grid-template-columns: 1fr; }
}
@media (prefers-reduced-transparency: reduce), (prefers-contrast: more) {
  .cookie-consent {
    background: #f3f1ec;
    border-color: #746e65;
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
  }
  .cookie-consent-actions button { border-color: #746e65; }
}
