:root {
  --cookie-bg: rgba(4, 28, 53, 0.97);
  --cookie-text: var(--color-white, #fff);
  --cookie-text-soft: rgba(255, 255, 255, 0.82);
  --cookie-text-muted: rgba(255, 255, 255, 0.72);
  --cookie-border: rgba(255, 255, 255, 0.14);
  --cookie-border-soft: rgba(255, 255, 255, 0.1);
  --cookie-border-strong: rgba(255, 255, 255, 0.35);
  --cookie-control-bg: rgba(255, 255, 255, 0.12);
  --cookie-switch-bg: rgba(255, 255, 255, 0.22);
  --cookie-shadow: 0 20px 60px rgba(0, 0, 0, 0.35);
  --cookie-success: #1fbf75;
}

.cookie-consent {
  position: fixed;
  left: 24px;
  right: 24px;
  bottom: 24px;
  z-index: 99999;
  max-width: 1180px;
  margin: 0 auto;
  background: var(--cookie-bg);
  color: var(--cookie-text);
  border: 1px solid var(--cookie-border);
  border-radius: 18px;
  box-shadow: var(--cookie-shadow);
  padding: 22px;
  font-family: inherit;
  display: none;
}

.cookie-consent.is-visible {
  display: block;
}

.cookie-consent__header {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: flex-start;
}

.cookie-consent__close {
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border: 1px solid var(--cookie-border);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.92);
  color: var(--color-primary, #003b71);
  font-family: inherit;
  font-size: 18px;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
  transition: transform 180ms ease, opacity 180ms ease, background-color 180ms ease;
}

.cookie-consent__close:hover,
.cookie-consent__close:focus-visible {
  transform: translateY(-1px);
  opacity: 0.92;
  background: var(--cookie-text);
}

.cookie-consent__title {
  margin: 0 0 8px;
  font-size: 20px;
  font-weight: 700;
  line-height: 1.2;
}

.cookie-consent__text {
  margin: 0;
  max-width: 780px;
  color: var(--cookie-text-soft);
  font-size: 14px;
  line-height: 1.5;
}

.cookie-consent__link {
  color: var(--cookie-text);
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.cookie-consent__actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
  margin-top: 18px;
}

.cookie-btn {
  border: 0;
  border-radius: 8px;
  padding: 11px 18px;
  font: inherit;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0;
  cursor: pointer;
  transition: transform 180ms ease, opacity 180ms ease, background-color 180ms ease;
}

.cookie-btn:hover,
.cookie-btn:focus-visible {
  transform: translateY(-1px);
  opacity: 0.92;
}

.cookie-btn--primary {
  background: var(--cookie-text);
  color: var(--color-primary, #003b71);
}

.cookie-btn--secondary {
  background: var(--cookie-control-bg);
  color: var(--cookie-text);
}

.cookie-consent__panel {
  display: block;
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px solid var(--cookie-border-soft);
}

.cookie-consent__panel.is-open {
  display: block;
}

.cookie-category {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 18px;
  align-items: center;
  padding: 14px 0;
  border-bottom: 1px solid var(--cookie-border-soft);
}

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

.cookie-category__name {
  margin: 0 0 4px;
  font-size: 15px;
  font-weight: 700;
}

.cookie-category__description {
  margin: 0;
  color: var(--cookie-text-muted);
  font-size: 13px;
  line-height: 1.45;
}

.cookie-switch {
  position: relative;
  display: inline-flex;
  width: 48px;
  height: 26px;
}

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

.cookie-switch__track {
  position: absolute;
  inset: 0;
  border-radius: 999px;
  background: var(--cookie-switch-bg);
  transition: background-color 180ms ease;
}

.cookie-switch__track::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--cookie-text);
  transition: transform 180ms ease;
}

.cookie-switch input:checked + .cookie-switch__track {
  background: var(--cookie-success);
}

.cookie-switch input:checked + .cookie-switch__track::after {
  transform: translateX(22px);
}

.cookie-switch input:disabled + .cookie-switch__track {
  opacity: 0.65;
}

.cookie-settings-link,
[data-cookie-open] {
  display: none !important;
}

.site-footer__cookies-link {
  color: inherit;
  text-decoration: none;
}

.site-footer__cookies-link:hover,
.site-footer__cookies-link:focus {
  color: var(--color-primary, #003b71);
  text-decoration: underline;
}

@media (max-width: 768px) {
  .cookie-consent {
    left: 12px;
    right: 12px;
    bottom: 12px;
    border-radius: 14px;
    padding: 18px;
  }

  .cookie-consent__header {
    display: flex;
  }

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

  .cookie-btn {
    flex: 1 1 100%;
  }

  .cookie-category {
    grid-template-columns: 1fr;
    gap: 10px;
  }
}
