/* Consent banner and the footer's "Cookie settings" control. A non-modal strip
   at the bottom of the viewport: a coupon sheet under an ink rule, with a label
   tab hanging from its top edge as a notice has (DESIGN.md). It sits last in
   the page and sticks to the viewport's bottom edge, so it never covers the
   footer once the visitor scrolls there. Accept and Reject share one rule. */
/* Keep the focused control, or a link's target, clear of the strip when the
   browser scrolls it into view (WCAG 2.4.11, Focus Not Obscured). */
html {
  scroll-padding-bottom: 7rem;
}

.consent {
  position: sticky;
  bottom: 0;
  z-index: 10;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 24px;
  padding: 14px 48px;
  background: var(--coupon);
  border-top: 1.5px solid var(--ink);
  box-shadow: 0 -18px 28px -22px rgba(29, 27, 22, 0.6);
}

/* The label tab: ink with dock type, 8px from the left, flush with the rule. */
.consent::before {
  content: "Cookies";
  position: absolute;
  top: 0;
  left: 48px;
  padding: 3px 10px 2px;
  background: var(--ink);
  color: var(--dock);
  font: var(--label);
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.consent[hidden] {
  display: none;
}

.consent p {
  max-width: 100ch;
  margin: 0;
  padding-top: 22px;
  font: var(--body-sm);
}

/* Accept and Reject share one class and one rule: same size, same style. */
.consent-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--row);
}

.consent-choice {
  min-width: 112px;
  padding: 10px 22px;
  border-width: 2px;
  font-size: 16px;
  text-align: center;
  cursor: pointer;
}

.consent-close {
  width: 40px;
  height: 40px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--ink);
  font: var(--headline);
  font-size: 30px;
  line-height: 1;
  cursor: pointer;
}

.consent-close:hover {
  background: var(--fresh);
}

/* A button that reads as a link, for an action rather than a destination. */
.link-button {
  padding: 0;
  border: 0;
  background: none;
  color: inherit;
  font: inherit;
  text-decoration: underline;
  cursor: pointer;
}

.link-button[hidden] {
  display: none;
}

@media (max-width: 760px) {
  html {
    scroll-padding-bottom: 12rem;
  }

  .consent {
    padding: 12px 16px;
  }

  .consent::before {
    left: 16px;
  }
}
