.analytics-consent {
  position: fixed;
  z-index: 2147483000;
  right: clamp(16px, 3vw, 42px);
  bottom: calc(clamp(16px, 3vw, 34px) + env(safe-area-inset-bottom));
  display: grid;
  width: min(660px, calc(100vw - 32px));
  grid-template-columns: 72px minmax(0, 1fr);
  overflow: hidden;
  border-top: 4px solid var(--topfloor-base, #ee202a);
  background: var(--topfloor-black, #151422);
  box-shadow: 0 26px 70px rgba(10, 10, 18, .28);
  color: #fff;
  opacity: 0;
  transform: translateY(22px);
  transition: opacity .18s ease, transform .18s ease;
}

.analytics-consent[hidden] {
  display: none;
}

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

.analytics-consent__rail {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-direction: column;
  padding: 28px 0;
  border-right: 1px solid rgba(255, 255, 255, .16);
  color: rgba(255, 255, 255, .5);
  font-family: var(--topfloor-font-two, "Jost", sans-serif);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1.8px;
  text-transform: uppercase;
}

.analytics-consent__rail span:first-child {
  writing-mode: vertical-rl;
  transform: rotate(180deg);
}

.analytics-consent__content {
  position: relative;
  padding: clamp(24px, 4vw, 38px);
}

.analytics-consent__eyebrow {
  margin: 0 0 10px;
  color: #ff6269;
  font-family: var(--topfloor-font-two, "Jost", sans-serif);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1.7px;
  text-transform: uppercase;
}

.analytics-consent h2 {
  max-width: 510px;
  margin: 0;
  color: #fff;
  font-family: var(--topfloor-font-two, "Jost", sans-serif);
  font-size: clamp(24px, 3vw, 34px);
  font-weight: 600;
  letter-spacing: -.5px;
  line-height: 1.08;
}

.analytics-consent__content > div > p:not(.analytics-consent__eyebrow) {
  max-width: 520px;
  margin: 16px 0 0;
  color: rgba(255, 255, 255, .7);
  font-size: 13px;
  line-height: 1.7;
}

.analytics-consent__actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px 18px;
  margin-top: 26px;
}

.analytics-consent__button,
.analytics-consent__text-button,
.public-footer__privacy-button {
  appearance: none;
  border: 0;
  font-family: inherit;
  cursor: pointer;
}

.analytics-consent__button {
  min-height: 46px;
  padding: 10px 18px;
  border: 1px solid rgba(255, 255, 255, .34);
  background: transparent;
  color: #fff;
  font-size: 12px;
  font-weight: 700;
}

.analytics-consent__button--primary {
  border-color: var(--topfloor-base, #ee202a);
  background: var(--topfloor-base, #ee202a);
}

.analytics-consent__button:hover,
.analytics-consent__button:focus-visible {
  border-color: #fff;
  background: #fff;
  color: var(--topfloor-black, #151422);
}

.analytics-consent__text-button {
  min-height: 44px;
  padding: 8px 0;
  border-bottom: 1px solid rgba(255, 255, 255, .48);
  background: transparent;
  color: rgba(255, 255, 255, .82);
  font-size: 12px;
  font-weight: 700;
}

.analytics-consent__text-button:hover,
.analytics-consent__text-button:focus-visible {
  border-color: #ff6269;
  color: #ff6269;
}

.analytics-consent__button:focus-visible,
.analytics-consent__text-button:focus-visible,
.analytics-consent__switch input:focus-visible + span,
.public-footer__privacy-button:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 3px;
}

.analytics-consent__policy {
  display: inline-block;
  margin-top: 20px;
  color: rgba(255, 255, 255, .52);
  font-size: 11px;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.analytics-consent__policy:hover,
.analytics-consent__policy:focus-visible {
  color: #fff;
}

.analytics-consent__options {
  margin-top: 22px;
  border-top: 1px solid rgba(255, 255, 255, .18);
}

.analytics-consent__option {
  display: flex;
  min-height: 76px;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
  padding: 14px 0;
  border-bottom: 1px solid rgba(255, 255, 255, .18);
  cursor: pointer;
}

.analytics-consent__option h3,
.analytics-consent__option strong {
  display: block;
  margin: 0 0 3px;
  color: #fff;
  font-family: var(--topfloor-font-two, "Jost", sans-serif);
  font-size: 14px;
  font-weight: 600;
}

.analytics-consent__option p,
.analytics-consent__option small {
  display: block;
  margin: 0;
  color: rgba(255, 255, 255, .62);
  font-size: 11px;
  line-height: 1.5;
}

.analytics-consent__status {
  flex: 0 0 auto;
  color: rgba(255, 255, 255, .5);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
}

.analytics-consent__switch {
  position: relative;
  flex: 0 0 auto;
  width: 48px;
  height: 28px;
}

.analytics-consent__switch input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.analytics-consent__switch span {
  position: absolute;
  inset: 0;
  border: 1px solid rgba(255, 255, 255, .46);
  background: rgba(255, 255, 255, .08);
  transition: background-color .18s ease, border-color .18s ease;
}

.analytics-consent__switch span::after {
  position: absolute;
  top: 5px;
  left: 5px;
  width: 16px;
  height: 16px;
  background: #fff;
  content: "";
  transition: transform .18s ease;
}

.analytics-consent__switch input:checked + span {
  border-color: var(--topfloor-base, #ee202a);
  background: var(--topfloor-base, #ee202a);
}

.analytics-consent__switch input:checked + span::after {
  transform: translateX(20px);
}

.public-footer__privacy-button {
  min-height: 36px;
  padding: 0;
  background: transparent;
  color: rgba(var(--topfloor-white-rgb), .72);
  font-size: 12px;
}

.public-footer__privacy-button:hover,
.public-footer__privacy-button:focus-visible {
  color: var(--public-shell-red, #ee202a);
}

@media (max-width: 575px) {
  .analytics-consent {
    right: 12px;
    bottom: calc(12px + env(safe-area-inset-bottom));
    width: calc(100vw - 24px);
    max-height: calc(100dvh - 24px - env(safe-area-inset-bottom));
    grid-template-columns: 42px minmax(0, 1fr);
    overflow-y: auto;
    overscroll-behavior: contain;
  }

  .analytics-consent__rail {
    padding: 22px 0;
  }

  .analytics-consent__content {
    padding: 22px 20px;
  }

  .analytics-consent__actions {
    align-items: stretch;
    flex-direction: column;
  }

  .analytics-consent__button,
  .analytics-consent__text-button {
    width: 100%;
  }

  .analytics-consent__text-button {
    border: 1px solid rgba(255, 255, 255, .2);
  }
}

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