/*
 * New look for the cookie banner built by /glidr-consent.js (current frontend, unchanged).
 * That script appends its own <style> when the banner opens, so these selectors carry one
 * extra element (`html body`) to win without !important. Added to every page by build-site.mjs.
 */
html body .glidr-consent-banner {
  background: #081018;
  color: #eaf2f6;
  border-top: 1px solid #1f3242;
  box-shadow: 0 -1px 0 rgba(56, 232, 255, 0.25), 0 -12px 40px rgba(0, 0, 0, 0.55);
  font-family: "Manrope", system-ui, sans-serif;
  padding: 18px clamp(20px, 6vw, 96px);
}
html body .glidr-consent-text { color: #c3d0d9; font-size: 0.92rem; }
html body .glidr-consent-text a { color: #7af0ff; }
html body .glidr-consent-actions button {
  border-radius: 4px;
  border-color: #2a4256;
  color: #eaf2f6;
  min-height: 44px;
  font-family: inherit;
}
html body .glidr-consent-actions button:hover { filter: none; border-color: #8597a8; }
html body .glidr-consent-actions button.glidr-consent-accept { background: #38e8ff; border-color: #38e8ff; color: #031219; }
html body .glidr-consent-actions button.glidr-consent-accept:hover { box-shadow: 0 8px 30px -8px rgba(56, 232, 255, 0.6); }
html body .glidr-consent-actions button:focus-visible { outline-color: #38e8ff; }

/* Below 480px the script stacks the banner vertically but keeps the text's `flex: 1 1 260px`, which then
   means "at least 260px tall" and opens a big gap above the buttons. Size the text to its content. */
@media (max-width: 480px) {
  html body .glidr-consent-banner { padding: 14px 16px calc(14px + env(safe-area-inset-bottom, 0px)); gap: 12px; }
  html body .glidr-consent-text { flex: 0 0 auto; font-size: 0.86rem; }
}

/* Portrait phones: a compact strip instead of a stacked card. The notice wraps at full width (readable,
   no sideways scrolling) and compact Reject/Accept float to the right of its last line, dropping to a line
   of their own only when that line is full. Same query as the homepage's phone layout (home/src/style.css). */
@media (max-width: 767px) and (orientation: portrait) {
  /* Font size/line height on the banner too: the inline text's line boxes take the banner's strut. */
  html body .glidr-consent-banner { display: flow-root; padding: 8px 12px calc(8px + env(safe-area-inset-bottom, 0px)) 14px; font-size: 0.74rem; line-height: 1.45; }
  html body .glidr-consent-text { display: inline; margin: 0; font-size: inherit; line-height: inherit; }
  html body .glidr-consent-actions { float: right; display: flex; flex-wrap: nowrap; gap: 6px; width: auto; margin: 3px 0 0 12px; }
  html body .glidr-consent-actions button { flex: none; min-height: 32px; padding: 0 12px; font-size: 0.78rem; line-height: 1; border-radius: 8px; }
}

/* The "this page is also in Dutch/French/German" bar from /site-chrome.js. It sat underneath the cookie
   banner, so it waits until the cookie choice is made: one bottom bar at a time. Styled here too because
   the homepage doesn't load site-chrome.css. */
html body .lang-suggest-banner {
  position: fixed; left: 12px; right: 12px; bottom: calc(12px + env(safe-area-inset-bottom, 0px)); z-index: 70;
  display: flex; align-items: center; flex-wrap: wrap; gap: 6px 16px;
  padding: 12px 16px; border: 1px solid #1f3242; border-radius: 4px;
  background: rgba(8, 16, 24, 0.97); box-shadow: 0 12px 40px rgba(0, 0, 0, 0.55);
  font-family: "Manrope", system-ui, sans-serif; font-size: 0.9rem; color: #eaf2f6;
}
html body .lang-suggest-banner .lang-suggest-link { display: inline-flex; align-items: center; min-height: 32px; color: #38e8ff; font-weight: 700; text-decoration: none; }
html body .lang-suggest-banner .lang-suggest-link:hover { text-decoration: underline; }
html body .lang-suggest-banner .lang-suggest-close {
  margin-left: auto; width: 36px; height: 36px; padding: 0; border: 0; border-radius: 4px; background: none;
  color: #8597a8; font-size: 1.2rem; line-height: 1; cursor: pointer;
}
html body .lang-suggest-banner .lang-suggest-close:hover { color: #eaf2f6; background: rgba(255, 255, 255, 0.06); }
html body:has(.glidr-consent-banner) .lang-suggest-banner { display: none; }
/* site-chrome.js (deferred) mounts its bar just before glidr-consent.js mounts the cookie banner on
   DOMContentLoaded; the short delay keeps the language bar from ever flashing up first. */
html body .lang-suggest-banner { animation: lang-suggest-in .3s ease .8s both; }
@keyframes lang-suggest-in { from { opacity: 0; transform: translateY(8px); } }
@media (min-width: 900px) { html body .lang-suggest-banner { right: auto; max-width: 620px; } }
