body.cookie-consent-banner-visible {
  padding-bottom: var(--cookie-consent-banner-space, 0);
}

body.cookie-consent-dialog-open {
  overflow: hidden;
}

.cookie-consent-root,
.cookie-consent-root *,
.cookie-consent-root *::before,
.cookie-consent-root *::after {
  box-sizing: border-box;
}

.cookie-consent-banner {
  position: fixed;
  z-index: 1080;
  right: 0;
  bottom: 0;
  left: 0;
  max-height: 92dvh;
  overflow-x: hidden;
  overflow-y: auto;
  color: #0f2d4a;
  background: #fff;
  border: 1px solid rgba(15, 45, 74, 0.16);
  border-width: 1px 0 0;
  border-radius: 1.3rem 1.3rem 0 0;
  box-shadow: 0 -1rem 3rem rgba(15, 45, 74, 0.18);
}

.cookie-consent-banner::before {
  position: absolute;
  inset: 0 0 auto;
  height: 0.25rem;
  content: "";
  background: linear-gradient(90deg, #0f766e, #48a79e, #e9733f);
}

.cookie-consent-banner__content {
  display: grid;
  gap: 1.2rem;
  width: min(100%, 88rem);
  margin-inline: auto;
  padding: 1.3rem max(1rem, env(safe-area-inset-left))
    calc(1.3rem + env(safe-area-inset-bottom))
    max(1rem, env(safe-area-inset-right));
}

.cookie-consent-banner__copy {
  min-width: 0;
  max-width: 57rem;
}

.cookie-consent-banner__heading,
.cookie-settings-header {
  display: flex;
  align-items: center;
  gap: 0.8rem;
}

.cookie-consent-banner__heading {
  margin-bottom: 0.65rem;
}

.cookie-consent-banner__icon {
  display: inline-grid;
  flex: 0 0 auto;
  width: 2.7rem;
  height: 2.7rem;
  color: #0f766e;
  background: #e5f4f1;
  border: 1px solid rgba(15, 118, 110, 0.16);
  border-radius: 50%;
  place-items: center;
}

.cookie-consent-banner__icon svg {
  width: 1.45rem;
  height: 1.45rem;
  fill: none;
  stroke: currentcolor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.cookie-consent-banner__eyebrow {
  display: block;
  margin-bottom: 0.08rem;
  color: #5a7084;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.cookie-consent-banner__title,
.cookie-consent-dialog__title {
  margin: 0;
  line-height: 1.2;
}

.cookie-consent-banner__title {
  font-size: clamp(1.15rem, 2vw, 1.35rem);
}

.cookie-consent-banner__description,
.cookie-consent-banner__status,
.cookie-consent-dialog__description {
  margin: 0;
}

.cookie-consent-banner__description,
.cookie-consent-dialog__description {
  color: #314b64;
  line-height: 1.55;
}

.cookie-consent-banner__description {
  text-wrap: pretty;
}

.cookie-consent-banner__links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  align-items: center;
  margin-top: 0.65rem;
  font-size: 0.9rem;
  font-weight: 650;
}

.cookie-consent-banner__links a,
.cookie-consent-dialog a,
.cookie-settings-footer a {
  color: #0f766e;
  text-underline-offset: 0.16em;
}

.cookie-consent-banner__status,
.cookie-consent-dialog__error {
  color: #842029;
  font-weight: 650;
}

.cookie-consent-banner__status {
  margin-top: 0.65rem;
}

.cookie-consent-banner__actions {
  display: grid;
  gap: 0.6rem;
  width: 100%;
}

.cookie-consent-banner__choice,
.cookie-consent-banner__preferences,
.cookie-consent-dialog__actions .btn,
.cookie-settings-footer__actions .btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 3rem;
  padding-block: 0.65rem;
  font-weight: 750;
  line-height: 1.25;
  text-align: center;
  white-space: normal;
}

.cookie-consent-banner__preferences {
  gap: 0.5rem;
}

.cookie-consent-banner__preferences span {
  font-size: 1.35rem;
  line-height: 0;
}

.cookie-consent-dialog {
  z-index: 1090;
  width: min(62rem, calc(100% - 2rem));
  max-width: none;
  max-height: calc(100dvh - 2rem);
  margin: auto;
  padding: 0;
  overflow: hidden;
  color: #0f2d4a;
  background: #fff;
  border: 1px solid rgba(15, 45, 74, 0.18);
  border-radius: 1.25rem;
  box-shadow: 0 1.6rem 5rem rgba(8, 25, 42, 0.32);
}

.cookie-consent-dialog[open] {
  display: block;
}

.cookie-consent-dialog::backdrop {
  background: rgba(8, 25, 42, 0.66);
  backdrop-filter: blur(0.14rem);
}

.cookie-consent-dialog__layout {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  max-height: calc(100dvh - 2rem);
}

.cookie-consent-dialog__header {
  padding: 1.25rem 1.4rem;
  border-bottom: 1px solid rgba(15, 45, 74, 0.12);
}

.cookie-consent-dialog__title {
  margin-top: 0.2rem;
  font-size: clamp(1.35rem, 3vw, 1.75rem);
}

.cookie-consent-dialog__description {
  max-width: 45rem;
  margin-top: 0.45rem;
}

.cookie-consent-dialog__body {
  min-height: 10rem;
  padding: 1.1rem 1.4rem;
  overflow-y: auto;
  overscroll-behavior: contain;
}

.cookie-consent-dialog__loading {
  margin: 3rem auto;
  color: #5a7084;
  text-align: center;
}

.cookie-consent-dialog__error {
  padding: 0.85rem 1rem;
  margin: 0;
  background: #fff1f2;
  border: 1px solid #f1b9c0;
  border-radius: 0.75rem;
}

.cookie-consent-dialog__footer {
  display: grid;
  gap: 0.9rem;
  padding: 1rem 1.4rem calc(1rem + env(safe-area-inset-bottom));
  background: #fff;
  border-top: 1px solid rgba(15, 45, 74, 0.12);
  box-shadow: 0 -0.65rem 1.5rem rgba(15, 45, 74, 0.06);
}

.cookie-consent-dialog__meta,
.cookie-settings-footer__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 0.75rem;
  align-items: center;
  color: #5a7084;
  font-size: 0.82rem;
}

.cookie-consent-dialog__actions,
.cookie-settings-footer__actions {
  display: grid;
  gap: 0.6rem;
}

.cookie-consent-dialog__categories,
.cookie-settings-categories {
  display: grid;
  gap: 0.85rem;
}

.cookie-consent-category {
  padding: 1.05rem;
  background: #fff;
  border: 1px solid rgba(15, 45, 74, 0.14);
  border-radius: 0.95rem;
}

.cookie-consent-category__header {
  display: grid;
  gap: 1rem;
}

.cookie-consent-category__copy {
  min-width: 0;
}

.cookie-consent-category__title {
  margin: 0;
  font-size: 1.15rem;
  line-height: 1.3;
}

.cookie-consent-category__description {
  max-width: 43rem;
  margin: 0.3rem 0 0;
  color: #4f6478;
  line-height: 1.5;
}

.cookie-consent-category__control {
  display: flex;
  gap: 0.7rem;
  align-items: center;
  justify-content: space-between;
}

.cookie-consent-category__state,
.cookie-consent-category__count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #234c48;
  font-size: 0.76rem;
  font-weight: 800;
  line-height: 1.2;
  background: #e8f2f0;
  border-radius: 999px;
}

.cookie-consent-category__state {
  min-height: 1.65rem;
  padding: 0.25rem 0.6rem;
}

.cookie-consent-switch {
  position: relative;
  display: inline-flex;
  flex: 0 0 auto;
  width: 3.3rem;
  height: 1.9rem;
  cursor: pointer;
}

.cookie-consent-switch__input {
  position: absolute;
  inset: 0;
  z-index: 1;
  width: 100%;
  height: 100%;
  margin: 0;
  cursor: pointer;
  opacity: 0;
}

.cookie-consent-switch__visual {
  position: absolute;
  inset: 0;
  background: #687b8d;
  border: 2px solid #687b8d;
  border-radius: 999px;
  transition: background-color 120ms ease, border-color 120ms ease;
}

.cookie-consent-switch__visual::after {
  position: absolute;
  top: 0.15rem;
  left: 0.16rem;
  width: 1.35rem;
  height: 1.35rem;
  content: "";
  background: #fff;
  border-radius: 50%;
  box-shadow: 0 0.1rem 0.25rem rgba(8, 25, 42, 0.25);
  transition: transform 120ms ease;
}

.cookie-consent-switch__input:checked + .cookie-consent-switch__visual {
  background: #0f766e;
  border-color: #0f766e;
}

.cookie-consent-switch__input:checked + .cookie-consent-switch__visual::after {
  transform: translateX(1.38rem);
}

.cookie-consent-switch__input:focus-visible + .cookie-consent-switch__visual {
  outline: 0.2rem solid rgba(13, 110, 253, 0.35);
  outline-offset: 0.15rem;
}

.cookie-consent-category__details {
  padding-top: 0.85rem;
  margin-top: 0.9rem;
  border-top: 1px solid rgba(15, 45, 74, 0.1);
}

.cookie-consent-category__summary {
  display: inline-flex;
  gap: 0.5rem;
  align-items: center;
  color: #173e5f;
  font-weight: 700;
  cursor: pointer;
}

.cookie-consent-category__count {
  min-width: 1.55rem;
  min-height: 1.55rem;
  padding-inline: 0.4rem;
}

.cookie-consent-cookie-list {
  display: grid;
  gap: 0.65rem;
  padding: 0;
  margin: 0.85rem 0 0;
  list-style: none;
}

.cookie-consent-cookie {
  padding: 0.8rem;
  background: #f7f9f9;
  border: 1px solid rgba(15, 45, 74, 0.1);
  border-radius: 0.7rem;
}

.cookie-consent-cookie__name {
  color: #185f59;
  font-weight: 750;
}

.cookie-consent-cookie__description {
  margin: 0.35rem 0 0;
  color: #314b64;
  line-height: 1.45;
}

.cookie-consent-cookie__metadata {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 1rem;
  margin-top: 0.55rem;
  color: #687b8d;
  font-size: 0.78rem;
}

.cookie-settings-shell {
  max-width: 68rem;
  padding: clamp(1.25rem, 3vw, 2rem);
}

.cookie-settings-header {
  align-items: flex-start;
}

.cookie-settings-header .cookie-consent-banner__icon {
  margin-top: 0.15rem;
}

.cookie-settings-form {
  margin-top: 1.5rem;
}

.cookie-settings-footer {
  position: sticky;
  bottom: 1rem;
  z-index: 2;
  display: grid;
  gap: 0.85rem;
  padding: 1rem;
  margin-top: 1rem;
  background: rgba(255, 255, 255, 0.97);
  border: 1px solid rgba(15, 45, 74, 0.15);
  border-radius: 0.9rem;
  box-shadow: 0 0.75rem 2rem rgba(15, 45, 74, 0.12);
  backdrop-filter: blur(0.35rem);
}

@media (min-width: 768px) {
  .cookie-consent-banner__content {
    grid-template-columns: minmax(0, 1fr) minmax(18rem, 21rem);
    gap: 2rem;
    align-items: center;
    padding-top: 1.45rem;
    padding-bottom: calc(1.45rem + env(safe-area-inset-bottom));
  }

  .cookie-consent-category {
    padding: 1.25rem;
  }

  .cookie-consent-category__header {
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
  }

  .cookie-consent-category__control {
    min-width: 12rem;
    justify-content: flex-end;
  }

  .cookie-consent-dialog__actions,
  .cookie-settings-footer__actions {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .cookie-consent-banner {
    border-radius: 1rem 1rem 0 0;
  }

  .cookie-consent-banner__heading,
  .cookie-settings-header {
    align-items: flex-start;
  }

  .cookie-consent-dialog {
    width: 100%;
    height: 100dvh;
    max-height: 100dvh;
    border-width: 0;
    border-radius: 0;
  }

  .cookie-consent-dialog__layout {
    height: 100dvh;
    max-height: 100dvh;
  }

  .cookie-consent-dialog__header,
  .cookie-consent-dialog__body,
  .cookie-consent-dialog__footer {
    padding-right: max(1rem, env(safe-area-inset-right));
    padding-left: max(1rem, env(safe-area-inset-left));
  }

  .cookie-consent-dialog__header {
    padding-top: max(1rem, env(safe-area-inset-top));
  }

  .cookie-consent-category__control {
    justify-content: flex-start;
  }

  .cookie-settings-header .cookie-consent-banner__icon {
    width: 2.35rem;
    height: 2.35rem;
  }

  .cookie-settings-footer {
    position: static;
  }
}

@media (prefers-reduced-motion: reduce) {
  .cookie-consent-switch__visual,
  .cookie-consent-switch__visual::after {
    transition: none;
  }
}
