/*
 * GA4 consent banner (partials/consent-banner.njk, docs/design.md "Consent banner + GA4").
 * Fixed to the bottom edge: it covers content but never moves it, and stays above the open overlay menu
 * (z-index 9999). The look comes from the theme: DIN and #2d2d2d text from body, the site's --primary as accent,
 * .btn.btn-primary for both buttons (same size and style = equal weight).
 * Load after /assets/css/theme.css and /assets/site.css.
 */

.consent-banner {
  position: fixed;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 10000;
  max-height: 100vh;
  overflow-y: auto;
  border-top: 4px solid var(--primary);
  background-color: #fff;
  box-shadow: 0 -2px 16px rgba(0, 0, 0, 0.15);
  font-size: calc(14px + (2) * ((100vw - 320px) / (1920 - 320)));
}

.consent-banner__inner {
  display: flex;
  flex-direction: column;
  gap: 15px;
  padding-top: 20px;
  padding-bottom: 20px;
}

.consent-banner__text {
  margin: 0;
}

.consent-banner__text a {
  text-decoration: underline;
}

.consent-banner__buttons {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 15px;
}

/* the theme gives .btn a fixed 260 px below 768 px; here both buttons share the row equally */
.consent-banner__buttons .btn {
  width: 100%;
}

/* the theme removes every focus outline; the banner is keyboard UI, so its controls show one */
.consent-banner a:focus-visible,
.consent-banner .btn:focus-visible {
  outline: 2px solid #2d2d2d;
  outline-offset: 2px;
}

@media (min-width: 992px) {
  .consent-banner__inner {
    flex-direction: row;
    align-items: center;
    gap: 40px;
  }
  .consent-banner__text {
    flex: 1 1 auto;
  }
  .consent-banner__buttons {
    flex: 0 0 auto;
  }
}
