.mh-cookie-modal-open {
  overflow: hidden;
}

.mh-cookie-backdrop {
  position: fixed;
  inset: 0;
  z-index: 2000;
  background: rgba(17, 19, 24, .58);
  backdrop-filter: blur(5px);
}

.mh-cookie-banner,
.mh-cookie-modal {
  position: fixed;
  z-index: 2010;
  color: var(--mh-ink);
  background: var(--mh-paper);
  box-shadow: var(--mh-shadow-lg);
}

.mh-cookie-banner[hidden],
.mh-cookie-modal[hidden],
.mh-cookie-backdrop[hidden] {
  display: none;
}

.mh-cookie-banner {
  right: 20px;
  bottom: 20px;
  left: 20px;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: clamp(1rem, 2.25vw, 1.6rem);
  align-items: center;
  width: min(calc(100% - 40px), 720px);
  margin: 0 auto;
  border: 1px solid var(--mh-line);
  border-radius: var(--mh-radius-md);
  padding: 1.1rem 1.25rem;
  background: #fff;
}

.mh-cookie-banner .mh-cookie-notice-close { position: absolute; top: .4rem; right: .4rem; }
.mh-cookie-banner .mh-cookie-heading { font-size: 1.15rem; padding-right: 2.4rem; }
.mh-cookie-banner .mh-cookie-copy { font-size: .9rem; line-height: 1.45; }
.mh-cookie-banner .mh-cookie-links { display: flex; flex-wrap: wrap; gap: .4rem 1rem; align-items: center; }
.mh-cookie-text-link { border: 0; background: transparent; color: var(--mh-brand); font: inherit; font-weight: 750; text-decoration: underline; padding: .25rem 0; }
[data-cookie-regional-choices][hidden], [data-cookie-signal][hidden] { display: none; }

.mh-cookie-banner__content {
  max-width: 38rem;
}

.mh-cookie-heading {
  margin: 0;
  color: var(--mh-ink-strong);
  font-size: clamp(1.25rem, 2.2vw, 1.65rem);
  font-weight: 850;
  line-height: 1.16;
  letter-spacing: -.02em;
}

.mh-cookie-eyebrow {
  margin: 0;
  color: var(--mh-brand);
  font-size: .78rem;
  font-weight: 850;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.mh-cookie-copy {
  margin: .45rem 0 0;
  color: var(--mh-muted);
  font-size: .95rem;
  line-height: 1.55;
}

.mh-cookie-links {
  margin: .65rem 0 0;
  font-size: .85rem;
  font-weight: 750;
}

.mh-cookie-links a {
  color: var(--mh-brand);
}

.mh-cookie-actions {
  display: flex;
  flex-wrap: wrap;
  gap: .65rem;
  justify-content: flex-end;
}

.mh-cookie-actions--banner {
  flex-wrap: nowrap;
  align-items: center;
}

.mh-cookie-actions--modal {
  justify-content: flex-start;
  margin-top: 1.4rem;
}

.mh-cookie-button {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  border: 1px solid transparent;
  border-radius: 999px;
  padding: 0 1.1rem;
  font: inherit;
  font-size: .88rem;
  font-weight: 800;
  cursor: pointer;
  transition: background var(--mh-ease), border-color var(--mh-ease), color var(--mh-ease), transform var(--mh-ease);
}

.mh-cookie-button:hover {
  transform: translateY(-1px);
}

.mh-cookie-button:focus-visible,
.mh-cookie-close:focus-visible,
.mh-cookie-links a:focus-visible,
.footer-cookie-preferences:focus-visible,
.mh-cookie-toggle input:focus-visible + span {
  outline: 3px solid var(--mh-brand);
  outline-offset: 3px;
}

.mh-cookie-button--primary {
  color: #fff;
  background: var(--mh-brand);
  box-shadow: var(--mh-shadow-brand);
}

.mh-cookie-actions--banner .mh-cookie-button--primary {
  min-width: 10.75rem;
  padding-inline: 1.35rem;
  font-weight: 900;
}

.mh-cookie-button--secondary {
  border-color: var(--mh-line-strong);
  color: var(--mh-brand);
  background: var(--mh-paper);
}

.mh-cookie-button--secondary:hover {
  border-color: var(--mh-brand);
  background: var(--mh-soft-warm);
}

.mh-cookie-button--text {
  color: var(--mh-brand);
  background: transparent;
  text-decoration: underline;
  text-decoration-color: transparent;
  text-underline-offset: .18em;
}

.mh-cookie-button--text:hover,
.mh-cookie-button--text:focus-visible {
  text-decoration-color: currentColor;
}

.mh-cookie-modal {
  top: 50%;
  left: 50%;
  width: min(calc(100% - 32px), 680px);
  max-height: min(calc(100vh - 32px), 780px);
  overflow: auto;
  transform: translate(-50%, -50%);
  border: 1px solid var(--mh-line);
  border-radius: var(--mh-radius-lg);
  padding: clamp(1.4rem, 4vw, 2.1rem);
}

.mh-cookie-modal__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1.1rem;
}

.mh-cookie-modal h2 {
  margin: .45rem 0 0;
  color: var(--mh-ink-strong);
  font-size: clamp(1.75rem, 4vw, 2.5rem);
}

.mh-cookie-close {
  position: relative;
  display: inline-flex;
  width: 44px;
  height: 44px;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--mh-line);
  border-radius: 999px;
  background: var(--mh-paper);
  cursor: pointer;
}

.mh-cookie-close span::before,
.mh-cookie-close span::after {
  content: "";
  position: absolute;
  top: 21px;
  right: 12px;
  left: 12px;
  height: 2px;
  border-radius: 999px;
  background: var(--mh-ink);
}

.mh-cookie-close span::before { transform: rotate(45deg); }
.mh-cookie-close span::after { transform: rotate(-45deg); }

.mh-cookie-choice-list {
  display: grid;
  gap: .75rem;
  margin-top: 1.4rem;
}

.mh-cookie-choice {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 1.1rem;
  align-items: center;
  border: 1px solid var(--mh-line);
  border-radius: var(--mh-radius-md);
  padding: 1.1rem;
  background: var(--mh-soft);
}

.mh-cookie-choice h3 {
  margin: 0;
  color: var(--mh-ink-strong);
  font-size: 1.08rem;
}

.mh-cookie-choice p {
  margin: .35rem 0 0;
  color: var(--mh-muted);
  font-size: .88rem;
  line-height: 1.5;
}

.mh-cookie-status {
  color: var(--mh-green);
  font-size: .8rem;
  font-weight: 800;
}

.mh-cookie-toggle {
  display: grid;
  gap: .45rem;
  justify-items: center;
  color: var(--mh-muted);
  font-size: .75rem;
  font-weight: 800;
  cursor: pointer;
}

.mh-cookie-toggle input {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.mh-cookie-toggle > span:last-child {
  position: relative;
  display: inline-flex;
  width: 56px;
  height: 32px;
  border-radius: 999px;
  background: var(--mh-line-strong);
  transition: background var(--mh-ease);
}

.mh-cookie-toggle > span:last-child::after {
  content: "";
  position: absolute;
  top: 4px;
  left: 4px;
  width: 24px;
  height: 24px;
  border-radius: 999px;
  background: #fff;
  box-shadow: 0 3px 8px rgba(17, 19, 24, .22);
  transition: transform var(--mh-ease);
}

.mh-cookie-toggle input:checked + span {
  background: var(--mh-brand);
}

.mh-cookie-toggle input:checked + span::after {
  transform: translateX(24px);
}

.footer-cookie-preferences {
  display: inline;
  border: 0;
  padding: 0;
  color: #fff;
  background: transparent;
  font: inherit;
  text-align: left;
  text-decoration: underline;
  text-decoration-color: transparent;
  text-underline-offset: .18em;
  cursor: pointer;
}

.footer-cookie-preferences:hover,
.footer-cookie-preferences:focus-visible {
  color: #fff;
  text-decoration-color: currentColor;
}

.footer-cookie-preferences:focus-visible {
  outline-color: #fff;
}

@media (max-width: 860px) {
  .mh-cookie-banner {
    grid-template-columns: 1fr;
    align-items: stretch;
  }

  .mh-cookie-actions {
    justify-content: flex-start;
  }

  .mh-cookie-actions--banner {
    flex-wrap: wrap;
  }
}

@media (max-width: 620px) {
  .mh-cookie-banner {
    right: 12px;
    bottom: 12px;
    left: 12px;
    width: min(calc(100% - 24px), 1060px);
  }

  .mh-cookie-choice {
    grid-template-columns: 1fr;
  }

  .mh-cookie-toggle {
    justify-items: start;
  }

  .mh-cookie-actions {
    flex-direction: column;
  }

  .mh-cookie-button {
    width: 100%;
  }
}

@media (prefers-reduced-motion: reduce) {
  .mh-cookie-button,
  .mh-cookie-toggle > span:last-child,
  .mh-cookie-toggle > span:last-child::after {
    transition: none;
  }

  .mh-cookie-button:hover {
    transform: none;
  }
}
