/* Cookie consent banner — DESIGN.md tokens.
 *
 * Self-contained custom properties rather than the page-level ones: this banner
 * renders on index.html, blog.html and the server-rendered SEO pages, and those
 * define different variable sets (--ink vs --blog-ink). Scoping its own keeps it
 * identical everywhere.
 *
 * Accept and Decline are deliberately the SAME size, weight and shape, differing
 * only in fill. Under GDPR/ePrivacy refusing must be as easy as accepting, so the
 * usual instinct — the orange CTA treatment on Accept — is exactly the dark
 * pattern to avoid here.
 */

.apricot-consent {
  --consent-paper: #FFFDF9;
  --consent-line: #DED8CC;
  --consent-ink: #1A1A1A;
  --consent-muted: #4B463F;
  --consent-teal: #1F4E5B;
  --consent-sans: "Space Grotesk", "Golos Text", -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;

  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 2147483000;
  padding: 16px clamp(16px, 4vw, 32px);
  background: var(--consent-paper);
  border-top: 1px solid var(--consent-line);
  box-shadow: 0 -8px 32px rgba(26, 26, 26, 0.10);
  font-family: var(--consent-sans);
  color: var(--consent-ink);
  transform: translateY(100%);
  transition: transform 220ms ease-out;
}

.apricot-consent.is-visible {
  transform: translateY(0);
}

.apricot-consent-inner {
  width: min(1200px, 100%);
  margin-inline: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
}

.apricot-consent-text {
  flex: 1 1 420px;
  margin: 0;
  font-size: 14px;
  line-height: 1.55;
  color: var(--consent-muted);
}

.apricot-consent-text a {
  color: var(--consent-teal);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.apricot-consent-actions {
  display: flex;
  gap: 8px;
  flex-shrink: 0;
}

.apricot-consent-btn {
  font-family: inherit;
  font-size: 14px;
  font-weight: 500;
  line-height: 1;
  padding: 12px 24px;
  min-width: 128px;
  border-radius: 6px;
  border: 1px solid var(--consent-teal);
  cursor: pointer;
  transition: background-color 150ms ease-out, color 150ms ease-out;
}

.apricot-consent-decline {
  background: transparent;
  color: var(--consent-teal);
}

.apricot-consent-accept {
  background: var(--consent-teal);
  color: var(--consent-paper);
}

.apricot-consent-decline:hover { background: rgba(31, 78, 91, 0.08); }
.apricot-consent-accept:hover { background: #173d47; }

.apricot-consent-btn:focus-visible {
  outline: 2px solid #F25C05;
  outline-offset: 2px;
}

@media (max-width: 640px) {
  .apricot-consent-inner {
    flex-direction: column;
    align-items: stretch;
    gap: 16px;
  }
  .apricot-consent-actions { width: 100%; }
  .apricot-consent-btn { flex: 1; min-width: 0; }
}

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

/* Footer entry point. A <button> because it performs an action rather than
 * navigating, reset to inherit each template's own footer link styling. */
.apricot-cookie-settings {
  appearance: none;
  background: none;
  border: 0;
  padding: 0;
  margin: 0;
  font: inherit;
  color: inherit;
  letter-spacing: inherit;
  text-transform: inherit;
  cursor: pointer;
}
