.cookie-consent-backdrop {
  position: fixed;
  inset: 0;
  z-index: 1998;
  background: rgba(13, 1, 6, 0.36);
  opacity: 0;
  visibility: hidden;
  transition: opacity 220ms ease, visibility 220ms ease;
}

.cookie-consent {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 1999;
  width: min(540px, calc(100vw - 40px));
  border: 1px solid rgba(71, 71, 255, 0.35);
  border-radius: 4px;
  background: rgba(243, 239, 224, 0.98);
  box-shadow: 0 28px 66px rgba(13, 1, 6, 0.25);
  padding: 1rem;
  opacity: 0;
  visibility: hidden;
  transform: translateY(14px);
  transition:
    opacity 220ms ease,
    visibility 220ms ease,
    transform 220ms ease;
}

.cookie-consent.is-open,
.cookie-consent-backdrop.is-open {
  opacity: 1;
  visibility: visible;
}

.cookie-consent.is-open {
  transform: translateY(0);
}

.cookie-consent__title {
  margin: 0;
  font-family: "Futura PT Bold", Futura, "Trebuchet MS", Arial, sans-serif;
  font-size: 18px;
  line-height: 1.2;
  color: var(--color-primary);
}

.cookie-consent__copy {
  margin: 0.55rem 0 0;
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.35;
  color: var(--color-primary);
}

.cookie-consent__link {
  display: inline-block;
  margin-top: 0.45rem;
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.2;
  color: var(--color-primary);
}

.cookie-consent__settings {
  margin-top: 0.85rem;
  padding-top: 0.75rem;
  border-top: 1px solid rgba(71, 71, 255, 0.22);
}

.cookie-consent__hint {
  margin: 0 0 0.65rem;
  font-family: var(--font-body);
  font-size: 14px;
  line-height: 1.3;
  color: rgba(71, 71, 255, 0.85);
}

.cookie-consent__toggle {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 0.8rem;
}

.cookie-consent__toggle-label {
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.3;
  color: var(--color-primary);
}

.cookie-consent__toggle-input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.cookie-consent__toggle-ui {
  position: relative;
  width: 44px;
  height: 24px;
  border-radius: 999px;
  border: 1px solid rgba(71, 71, 255, 0.5);
  background: rgba(71, 71, 255, 0.15);
  transition: background 200ms ease;
}

.cookie-consent__toggle-ui::after {
  content: "";
  position: absolute;
  top: 2px;
  left: 2px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 2px 10px rgba(13, 1, 6, 0.2);
  transition: transform 200ms ease;
}

.cookie-consent__toggle-input:checked + .cookie-consent__toggle-ui {
  background: rgba(71, 71, 255, 0.7);
}

.cookie-consent__toggle-input:checked + .cookie-consent__toggle-ui::after {
  transform: translateX(20px);
}

.cookie-consent__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.9rem;
}

.cookie-consent__button {
  appearance: none;
  border-radius: 4px;
  border: 1px solid transparent;
  padding: 0.45rem 0.7rem;
  font-family: var(--font-body);
  font-size: 14px;
  line-height: 1.2;
  cursor: pointer;
}

.cookie-consent__button--primary {
  background: var(--color-primary);
  color: var(--color-paper);
}

.cookie-consent__button--ghost {
  background: rgba(71, 71, 255, 0.12);
  color: var(--color-primary);
  border-color: rgba(71, 71, 255, 0.28);
}

.cookie-consent__button--outline {
  background: transparent;
  color: var(--color-primary);
  border-color: rgba(71, 71, 255, 0.4);
}

@media (max-width: 767px) {
  .cookie-consent {
    right: 12px;
    bottom: 12px;
    width: calc(100vw - 24px);
    padding: 0.85rem;
  }

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

  .cookie-consent__button {
    width: 100%;
    text-align: center;
  }
}
