.cookie-banner {
  --cookie-purple: var(--site-purple, #5d56c8);
  --cookie-purple-strong: var(--site-purple-strong, #4740b7);
  --cookie-ink: var(--site-ink, #1e1e1e);
  --cookie-text: var(--site-text, #3c434a);
  --cookie-muted: var(--site-muted, #646970);
  --cookie-border: var(--site-border, #dcdcde);
  --cookie-border-strong: var(--site-border-strong, #c3c4c7);
  --cookie-canvas: var(--site-canvas, #ffffff);
  --cookie-soft: var(--site-soft, #f6f7f7);
  --cookie-surface: var(--site-surface, #ffffff);

  position: fixed;
  left: 50%;
  bottom: 1rem;
  width: min(calc(100% - 2rem), 58rem);
  transform: translateX(-50%);
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 1.25rem;
  align-items: center;
  padding: 1rem 1.1rem;
  border: 1px solid var(--cookie-border-strong);
  border-radius: 3px;
  background: var(--cookie-surface);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.14);
  color: var(--cookie-ink);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  line-height: 1.4;
  z-index: 2147483000;
}

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

.cookie-copy {
  min-width: 0;
}

.cookie-kicker,
.cookie-meta span {
  display: none;
}

.cookie-title {
  margin: 0;
  color: var(--cookie-ink);
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 650;
  line-height: 1.3;
  letter-spacing: -0.015em;
}

.cookie-description {
  max-width: 42rem;
  margin: 0.3rem 0 0;
  color: var(--cookie-muted);
  font-size: 0.78rem;
  line-height: 1.5;
}

.cookie-meta {
  margin-top: 0.3rem;
  font-size: 0.72rem;
  line-height: 1.3;
}

.cookie-privacy-link {
  color: var(--cookie-purple);
  font-weight: 600;
  text-underline-offset: 0.16em;
}

.cookie-privacy-link:hover {
  color: var(--cookie-purple-strong);
}

.cookie-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(7.5rem, 1fr));
  gap: 0.5rem;
}

.btn-consent {
  min-height: 2.45rem;
  width: 100%;
  padding: 0.65rem 0.9rem;
  border: 1px solid transparent;
  border-radius: 2px;
  font-family: inherit;
  font-size: 0.8rem;
  font-weight: 600;
  line-height: 1.15;
  cursor: pointer;
  box-shadow: none;
  transform: none;
  transition: border-color 0.16s ease, background-color 0.16s ease, color 0.16s ease;
}

.btn-consent-primary {
  border-color: #5d56c8;
  background: #5d56c8;
  color: #ffffff;
}

.btn-consent-primary:hover {
  border-color: #4740b7;
  background: #4740b7;
  color: #ffffff;
}

.btn-consent-secondary {
  border-color: var(--cookie-border-strong);
  background: var(--cookie-canvas);
  color: var(--cookie-text);
}

.btn-consent-secondary:hover {
  border-color: #8c8f94;
  background: var(--cookie-soft);
  color: var(--cookie-purple);
}

.btn-consent:focus-visible,
.cookie-privacy-link:focus-visible,
.privacy-choices-link:focus-visible {
  outline: 2px solid var(--cookie-purple);
  outline-offset: 2px;
}

.privacy-choices-link {
  cursor: pointer;
}

.privacy-choices-separator {
  opacity: 0.55;
}

.privacy-choices-footer {
  width: min(calc(100% - 2rem), 88rem);
  margin: 0 auto;
  padding: 0.9rem 1rem 1.25rem;
  color: var(--site-muted, #646970);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-size: 0.78rem;
  line-height: 1.4;
  text-align: center;
}

.privacy-choices-footer .privacy-choices-link {
  color: inherit;
  opacity: 0.78;
  text-underline-offset: 0.18em;
}

.privacy-choices-footer .privacy-choices-link:hover {
  color: var(--site-purple, #5d56c8);
  opacity: 1;
}

html[data-theme="dark"] .cookie-banner {
  --cookie-purple: #a9a1ff;
  --cookie-purple-strong: #c1bcff;
  --cookie-ink: #f0f0f1;
  --cookie-text: #dcdcde;
  --cookie-muted: #a7aaad;
  --cookie-border: #3c434a;
  --cookie-border-strong: #50575e;
  --cookie-canvas: #101214;
  --cookie-soft: #181a1d;
  --cookie-surface: #1d2327;

  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.32);
}

html[data-theme="dark"] .btn-consent-primary {
  border-color: #5d56c8;
  background: #5d56c8;
  color: #ffffff;
}

html[data-theme="dark"] .btn-consent-primary:hover {
  border-color: #6b64d8;
  background: #6b64d8;
}

body.home-page {
  overflow-x: hidden;
  overflow-y: auto;
}

body.home-page .cookie-banner {
  --cookie-purple: #a9a1ff;
  --cookie-purple-strong: #c1bcff;
  --cookie-ink: #f0f0f1;
  --cookie-text: #dcdcde;
  --cookie-muted: #a7aaad;
  --cookie-border: #3c434a;
  --cookie-border-strong: #50575e;
  --cookie-canvas: #101214;
  --cookie-soft: #181a1d;
  --cookie-surface: #1d2327;

  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.34);
}

body.home-page .btn-consent-primary {
  border-color: #5d56c8;
  background: #5d56c8;
  color: #ffffff;
}

body.home-page .btn-consent-primary:hover {
  border-color: #6b64d8;
  background: #6b64d8;
}

body.home-page .privacy-choices-footer {
  position: relative;
  z-index: 2;
  color: #8f9398;
}

@media (max-width: 760px) {
  .cookie-banner {
    grid-template-columns: 1fr;
    gap: 0.8rem;
    padding: 0.9rem;
  }

  .cookie-actions {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 420px) {
  .cookie-banner {
    bottom: 0.5rem;
    width: calc(100% - 1rem);
    max-height: calc(100vh - 1rem);
    max-height: calc(100dvh - 1rem);
    overflow-y: auto;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
    border-radius: 3px;
  }

  .btn-consent {
    padding-inline: 0.6rem;
    font-size: 0.76rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .btn-consent {
    transition: none;
  }
}
