/* Cookie consent widget */
.site-footer__cookie-slot {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  margin-top: 0.75rem;
  min-height: 2rem;
}

.cookie-consent-root {
  position: relative;
  width: 100%;
}

.cookie-consent-root--done {
  width: auto;
  margin-left: auto;
}

.cookie-consent-bar {
  position: fixed;
  z-index: 9000;
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.65rem 1rem;
  padding: 0.65rem 1rem;
  background: color-mix(in srgb, var(--color-surface, #fff) 94%, transparent);
  border-top: 1px solid color-mix(in srgb, var(--color-text, #111) 12%, transparent);
  box-shadow: 0 -4px 24px rgb(0 0 0 / 0.08);
  backdrop-filter: blur(8px);
  font-size: 0.8125rem;
  line-height: 1.45;
}

.cookie-consent-bar__text {
  flex: 1 1 14rem;
  margin: 0;
  max-width: 52rem;
  color: var(--color-text-muted, #555);
}

.cookie-consent-bar__links {
  flex: 1 1 100%;
  margin: -0.25rem 0 0;
  font-size: 0.75rem;
}

.cookie-consent-bar__links a {
  color: var(--color-accent, #2563eb);
  text-decoration: none;
}

.cookie-consent-bar__links a:hover {
  text-decoration: underline;
}

.cookie-consent-bar__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-left: auto;
}

.cookie-consent-btn {
  appearance: none;
  border: 1px solid color-mix(in srgb, var(--color-text, #111) 18%, transparent);
  background: transparent;
  color: var(--color-text, #111);
  border-radius: 999px;
  padding: 0.35rem 0.85rem;
  font: inherit;
  font-size: 0.75rem;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}

.cookie-consent-btn:hover {
  border-color: color-mix(in srgb, var(--color-text, #111) 35%, transparent);
  background: color-mix(in srgb, var(--color-text, #111) 5%, transparent);
}

.cookie-consent-btn--primary {
  background: var(--color-accent, #2563eb);
  border-color: var(--color-accent, #2563eb);
  color: #fff;
}

.cookie-consent-btn--primary:hover {
  filter: brightness(1.05);
  background: var(--color-accent, #2563eb);
}

.cookie-consent-btn--ghost {
  border-color: transparent;
  background: transparent;
}

.cookie-consent-panel {
  flex: 1 1 100%;
  padding-top: 0.35rem;
  border-top: 1px solid color-mix(in srgb, var(--color-text, #111) 10%, transparent);
}

.cookie-consent-panel.hidden,
.cookie-consent-pop.hidden {
  display: none;
}

.cookie-consent-panel__cats {
  display: grid;
  gap: 0.5rem;
  margin-bottom: 0.65rem;
}

.cookie-consent-cat {
  display: flex;
  gap: 0.55rem;
  align-items: flex-start;
  cursor: pointer;
}

.cookie-consent-cat input {
  margin-top: 0.15rem;
  accent-color: var(--color-accent, #2563eb);
}

.cookie-consent-cat strong {
  display: block;
  font-size: 0.8125rem;
}

.cookie-consent-cat small {
  display: block;
  margin-top: 0.1rem;
  color: var(--color-text-muted, #666);
  font-size: 0.72rem;
  line-height: 1.35;
}

.cookie-consent-panel__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.cookie-consent-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  padding: 0;
  border: 1px solid color-mix(in srgb, var(--color-text, #111) 14%, transparent);
  border-radius: 999px;
  background: color-mix(in srgb, var(--color-surface, #fff) 90%, transparent);
  color: var(--color-text-muted, #666);
  cursor: pointer;
  transition: color 0.15s, border-color 0.15s, transform 0.15s;
}

.cookie-consent-chip:hover {
  color: var(--color-accent, #2563eb);
  border-color: color-mix(in srgb, var(--color-accent, #2563eb) 45%, transparent);
  transform: translateY(-1px);
}

.cookie-consent-pop {
  position: absolute;
  right: 0;
  bottom: calc(100% + 0.5rem);
  width: min(20rem, calc(100vw - 2rem));
  padding: 0.85rem;
  border-radius: 0.75rem;
  border: 1px solid color-mix(in srgb, var(--color-text, #111) 12%, transparent);
  background: var(--color-surface, #fff);
  box-shadow: 0 8px 32px rgb(0 0 0 / 0.12);
  z-index: 9100;
}

.cookie-consent-pop__title {
  margin: 0 0 0.55rem;
  font-size: 0.875rem;
  font-weight: 600;
}

html.cookie-consent-done body {
  padding-bottom: 0;
}

@media (max-width: 640px) {
  .cookie-consent-bar {
    padding-bottom: max(0.65rem, env(safe-area-inset-bottom));
  }

  .cookie-consent-bar__actions {
    width: 100%;
    margin-left: 0;
  }

  .cookie-consent-btn {
    flex: 1 1 auto;
  }
}
