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

.cookie-consent {
  position: relative;
  z-index: 2000;
  color: #252321;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  letter-spacing: 0;
}

.cookie-consent__banner {
  position: fixed;
  right: max(16px, env(safe-area-inset-right));
  bottom: max(16px, env(safe-area-inset-bottom));
  left: max(16px, env(safe-area-inset-left));
  z-index: 2001;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 24px;
  width: min(calc(100% - 32px), 1120px);
  margin-inline: auto;
  padding: 18px 20px;
  background: rgba(255, 249, 246, 0.97);
  border: 1px solid rgba(169, 73, 45, 0.28);
  border-radius: 16px;
  box-shadow: 0 20px 55px rgba(70, 39, 29, 0.2);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

.cookie-consent__copy {
  max-width: 620px;
}

.cookie-consent__copy h2,
.cookie-consent__dialog h2,
.cookie-consent__dialog h3 {
  margin: 0;
  color: #252321;
  letter-spacing: 0;
}

.cookie-consent__copy h2 {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.35rem;
  font-weight: 500;
}

.cookie-consent__copy p,
.cookie-consent__dialog p {
  margin: 6px 0 0;
  color: #5c5551;
  font-size: 0.9rem;
  line-height: 1.55;
}

.cookie-consent__actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 10px;
}

.cookie-consent .button,
.cookie-consent__settings-link,
.cookie-consent__close {
  min-width: 44px;
  min-height: 44px;
}

.cookie-consent .button {
  margin: 0;
  padding-inline: 18px;
  border: 1px solid #a9492d;
  cursor: pointer;
}

.cookie-consent .button--primary {
  color: #fffdfb;
  background: #8f3f28;
  box-shadow: 0 10px 24px rgba(143, 63, 40, 0.2);
}

.cookie-consent .button--secondary {
  color: #71331f;
  background: #fffdfb;
}

.cookie-consent__settings-link {
  padding: 8px 10px;
  color: #71331f;
  background: transparent;
  border: 0;
  text-decoration: underline;
  text-underline-offset: 4px;
  cursor: pointer;
}

.cookie-consent__modal {
  position: fixed;
  inset: 0;
  z-index: 2010;
  display: grid;
  place-items: center;
  padding: max(16px, env(safe-area-inset-top)) max(16px, env(safe-area-inset-right)) max(16px, env(safe-area-inset-bottom)) max(16px, env(safe-area-inset-left));
}

.cookie-consent__backdrop {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  padding: 0;
  background: rgba(43, 29, 24, 0.36);
  border: 0;
  backdrop-filter: blur(7px);
  -webkit-backdrop-filter: blur(7px);
  cursor: default;
}

.cookie-consent__dialog {
  position: relative;
  z-index: 1;
  width: min(100%, 620px);
  max-height: calc(100dvh - 32px);
  padding: 24px;
  overflow: auto;
  background: #fff9f6;
  border: 1px solid rgba(169, 73, 45, 0.25);
  border-radius: 18px;
  box-shadow: 0 28px 80px rgba(55, 31, 23, 0.28);
  overscroll-behavior: contain;
}

.cookie-consent__dialog-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
}

.cookie-consent__dialog .eyebrow {
  color: #8f3f28;
}

.cookie-consent__dialog h2 {
  margin-top: 3px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(1.65rem, 4vw, 2.2rem);
  font-weight: 500;
}

.cookie-consent__close {
  display: grid;
  flex: 0 0 44px;
  place-items: center;
  padding: 0;
  color: #71331f;
  background: #f4ded5;
  border: 1px solid rgba(169, 73, 45, 0.25);
  border-radius: 50%;
  font-size: 1.6rem;
  line-height: 1;
  cursor: pointer;
}

.cookie-consent__preferences {
  display: grid;
  gap: 12px;
  margin-top: 20px;
}

.cookie-consent__category {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 18px;
  padding: 15px 16px;
  background: #fffdfb;
  border: 1px solid rgba(169, 73, 45, 0.18);
  border-radius: 10px;
}

.cookie-consent__category h3 {
  font-family: inherit;
  font-size: 1rem;
  font-weight: 800;
}

.cookie-consent__category p {
  font-size: 0.84rem;
}

.cookie-consent__switch {
  position: relative;
  display: inline-grid;
  place-items: center;
  width: 52px;
  height: 44px;
  cursor: pointer;
}

.cookie-consent__switch input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.cookie-consent__switch > span[aria-hidden] {
  position: relative;
  width: 46px;
  height: 26px;
  background: #d8cfca;
  border: 1px solid #8d817b;
  border-radius: 999px;
  transition: background 160ms ease, border-color 160ms ease;
}

.cookie-consent__switch > span[aria-hidden]::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 18px;
  height: 18px;
  background: #fff;
  border-radius: 50%;
  box-shadow: 0 2px 6px rgba(52, 36, 30, 0.22);
  transition: transform 160ms ease;
}

.cookie-consent__switch input:checked + span[aria-hidden] {
  background: #8f3f28;
  border-color: #71331f;
}

.cookie-consent__switch input:checked + span[aria-hidden]::after {
  transform: translateX(20px);
}

.cookie-consent__switch input:disabled + span[aria-hidden] {
  background: #6f655f;
  border-color: #5c534e;
  opacity: 0.72;
}

.cookie-consent__switch input:focus-visible + span[aria-hidden],
.cookie-consent :is(button, a):focus-visible {
  outline: 3px solid #8f3f28;
  outline-offset: 3px;
}

.cookie-consent__save {
  justify-self: end;
  margin-top: 6px !important;
}

body.cookie-modal-open {
  overflow: hidden;
}

@media (max-width: 760px) {
  .cookie-consent__banner {
    grid-template-columns: 1fr;
    gap: 14px;
    padding: 16px;
  }

  .cookie-consent__actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .cookie-consent__actions .button {
    width: 100%;
    white-space: normal;
  }

  .cookie-consent__settings-link {
    grid-column: 1 / -1;
  }

  .cookie-consent__dialog {
    padding: 20px 16px max(20px, env(safe-area-inset-bottom));
  }
}

@media (max-width: 380px) {
  .cookie-consent__actions {
    grid-template-columns: 1fr;
  }

  .cookie-consent__settings-link {
    grid-column: auto;
  }
}

@media (prefers-reduced-motion: reduce) {
  .cookie-consent *,
  .cookie-consent *::before,
  .cookie-consent *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}
