/*
 * public/css/consent.css: the cookie banner (views/partials/cookie-banner.ejs)
 * and the footer's Cookie Settings button.
 *
 * Kept out of style.css so a stale edge copy of that file can never leave the
 * banner unstyled; see the comment where the layout links this file. Uses the
 * tokens defined in style.css, which loads first. Layout follows the Patacca
 * Services LLC banner; colors are this site's footer palette, so the banner
 * reads as part of the same dark surface.
 */

/* Shown only when JavaScript runs: without consent.js the buttons would do nothing. */
.cookie-banner { display: none; }

.js .cookie-banner:not([hidden]) {
  display: block;
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  /* Above the back-to-top button (1030) and the mobile CTA bar (1020). */
  z-index: 1040;
  padding: var(--sp-5) 0;
  background: var(--ink);
  border-top: 1px solid var(--ftr-line);
  box-shadow: 0 -12px 32px rgb(0 0 0 / 0.25);
}

.cookie-banner:focus { outline: none; }

.cookie-banner .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-4) var(--sp-8);
}

.cookie-title {
  margin: 0 0 var(--sp-2);
  font-family: var(--font-sans);
  font-size: var(--fs-12-5);
  font-weight: 600;
  line-height: 1;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ftr-head);
}

.cookie-copy p {
  margin: 0;
  max-width: 78ch;
  font-size: var(--fs-14-5);
  line-height: var(--lh-body);
  color: var(--ftr-text);
}

/* The ask is two paragraphs; the GPC note is one. Scoped to .cookie-ask so the
   GPC note, which follows the hidden ask paragraphs in the markup, gets no gap. */
.cookie-copy p.cookie-ask + p.cookie-ask { margin-top: var(--sp-2); }

.cookie-copy a { color: var(--ftr-link); text-decoration: underline; }
.cookie-copy a:hover { color: var(--paper); }

.cookie-actions { display: flex; gap: var(--sp-3); flex-shrink: 0; }

/* Equal weight for both choices: same size, so neither is the easier click. */
.cookie-actions .btn { min-width: 112px; }

.cookie-accept {
  background: var(--paper);
  border-color: var(--paper);
  color: var(--ink);
}

.cookie-accept:hover {
  background: var(--paper-dim);
  border-color: var(--paper-dim);
  color: var(--ink);
}

.cookie-decline {
  background: transparent;
  border-color: var(--on-ink-line);
  color: var(--paper);
}

.cookie-decline:hover {
  background: var(--on-ink-wash);
  border-color: var(--paper);
  color: var(--paper);
}

.cookie-banner .cookie-gpc,
.cookie-banner.is-gpc .cookie-ask { display: none; }
.cookie-banner.is-gpc p.cookie-gpc { display: block; }
.cookie-banner.is-gpc div.cookie-gpc { display: flex; }

/* Footer "Cookie Settings": a button that looks like the links beside it. */
.link-btn {
  padding: 0;
  background: none;
  border: 0;
  font: inherit;
  color: var(--ftr-link);
  cursor: pointer;
}

.link-btn:hover { color: var(--paper); text-decoration: underline; }

html:not(.js) .js-only { display: none; }

@media (max-width: 640px) {
  .cookie-banner .wrap { flex-direction: column; align-items: stretch; }
  .cookie-actions .btn { flex: 1; }
}
