:root {
  --consent-ink: #173e38;
  --consent-muted: #5f6f6c;
  --consent-green: #2fc8a7;
  --consent-green-dark: #137d6b;
  --consent-coral: #ff6955;
  --consent-line: #d8e5e2;
  --consent-surface: #ffffff;
  --consent-soft: #f3f8f6;
}

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

.cookie-consent-banner {
  position: fixed;
  z-index: 99990;
  right: clamp(14px, 2.6vw, 32px);
  bottom: clamp(14px, 2.6vw, 32px);
  width: min(520px, calc(100vw - 28px));
  box-sizing: border-box;
  padding: clamp(22px, 3vw, 30px);
  border: 1px solid rgba(23, 62, 56, .13);
  border-radius: 22px;
  background: rgba(255, 255, 255, .98);
  color: var(--consent-ink);
  box-shadow: 0 24px 70px rgba(15, 55, 48, .2);
  opacity: 0;
  transform: translateY(18px);
  transition: opacity .22s ease, transform .22s ease;
}

.cookie-consent-banner.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.cookie-consent-banner__eyebrow,
.cookie-consent-dialog__eyebrow {
  margin: 0 0 7px;
  color: var(--consent-green-dark);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .1em;
  text-transform: uppercase;
}

.cookie-consent-banner h2,
.cookie-consent-dialog h2 {
  margin: 0;
  color: var(--consent-ink);
  font-size: clamp(24px, 4vw, 32px);
  font-weight: 650;
  line-height: 1.14;
}

.cookie-consent-banner__copy,
.cookie-consent-dialog__intro {
  margin: 12px 0 0;
  color: var(--consent-muted);
  font-size: 15px;
  line-height: 1.58;
}

.cookie-consent-banner__copy a,
.cookie-consent-dialog a {
  color: var(--consent-green-dark);
  font-weight: 700;
  text-underline-offset: 3px;
}

.cookie-consent-banner__actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 20px;
}

html body .cookie-consent-button {
  display: inline-flex !important;
  width: 100% !important;
  min-height: 46px !important;
  box-sizing: border-box !important;
  align-items: center !important;
  justify-content: center !important;
  padding: 10px 18px !important;
  border: 2px solid var(--consent-green-dark) !important;
  border-radius: 999px !important;
  background: transparent !important;
  color: var(--consent-ink) !important;
  font: 800 12px/1.2 "Avenir Next", Avenir, "Helvetica Neue", Arial, sans-serif !important;
  letter-spacing: .035em !important;
  text-align: center !important;
  text-transform: uppercase !important;
  cursor: pointer;
  box-shadow: none !important;
  transform: none !important;
  transition: background-color .18s ease, border-color .18s ease, color .18s ease !important;
}

html body .cookie-consent-button--primary {
  border-color: var(--consent-coral) !important;
  background: var(--consent-coral) !important;
  color: #fff !important;
}

html body .cookie-consent-button:hover,
html body .cookie-consent-button:focus-visible {
  border-color: var(--consent-green) !important;
  background: var(--consent-green) !important;
  color: var(--consent-ink) !important;
}

html body .cookie-consent-button:focus-visible,
.cookie-consent-dialog__close:focus-visible,
.cookie-consent-switch input:focus-visible + span,
.site-footer__privacy-button:focus-visible {
  outline: 3px solid rgba(47, 200, 167, .38) !important;
  outline-offset: 3px !important;
}

.cookie-consent-manage {
  grid-column: 1 / -1;
  justify-self: center;
  padding: 7px 10px;
  border: 0;
  background: transparent;
  color: var(--consent-green-dark);
  font: 750 13px/1.3 "Avenir Next", Avenir, "Helvetica Neue", Arial, sans-serif;
  text-decoration: underline;
  text-underline-offset: 4px;
  cursor: pointer;
}

.cookie-consent-dialog {
  width: min(720px, calc(100vw - 28px));
  max-height: min(760px, calc(100dvh - 28px));
  box-sizing: border-box;
  padding: 0;
  overflow: hidden;
  border: 0;
  border-radius: 24px;
  background: var(--consent-surface);
  color: var(--consent-ink);
  box-shadow: 0 30px 90px rgba(8, 38, 33, .32);
}

.cookie-consent-dialog::backdrop {
  background: rgba(10, 31, 27, .54);
  backdrop-filter: blur(4px);
}

.cookie-consent-dialog__shell {
  display: flex;
  max-height: min(760px, calc(100dvh - 28px));
  flex-direction: column;
}

.cookie-consent-dialog__header {
  position: relative;
  padding: clamp(24px, 4vw, 38px) clamp(22px, 5vw, 42px) 21px;
  border-bottom: 1px solid var(--consent-line);
}

.cookie-consent-dialog__close {
  position: absolute;
  top: 18px;
  right: 18px;
  display: grid;
  width: 40px;
  height: 40px;
  padding: 0;
  place-items: center;
  border: 1px solid var(--consent-line);
  border-radius: 50%;
  background: #fff;
  color: var(--consent-ink);
  font-size: 25px;
  line-height: 1;
  cursor: pointer;
}

.cookie-consent-dialog__body {
  padding: 18px clamp(22px, 5vw, 42px) 8px;
  overflow-y: auto;
}

.cookie-consent-category {
  padding: 18px 0;
  border-bottom: 1px solid var(--consent-line);
}

.cookie-consent-category:last-child {
  border-bottom: 0;
}

.cookie-consent-category__top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
}

.cookie-consent-category h3 {
  margin: 0;
  color: var(--consent-ink);
  font-size: 18px;
  font-weight: 750;
}

.cookie-consent-category p {
  max-width: 535px;
  margin: 6px 0 0;
  color: var(--consent-muted);
  font-size: 14px;
  line-height: 1.5;
}

.cookie-consent-always-on {
  flex: 0 0 auto;
  padding: 5px 10px;
  border-radius: 999px;
  background: #e1f5ef;
  color: var(--consent-green-dark);
  font-size: 11px;
  font-weight: 850;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.cookie-consent-switch {
  position: relative;
  flex: 0 0 auto;
  cursor: pointer;
}

.cookie-consent-switch input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.cookie-consent-switch span {
  position: relative;
  display: block;
  width: 50px;
  height: 29px;
  border-radius: 999px;
  background: #cbd5d3;
  transition: background .18s ease;
}

.cookie-consent-switch span::after {
  position: absolute;
  top: 4px;
  left: 4px;
  width: 21px;
  height: 21px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 2px 6px rgba(19, 55, 49, .22);
  content: '';
  transition: transform .18s ease;
}

.cookie-consent-switch input:checked + span {
  background: var(--consent-green-dark);
}

.cookie-consent-switch input:checked + span::after {
  transform: translateX(21px);
}

.cookie-consent-details {
  margin-top: 10px;
  color: var(--consent-muted);
  font-size: 13px;
}

.cookie-consent-details summary {
  width: fit-content;
  color: var(--consent-green-dark);
  font-weight: 750;
  cursor: pointer;
}

.cookie-consent-details ul {
  margin: 10px 0 0;
  padding-left: 19px;
}

.cookie-consent-details li + li {
  margin-top: 5px;
}

.cookie-consent-dialog__footer {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  padding: 18px clamp(22px, 5vw, 42px) clamp(22px, 4vw, 32px);
  border-top: 1px solid var(--consent-line);
  background: var(--consent-soft);
}

.cookie-consent-dialog__footer .cookie-consent-button--save {
  grid-column: 1 / -1;
}

.cookie-consent-toast {
  position: fixed;
  z-index: 99999;
  right: 20px;
  bottom: 20px;
  padding: 12px 18px;
  border-radius: 999px;
  background: var(--consent-ink);
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  box-shadow: 0 12px 36px rgba(8, 38, 33, .25);
}

.site-footer__privacy-button {
  display: inline !important;
  min-height: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  color: inherit !important;
  font: inherit !important;
  letter-spacing: inherit !important;
  text-align: left !important;
  text-decoration: none;
  text-transform: none !important;
  cursor: pointer;
  box-shadow: none !important;
  transform: none !important;
}

.site-footer__privacy-button:hover {
  text-decoration: underline;
}

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

@media (max-width: 560px) {
  .cookie-consent-banner {
    right: 10px;
    bottom: 10px;
    width: calc(100vw - 20px);
    padding: 21px 18px;
    border-radius: 18px;
  }

  .cookie-consent-banner__actions,
  .cookie-consent-dialog__footer {
    grid-template-columns: 1fr;
  }

  .cookie-consent-dialog__footer .cookie-consent-button--save,
  .cookie-consent-manage {
    grid-column: auto;
  }

  .cookie-consent-dialog {
    width: 100%;
    max-width: none;
    max-height: 92dvh;
    margin: auto 0 0;
    border-radius: 22px 22px 0 0;
  }

  .cookie-consent-dialog__shell {
    max-height: 92dvh;
  }
}

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