/*
  Firestarter cookie consent banner (cookie-consent.js).
  Bottom-left floating card on desktop, full-width bottom strip on mobile. The card is the nav panel's
  surface and the buttons are the site's own: black to accept, outlined to decline. The tokens come
  from shared.css; the fallbacks keep the banner readable on a page without it.
*/

.fs-consent {
  position: fixed;
  z-index: 9999;
  font-family: 'Asta Sans', system-ui, -apple-system, sans-serif;
  color: var(--text, #1a0c00);
  background: var(--paper, #fff);
}

@media (min-width: 769px) {
  .fs-consent {
    left: 16px;
    bottom: 16px;
    width: 360px;
    max-width: calc(100vw - 32px);
    border: 1px solid var(--rule-strong, rgba(26, 12, 0, .22));
    border-radius: var(--r-md, 16px);
    box-shadow: var(--app-shadow, 0 1px 2px rgba(0, 0, 0, .05));
    padding: 16px 16px 14px;
  }
}

@media (max-width: 768px) {
  .fs-consent {
    left: 0;
    right: 0;
    bottom: 0;
    padding: 12px var(--inset, 20px) calc(12px + env(safe-area-inset-bottom, 0px));
    border-top: 1px solid var(--rule-strong, rgba(26, 12, 0, .22));
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
  }
}

.fs-consent__body {
  font-size: 14px;
  line-height: 20px;
  color: var(--text-2, #5a4f44);
  margin: 0 0 12px;
  flex: 1 1 auto;
}

@media (max-width: 768px) {
  .fs-consent__body {
    margin: 0;
    font-size: 13px;
    min-width: 180px;
  }
}

.fs-consent__body a {
  color: var(--text, #1a0c00);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.fs-consent__actions {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
  align-items: center;
}

@media (max-width: 768px) {
  .fs-consent__actions {
    flex: 0 0 auto;
  }
}

.fs-consent__btn {
  appearance: none;
  cursor: pointer;
  font-family: inherit;
  font-size: 14px;
  font-weight: 500;
  line-height: 1;
  height: 40px;
  padding: 0 16px;
  border-radius: var(--r-md, 16px);
  border: 1px solid transparent;
  transition: background-color .15s ease, border-color .15s ease;
}

.fs-consent__btn--ghost {
  background: transparent;
  color: var(--text, #1a0c00);
  border-color: var(--btn-secondary-line, rgba(26, 12, 0, .22));
}

.fs-consent__btn--ghost:hover {
  border-color: var(--btn-secondary-line-hover, rgba(26, 12, 0, .44));
}

.fs-consent__btn--primary {
  background: var(--btn-primary-bg, #1a0c00);
  color: var(--btn-primary-fg, #fff);
}

.fs-consent__btn--primary:hover {
  background: var(--btn-primary-bg-hover, #403226);
}

.fs-consent__btn:focus-visible {
  outline: 2px solid var(--focus, #ec5e2d);
  outline-offset: 3px;
}

/* Entrance animation */
.fs-consent {
  opacity: 0;
  transform: translateY(8px);
  transition: opacity .2s ease, transform .2s ease;
}

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

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

/* The "reopen cookie settings" link in the privacy policy's cookie section */
.fs-consent-settings-link {
  background: none;
  border: 0;
  padding: 0;
  font: inherit;
  color: inherit;
  text-decoration: underline;
  text-underline-offset: 2px;
  cursor: pointer;
}

.fs-consent-settings-link:hover {
  color: var(--text, #1a0c00);
}
