.cookie-banner {
  position: fixed;
  z-index: 300;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 1rem;
  background: rgba(8, 6, 20, .68);
}

.cookie-banner__dialog {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 1.25rem;
  align-items: center;
  width: min(1200px, 100%);
  padding: 1.25rem;
  color: #fff;
  background: rgba(25, 20, 50, .97);
  border: 1px solid rgba(255, 255, 255, .16);
  border-radius: 1rem;
  box-shadow: 0 20px 50px rgba(10, 7, 30, .35);
}

.cookie-banner[hidden],
.cookie-modal[hidden] {
  display: none;
}

html.cookie-consent-locked,
body.cookie-consent-locked {
  height: 100%;
  overflow: hidden !important;
  overscroll-behavior: none;
}

.cookie-banner p {
  max-width: 92ch;
  margin: 0;
  font: 600 .9rem/1.65 Manrope, Arial, sans-serif;
}

.cookie-banner a {
  color: #82e942;
  font-weight: 800;
}

.cookie-actions {
  display: flex;
  flex-wrap: wrap;
  gap: .65rem;
  justify-content: flex-end;
}

.cookie-button,
.cookie-preferences {
  min-height: 44px;
  border: 0;
  border-radius: .55rem;
  padding: .65rem 1rem;
  font: 800 .8rem/1 Manrope, Arial, sans-serif;
  cursor: pointer;
}

.cookie-button:hover,
.cookie-preferences:hover {
  filter: brightness(1.08);
}

.cookie-button--settings {
  width: 44px;
  padding: 0;
  color: #fff;
  background: transparent;
  border: 1px solid rgba(255, 255, 255, .45);
  font-size: 1.3rem;
}

.cookie-button--reject {
  color: #fff;
  background: #d84d22;
}

.cookie-button--accept {
  color: #173400;
  background: #82e942;
}

.cookie-modal {
  position: fixed;
  z-index: 220;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 1rem;
  background: rgba(8, 6, 20, .68);
}

.cookie-modal__dialog {
  position: relative;
  width: min(760px, 100%);
  max-height: min(760px, calc(100dvh - 2rem));
  overflow-y: auto;
  padding: clamp(1.4rem, 4vw, 2.4rem);
  color: #20194a;
  background: #fbfbff;
  border-radius: 1rem;
  box-shadow: 0 30px 80px rgba(0, 0, 0, .35);
}

.cookie-modal__dialog h2 {
  margin: 0 2.5rem 1rem 0;
  font: 700 clamp(2rem, 5vw, 3.1rem)/1 "Space Grotesk", Arial, sans-serif;
  letter-spacing: -.05em;
}

.cookie-modal__dialog > p {
  margin: 0 0 1.4rem;
  line-height: 1.65;
}

.cookie-close {
  position: absolute;
  top: .9rem;
  right: .9rem;
  width: 42px;
  height: 42px;
  border: 0;
  color: #3b3654;
  background: transparent;
  font-size: 2rem;
  line-height: 1;
  cursor: pointer;
}

.cookie-category {
  padding: 1rem 0;
  border-top: 1px solid #e1dff0;
}

.cookie-category__top {
  display: flex;
  align-items: center;
  gap: .8rem;
}

.cookie-category h3 {
  margin: 0;
  font-size: 1rem;
}

.cookie-category p {
  margin: .55rem 0 0;
  color: #504b70;
  font-size: .9rem;
  line-height: 1.6;
}

.cookie-switch {
  position: relative;
  flex: 0 0 42px;
  width: 42px;
  height: 24px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: #c9c8d2;
  cursor: pointer;
}

.cookie-switch::after {
  content: "";
  position: absolute;
  top: 4px;
  left: 4px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #fff;
  transition: transform .2s ease;
}

.cookie-switch[aria-checked="true"] {
  background: #6525ed;
}

.cookie-switch[aria-checked="true"]::after {
  transform: translateX(18px);
}

.cookie-switch:disabled {
  cursor: not-allowed;
  opacity: .72;
}

.cookie-modal__actions {
  display: flex;
  flex-wrap: wrap;
  gap: .7rem;
  margin-top: 1.4rem;
}

.cookie-modal__actions .cookie-button {
  min-height: 46px;
}

.cookie-preferences {
  position: fixed;
  z-index: 190;
  top: auto;
  right: auto !important;
  bottom: max(1rem, env(safe-area-inset-bottom));
  left: max(1rem, env(safe-area-inset-left));
  width: 54px;
  min-height: 54px;
  padding: 0;
  border-radius: 50%;
  display: none;
  color: #24105f;
  background: #fff;
  border: 2px solid #6525ed;
  box-shadow: 0 10px 28px rgba(19, 8, 78, .24);
  font-size: 1.65rem;
  line-height: 1;
  transform: none;
}

.cookie-preferences.is-visible {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

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

  .cookie-banner p {
    font-size: .82rem;
  }

  .cookie-actions {
    justify-content: stretch;
  }

  .cookie-button--reject,
  .cookie-button--accept {
    flex: 1 1 150px;
  }
}
