/* Keep storefront typography and controls isolated from the consent panel. */
#s4h-cookie-panel {
  --s4h-cookie-ink: #2d2034;
  --s4h-cookie-purple: #583566;
  --s4h-cookie-line: #d6cbd9;
  box-sizing: border-box;
  position: fixed;
  z-index: 9990;
  inset: auto max(1rem, env(safe-area-inset-right)) max(1rem, env(safe-area-inset-bottom)) auto;
  inline-size: min(29rem, calc(100% - 2rem));
  max-block-size: min(74vh, 38rem);
  max-block-size: min(74dvh, 38rem);
  overflow: auto;
  overscroll-behavior: contain;
  padding: clamp(1rem, 3vw, 1.4rem);
  color: var(--s4h-cookie-ink);
  background: #fff;
  border: 1px solid var(--s4h-cookie-line);
  border-radius: 1rem;
  box-shadow: 0 .4rem 1.8rem rgb(42 22 49 / 16%);
  font: 400 1rem/1.5 system-ui, sans-serif;
  text-align: start;
  overflow-wrap: anywhere;
}

#s4h-cookie-panel *,
#s4h-cookie-panel *::before,
#s4h-cookie-panel *::after {
  box-sizing: border-box;
}

#s4h-cookie-panel[hidden],
#s4h-cookie-panel [hidden],
[data-s4h-cookie-action="reopen"][hidden] {
  display: none !important;
}

#s4h-cookie-panel :is(h2, h3) {
  margin: 0 0 .45rem;
  color: var(--s4h-cookie-ink);
  font: 650 1.2em/1.25 system-ui, sans-serif;
  text-transform: none;
  letter-spacing: normal;
}

#s4h-cookie-panel p {
  margin: 0 0 .8rem;
  color: inherit;
  font: inherit;
}

#s4h-cookie-panel a {
  color: var(--s4h-cookie-purple);
  text-decoration: underline;
  text-underline-offset: .16em;
}

#s4h-cookie-options {
  margin: .65rem 0 .85rem;
  padding: .7rem .85rem;
  border: 1px solid var(--s4h-cookie-line, #d6cbd9);
  border-radius: .6rem;
  background: #faf7fb;
}

#s4h-cookie-options :is(label, legend) {
  color: inherit;
  font: inherit;
}

#s4h-cookie-options label {
  display: block;
  min-block-size: 2.75rem;
  padding-block: .55rem;
  cursor: pointer;
}

#s4h-cookie-options input[type="checkbox"] {
  appearance: auto;
  float: none;
  position: static;
  inline-size: 1.2rem;
  block-size: 1.2rem;
  margin: 0 .35rem 0 0;
  accent-color: var(--s4h-cookie-purple, #583566);
  vertical-align: -.2em;
}

#s4h-cookie-panel [data-s4h-cookie-action] {
  appearance: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-block-size: 2.75rem;
  max-inline-size: 100%;
  margin: .15rem .15rem .15rem 0;
  padding: .55rem .8rem;
  border: 1px solid var(--s4h-cookie-purple);
  border-radius: .55rem;
  background: #fff;
  color: var(--s4h-cookie-purple);
  box-shadow: none;
  font: 600 .95rem/1.3 system-ui, sans-serif;
  letter-spacing: normal;
  text-align: center;
  text-decoration: none;
  text-transform: none;
  white-space: normal;
  cursor: pointer;
}

#s4h-cookie-panel :is([data-s4h-cookie-action="accept"], [data-s4h-cookie-action="reject"]) {
  inline-size: min(10.25rem, 100%);
  color: #fff;
  background: var(--s4h-cookie-purple);
}

#s4h-cookie-panel [data-s4h-cookie-action]:hover {
  outline: 1px solid var(--s4h-cookie-purple);
}

[data-s4h-cookie-action="reopen"] {
  display: inline-block;
  min-block-size: 2.75rem;
  margin: 0;
  padding: .55rem .25rem;
  border: 0;
  border-radius: .2rem;
  box-shadow: none;
  background: transparent;
  color: inherit;
  font: inherit;
  text-align: start;
  text-decoration: underline;
  text-underline-offset: .18em;
  cursor: pointer;
}

#s4h-cookie-panel :focus-visible,
[data-s4h-cookie-action="reopen"]:focus-visible {
  outline: 3px solid #784e93;
  outline-offset: 3px;
}

@media (max-width: 32rem) {
  #s4h-cookie-panel {
    inset-inline: max(.65rem, env(safe-area-inset-left)) max(.65rem, env(safe-area-inset-right));
    inset-block-end: max(.65rem, env(safe-area-inset-bottom));
    inline-size: auto;
    max-block-size: 66vh;
    max-block-size: 66dvh;
    border-radius: .8rem;
  }

  #s4h-cookie-panel :is([data-s4h-cookie-action="accept"], [data-s4h-cookie-action="reject"]) {
    inline-size: calc(50% - .55rem);
  }
}
