/* Cookie consent — Northnavia.
 *
 * Reads as part of the site, not a bolted-on widget: the dark green bar, cream body
 * text, the gold rule the footer and hero use, square corners (--radius:0), uppercase
 * letter-spaced buttons matching .btn. A wide bar centred on the bottom edge, capped
 * at the site's own content width so it lines up with the page rather than spanning
 * an ultrawide monitor edge to edge.
 */

.nn-consent {
  position: fixed;
  left: 50%;
  transform: translateX(-50%);
  bottom: var(--gutter);
  z-index: 9000;
  width: min(var(--maxw), calc(100vw - (var(--gutter) * 2)));
  background: var(--green);
  color: var(--cream);
  border-top: 3px solid var(--gold);
  box-shadow: 0 8px 32px rgba(26, 53, 46, .28);
  font-family: var(--font-body);
}

.nn-consent[hidden] { display: none; }

/* Text left, buttons right. `align-items:center` keeps the buttons optically level
   with a two-line paragraph; the text is allowed to shrink (min-width:0) so the
   buttons never get squeezed below their label width. */
.nn-consent__inner {
  padding: 22px 32px;
  display: flex;
  align-items: center;
  gap: 32px;
  flex-wrap: wrap;
}

.nn-consent__copy { flex: 1 1 420px; min-width: 0; }

.nn-consent__title {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 500;
  line-height: 1.2;
  color: var(--white);
  margin: 0 0 10px;
}

.nn-consent__text {
  margin: 0;
  font-size: 14px;
  line-height: 1.6;
  color: var(--cream);
}

.nn-consent__text a {
  color: var(--gold-light);
  text-decoration: underline;
  text-underline-offset: 2px;
}
.nn-consent__text a:hover { color: var(--white); }

/* flex:none so the buttons keep their size and the paragraph absorbs the slack. */
.nn-consent__actions { display: flex; gap: 12px; flex: none; }

/* Not .btn: that is 15px/32px padding and would wrap inside a 420px card. Same
   visual language, one step down. */
.nn-consent__btn {
  flex: 0 0 auto;
  min-width: 140px;
  padding: 13px 24px;
  font-family: inherit;
  font-size: 13px;
  letter-spacing: .04em;
  text-transform: uppercase;
  text-align: center;
  border: 1px solid transparent;
  border-radius: var(--radius);
  cursor: pointer;
  transition: background var(--tr), color var(--tr), border-color var(--tr);
}

.nn-consent__btn--accept { background: var(--cream); color: var(--green); }
.nn-consent__btn--accept:hover { background: var(--white); }

.nn-consent__btn--reject {
  background: transparent;
  color: var(--cream);
  border-color: var(--green-mid);
}
.nn-consent__btn--reject:hover { border-color: var(--cream); color: var(--white); }

.nn-consent__btn:focus-visible,
.nn-consent-reopen:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }

/* Quiet re-open control once a decision exists — consent must stay withdrawable. */
.nn-consent-reopen {
  position: fixed;
  left: var(--gutter);
  bottom: var(--gutter);
  z-index: 8999;
  padding: 9px 14px;
  background: var(--green);
  color: var(--cream);
  border: 1px solid var(--green-mid);
  border-radius: var(--radius);
  font-family: var(--font-body);
  font-size: 12px;
  letter-spacing: .04em;
  text-transform: uppercase;
  cursor: pointer;
  opacity: .75;
  transition: opacity var(--tr), background var(--tr);
}
.nn-consent-reopen:hover { opacity: 1; background: var(--green-dark); }
.nn-consent-reopen[hidden] { display: none; }

/* Tablet and narrower: the bar stops being a row — copy above, buttons below, still
   side by side while they fit. */
@media (max-width: 860px) {
  .nn-consent__inner { gap: 18px; padding: 20px 24px; }
  .nn-consent__copy { flex: 1 1 100%; }
  .nn-consent__actions { flex: 1 1 100%; }
  .nn-consent__btn { flex: 1 1 0; }
}

/* Phone: flush to the bottom edge, full width, buttons stacked with accept on top. */
@media (max-width: 560px) {
  .nn-consent {
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    transform: none;
  }
  .nn-consent__inner { padding: 20px; gap: 16px; }
  .nn-consent__actions { flex-direction: column-reverse; }
  .nn-consent__btn { width: 100%; }
  .nn-consent-reopen { left: 12px; bottom: 12px; }
}

@media (prefers-reduced-motion: reduce) {
  .nn-consent__btn, .nn-consent-reopen { transition: none; }
}
