:root {
  --cookie-bg: rgba(15, 23, 42, 0.95);
  --cookie-border: rgba(255, 255, 255, 0.08);
  --cookie-text: #f8fafc;
  --cookie-accent: #2a73ff;
  --cookie-muted: rgba(248, 250, 252, 0.7);
}

:where(a, button, input, textarea, select, [role='button']):focus-visible {
  outline: 3px solid var(--cookie-accent);
  outline-offset: 2px;
}

[data-cookie-open] {
  background: transparent;
  border: none;
  color: inherit;
  cursor: pointer;
  padding: 0;
  font: inherit;
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 3px;
}

[data-cookie-open]:focus-visible {
  text-decoration: none;
}

.cookie-banner {
  position: fixed;
  inset-inline: 0;
  bottom: 1.5rem;
  z-index: 70;
  display: flex;
  justify-content: center;
  padding: 0 1rem;
  opacity: 0;
  pointer-events: none;
  transform: translateY(1rem);
  transition: opacity 0.3s ease, transform 0.3s ease;
}

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

.cookie-banner__inner {
  width: min(100%, 48rem);
  border-radius: 1.5rem;
  background: var(--cookie-bg);
  color: var(--cookie-text);
  padding: 1.5rem;
  box-shadow: 0 25px 40px rgba(15, 23, 42, 0.35);
  border: 1px solid var(--cookie-border);
}

.cookie-banner__text {
  font-size: 0.95rem;
  line-height: 1.5;
  color: var(--cookie-muted);
}

.cookie-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.25rem;
}

.cookie-button {
  border-radius: 999px;
  padding: 0.65rem 1.5rem;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  border: 1px solid transparent;
  transition: background 0.2s ease, color 0.2s ease, border 0.2s ease;
}

.cookie-button--primary {
  background: var(--cookie-accent);
  color: white;
}

.cookie-button--primary:hover {
  background: #155eef;
}

.cookie-button--secondary {
  background: transparent;
  color: var(--cookie-text);
  border-color: rgba(255, 255, 255, 0.4);
}

.cookie-button--secondary:hover {
  background: rgba(255, 255, 255, 0.08);
}

.cookie-link {
  color: var(--cookie-muted);
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 3px;
  font-size: 0.85rem;
}

.cookie-link:hover {
  color: white;
}

@media (max-width: 640px) {
  .cookie-banner__inner {
    border-radius: 1rem;
    padding: 1.25rem;
  }

  .cookie-actions {
    flex-direction: column;
  }

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

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }

  video[autoplay] {
    display: none;
  }
}
