/* The analytics notice and choice (site tasks 12 and 13): the one-line notice on a first visit, the panel the footer's
   "Analytics choice" opens, and that footer button. Only in the build when the PUBLIC_GA4_ID build setting is set. */

.consent {
  position: fixed;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 10;
  display: flex;
  flex-wrap: wrap;
  gap: 0 12px;
  align-items: center;
  justify-content: center;
  max-height: 60vh;
  padding: 2px 16px;
  overflow-y: auto;
  font-family: var(--system);
  font-size: 15px;
  line-height: 20px;
  color: var(--white);
  background: var(--charcoal);
  border-top: 2px solid var(--yellow);
  opacity: 1;
  transition: opacity 0.2s;
}

.consent--hiding {
  opacity: 0;
}

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

/* When it would cover a main button, the send button or the spam check, it sits in the page after the footer. */
.consent--in-page {
  position: static;
  max-height: none;
}

.consent:focus {
  outline: 3px solid var(--yellow);
  outline-offset: -3px;
}

.consent p {
  margin: 0;
  font-size: 15px;
  line-height: 20px;
}

.consent a {
  color: var(--white);
}

.consent a:focus-visible,
.consent-button:focus-visible,
.consent-link:focus-visible {
  outline: 3px solid var(--yellow);
  outline-offset: 2px;
}

/* Small, but at least 44 pixels tall to tap. */
.consent-button {
  min-width: 44px;
  min-height: 44px;
  padding: 4px 14px;
  font-family: var(--karla);
  font-size: 15px;
  font-weight: 700;
  line-height: 20px;
  color: var(--white);
  cursor: pointer;
  background: none;
  border: 2px solid var(--yellow);
  border-radius: 10px;
}

.consent-button:hover {
  color: var(--charcoal);
  background: var(--yellow);
}

.consent-link {
  min-height: 44px;
  padding: 0 4px;
  font-family: var(--karla);
  font-size: 15px;
  color: var(--white);
  text-decoration: underline;
  cursor: pointer;
  background: none;
  border: 0;
}

.consent-notice .consent-text {
  padding: 4px 0 0;
}

/* Narrow windows: the line above, OK and "No thanks" below it. */
@media (width < 560px) {
  .consent-notice .consent-text {
    flex-basis: 100%;
    text-align: center;
  }
}

.consent-panel {
  gap: 8px 12px;
  padding: 12px 16px;
}

.consent-panel .consent-text {
  flex-basis: 100%;
  max-width: 70ch;
  text-align: center;
}

.footer-choice {
  margin: 10px 0 8px;
}

.footer-legal .footer-choice {
  margin: 0;
}

.consent-open {
  min-height: 44px;
  padding: 0;
  font-family: var(--karla);
  font-size: 16px;
  color: var(--footer-heading);
  text-decoration: underline;
  cursor: pointer;
  background: none;
  border: 0;
}

/* Without the footer's Privacy row (an older page), the choice takes the third column. */
@media (width >= 851px) {
  .footer-inner > .footer-choice {
    grid-column: 3;
    grid-row: 1;
    align-self: center;
  }
}
