/* Cookie banner — uses --theme-* from themes/hugo-classic/static/css/style.css */

.cookie-consent {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 9999;
  padding: 0.65rem 1rem;
  padding-bottom: max(0.65rem, env(safe-area-inset-bottom));
  padding-left: max(1rem, env(safe-area-inset-left));
  padding-right: max(1rem, env(safe-area-inset-right));
  font-size: 0.88em;
  line-height: 1.45;
  box-sizing: border-box;
  border-top-width: 1px;
  border-top-style: dotted;
  background: var(--theme-nav-pill-bg);
  color: var(--theme-nav-pill-fg);
  border-top-color: var(--theme-accent);
  -webkit-print-color-adjust: exact;
  print-color-adjust: exact;
}

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

.cookie-consent__inner {
  max-width: 800px;
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem 1rem;
}

.cookie-consent__text {
  margin: 0;
  flex: 1 1 280px;
  text-align: left;
}

.cookie-consent__actions {
  display: flex;
  flex-shrink: 0;
  gap: 0.5rem;
}

.cookie-consent__btn {
  cursor: pointer;
  font: inherit;
  font-size: 0.95em;
  padding: 0.35em 0.85em;
  border-radius: 5px;
  border-width: 1px;
  border-style: dotted;
  background: transparent;
  color: var(--theme-nav-pill-fg);
  border-color: var(--theme-accent);
}

@media (prefers-reduced-motion: no-preference) {
  .cookie-consent {
    transition: opacity 0.2s ease, transform 0.2s ease;
  }
}

.cookie-consent__btn--accept {
  background: color-mix(in srgb, var(--theme-accent) 14%, var(--theme-nav-pill-bg));
}

.cookie-consent__btn:hover,
.cookie-consent__btn:focus-visible {
  background: color-mix(in srgb, var(--theme-accent) 24%, var(--theme-nav-pill-bg));
  outline: none;
}
