:root {
  --cookie-consent-ink: #0f172a;
  --cookie-consent-muted: #526174;
  --cookie-consent-blue: #2563eb;
  --cookie-consent-surface: rgba(248, 251, 255, 0.96);
}

.cookie-consent {
  position: fixed;
  right: 1rem;
  bottom: max(1rem, env(safe-area-inset-bottom));
  left: 1rem;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  max-width: 72rem;
  margin-inline: auto;
  padding: 1rem;
  border: 1px solid rgba(255, 255, 255, 0.88);
  border-radius: 1rem;
  background: var(--cookie-consent-surface);
  color: var(--cookie-consent-ink);
  box-shadow: 0 8px 28px rgba(15, 23, 42, 0.18);
  -webkit-backdrop-filter: blur(18px) saturate(150%);
  backdrop-filter: blur(18px) saturate(150%);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  opacity: 0;
  transform: translateY(1rem);
  transition: opacity 220ms ease, transform 220ms cubic-bezier(0.16, 1, 0.3, 1);
}

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

.cookie-consent__copy {
  min-width: 0;
  max-width: 46rem;
}

.cookie-consent__title {
  margin: 0;
  color: var(--cookie-consent-ink);
  font-size: 1rem;
  font-weight: 650;
  line-height: 1.35;
}

.cookie-consent__text {
  margin: 0.35rem 0 0;
  color: var(--cookie-consent-muted);
  font-size: 0.875rem;
  line-height: 1.5;
}

.cookie-consent__link {
  color: #1d4ed8;
  font-weight: 600;
  text-underline-offset: 0.18em;
}

.cookie-consent__actions {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 0.6rem;
}

.cookie-consent__button {
  min-height: 2.75rem;
  border-radius: 999px;
  padding: 0.7rem 1rem;
  font: 650 0.875rem/1 -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  white-space: nowrap;
  cursor: pointer;
  transition: transform 160ms ease, background-color 160ms ease, border-color 160ms ease;
}

.cookie-consent__button:active {
  transform: scale(0.98);
}

.cookie-consent__button:focus-visible,
.cookie-consent__link:focus-visible {
  outline: 3px solid rgba(37, 99, 235, 0.35);
  outline-offset: 3px;
}

.cookie-consent__button--necessary {
  border: 1px solid #cbd5e1;
  background: #ffffff;
  color: #1e293b;
}

.cookie-consent__button--necessary:hover {
  border-color: #94a3b8;
  background: #f8fafc;
}

.cookie-consent__button--accept {
  border: 1px solid #1d4ed8;
  background: var(--cookie-consent-blue);
  color: #ffffff;
}

.cookie-consent__button--accept:hover {
  background: #1d4ed8;
}

@media (max-width: 767px) {
  .cookie-consent {
    right: 0.75rem;
    bottom: max(0.75rem, env(safe-area-inset-bottom));
    left: 0.75rem;
    display: block;
    padding: 1rem;
  }

  .cookie-consent__actions {
    display: grid;
    grid-template-columns: 1fr;
    margin-top: 0.9rem;
  }

  .cookie-consent__button {
    width: 100%;
  }
}

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


/* Local placeholder occupies the video's reserved area before permission. */
.consent-video { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; padding: 16px; background: #f5f3e9; color: #222; text-align: center; font: 14px/1.5 system-ui,sans-serif; overflow: auto; }
.consent-video p { max-width: 36em; margin: 0; }
.consent-video button { cursor: pointer; border: 1px solid currentColor; border-radius: 8px; padding: 8px 12px; background: transparent; color: inherit; font: inherit; }
.consent-video[hidden], iframe[data-consent-src][hidden] { display: none !important; }
