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

.cookie-consent {
  position: fixed;
  z-index: 10010;
  inset-inline: 16px;
  bottom: calc(16px + env(safe-area-inset-bottom, 0px));
  width: min(780px, calc(100% - 32px));
  max-height: calc(100dvh - 32px - env(safe-area-inset-bottom, 0px));
  overflow: auto;
  margin-inline: auto;
  padding: 24px;
  color: var(--odp-burgundy-700);
  background: var(--odp-burgundy-25);
  border: 1px solid var(--odp-burgundy-200);
  border-radius: 20px;
  box-shadow: var(--odp-shadow-card);
  font-family: var(--odp-font-body);
}

.cookie-consent__title {
  margin: 0 0 8px;
  font: 700 20px/1.3 var(--odp-font-body);
}

.cookie-consent__copy p,
.cookie-preferences p {
  margin: 0 0 12px;
  font: 400 16px/1.5 var(--odp-font-body);
}

.cookie-consent a,
.cookie-preferences a {
  color: var(--odp-burgundy-600);
  text-underline-offset: 3px;
}

.cookie-consent__actions,
.cookie-preferences__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 20px;
}

.cookie-consent__button {
  min-height: 44px;
  padding: 10px 18px;
  color: var(--odp-burgundy-700);
  background: var(--odp-white);
  border: 1px solid var(--odp-burgundy-600);
  border-radius: 28px;
  font: 700 15px/1.3 var(--odp-font-body);
  cursor: pointer;
  transition: background-color 200ms ease-in-out, border-color 200ms ease-in-out, color 200ms ease-in-out, box-shadow 200ms ease-in-out;
}

.cookie-consent__button--choice {
  min-width: 205px;
}

.cookie-consent__button:hover {
  color: var(--odp-white);
  background: var(--odp-burgundy-600);
  box-shadow: 0 4px 10px rgba(88, 44, 51, .2);
}

.cookie-consent__button--primary {
  color: var(--odp-white);
  background: var(--odp-amber-500);
  border-color: var(--odp-amber-500);
  transition: background-color 200ms ease-out, border-color 200ms ease-out;
}

.cookie-consent__button--primary:hover {
  color: var(--odp-white);
  background: var(--odp-amber-600);
  border-color: var(--odp-amber-600);
  box-shadow: none;
}

.cookie-consent :focus-visible,
.cookie-preferences :focus-visible,
.site-footer__cookie-settings:focus-visible {
  outline: 3px solid var(--odp-amber-500);
  outline-offset: 3px;
}

.cookie-preferences {
  width: min(640px, calc(100% - 32px));
  max-height: calc(100dvh - 32px);
  padding: 0;
  color: var(--odp-burgundy-700);
  background: var(--odp-burgundy-25);
  border: 1px solid var(--odp-burgundy-200);
  border-radius: 20px;
  box-shadow: var(--odp-shadow-card);
}

.cookie-preferences::backdrop {
  background: rgba(38, 23, 26, .62);
}

.cookie-preferences__surface {
  max-height: calc(100dvh - 34px);
  overflow: auto;
  padding: 28px;
  font-family: var(--odp-font-body);
}

.cookie-preferences__header,
.cookie-preferences__category-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.cookie-preferences__header h2 {
  margin: 0;
  font: 700 24px/1.25 var(--odp-font-body);
}

.cookie-preferences__close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  flex: 0 0 42px;
  padding: 0;
  color: var(--odp-burgundy-700);
  background: var(--odp-white);
  border: 1px solid var(--odp-burgundy-200);
  border-radius: 50%;
  cursor: pointer;
  transition: background-color 200ms ease-in-out, border-color 200ms ease-in-out, color 200ms ease-in-out, box-shadow 200ms ease-in-out;
}

.cookie-preferences__close span {
  position: relative;
  display: block;
  width: 20px;
  height: 20px;
}

.cookie-preferences__close span::before,
.cookie-preferences__close span::after {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 23px;
  height: 3px;
  content: '';
  background: currentColor;
  border-radius: 999px;
}

.cookie-preferences__close span::before {
  transform: translate(-50%, -50%) rotate(45deg);
}

.cookie-preferences__close span::after {
  transform: translate(-50%, -50%) rotate(-45deg);
}

.cookie-preferences__close:hover {
  color: var(--odp-white);
  background: var(--odp-burgundy-600);
  border-color: var(--odp-burgundy-600);
  box-shadow: 0 4px 10px rgba(88, 44, 51, .2);
}

.cookie-preferences__category {
  padding: 18px 0;
  border-top: 1px solid var(--odp-burgundy-200);
}

.cookie-preferences__category h3 {
  margin: 0;
  font: 700 18px/1.3 var(--odp-font-body);
}

.cookie-preferences__category-head span {
  font-size: 14px;
  font-weight: 700;
}

.cookie-preferences__category p {
  margin: 8px 0 0;
}

.cookie-preferences__toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 44px;
  cursor: pointer;
}

.cookie-preferences__toggle input {
  position: absolute;
  width: 44px;
  height: 44px;
  margin: 0;
  opacity: 0;
  cursor: pointer;
}

.cookie-preferences__toggle span {
  width: 44px;
  height: 26px;
  background: var(--odp-burgundy-200);
  border-radius: 20px;
  position: relative;
}

.cookie-preferences__toggle span::after {
  content: '';
  position: absolute;
  top: 3px;
  left: 3px;
  width: 20px;
  height: 20px;
  background: var(--odp-white);
  border-radius: 50%;
  transition: transform .15s ease;
}

.cookie-preferences__toggle input:checked+span {
  background: var(--odp-burgundy-600);
}

.cookie-preferences__toggle input:checked+span::after {
  transform: translateX(18px);
}

.cookie-preferences__toggle input:focus-visible+span {
  outline: 3px solid var(--odp-amber-500);
  outline-offset: 3px;
}

.site-footer__cookie-settings {
  min-height: 44px;
  padding: 0;
  color: var(--odp-white);
  background: none;
  border: 0;
  font: 400 12px/18px var(--odp-font-body);
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}

body.cookie-preferences-is-open {
  overflow: hidden;
}

@media (max-width: 767px) {
  .cookie-consent {
    padding: clamp(16px, 6vw, 24px);
  }

  .cookie-consent__actions,
  .cookie-preferences__actions {
    flex-direction: column;
  }

  .cookie-consent__button {
    width: 100%;
  }

  .cookie-preferences__surface {
    padding: 20px;
  }
}

@media (prefers-reduced-motion: reduce) {

  .cookie-preferences__toggle span::after,
  .cookie-consent__button,
  .cookie-preferences__close {
    transition: none;
  }
}
