/* Byte-identical to public/css/legal-ui.css in the Next.js build — keep the two in
   sync. References to app/(themed)/layout.tsx below mean, for this site,
   header.php. */
/* ---------------------------------------------------------------------------
   Theme-side placement for the legal and consent additions:

     - the footer legal row (Privacy Policy | Cookie Policy | Cookie Settings)
     - where the consent checkboxes sit inside the footer newsletter widget
     - where they sit inside the homepage newsletter popup

   The checkboxes themselves are styled in cookie-consent.css, which both root
   layouts load. Only the positioning is here, because everything in this file
   targets Builton-theme markup that the five standalone pages never render.

   Loaded by app/(themed)/layout.tsx after custom.css, so these rules win on
   source order and no !important is needed.
   --------------------------------------------------------------------------- */

/* --------------------------------------------------------- footer legal row */

.footer-legal {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 18px;
}

.footer-legal-link {
  font-size: inherit;
  line-height: inherit;
  color: inherit;
  opacity: 0.7;
  text-decoration: none;
  transition: opacity 0.25s ease, color 0.25s ease;
}

.footer-legal-link:hover,
.footer-legal-link:focus-visible {
  color: var(--color-green, #dbe71b);
  opacity: 1;
}

/* Strip the UA button chrome so it matches the two anchors beside it. */
.footer-legal-button {
  padding: 0;
  border: 0;
  background: none;
  font-family: inherit;
  font-weight: inherit;
  letter-spacing: inherit;
  text-transform: inherit;
  cursor: pointer;
}

.footer-legal-sep {
  opacity: 0.35;
  user-select: none;
}

@media (min-width: 992px) {
  .footer-legal {
    justify-content: flex-end;
    margin-top: 0;
  }
}

/*
  Below 400px the three items plus separators overflow one line awkwardly, so
  the separators are dropped and the links wrap as a centred cluster.
*/
@media (max-width: 399px) {
  .footer-legal {
    gap: 6px 14px;
  }

  .footer-legal-sep {
    display: none;
  }
}

/* ------------------------------------------- consent boxes, footer widget */

/*
  The newsletter widget is white text on black and `.bd-consent` inherits its
  colour, so only spacing and a smaller type size are needed.
*/
.newsletter-consent {
  margin-top: 18px;
  color: var(--color-white, #f7f7f7);
}

.newsletter-consent .bd-consent:last-child {
  margin-bottom: 0;
}

.newsletter-consent .bd-consent label {
  font-size: 12px;
  opacity: 0.8;
}

/* -------------------------------------- consent boxes, homepage popup modal */

/*
  `.modal-body .content` is a white panel with 55px padding, so the boxes only
  need to be separated from the last input and from the Subscribe button.
*/
.popup-consent {
  margin: 22px 0 6px;
}

.popup-consent .bd-consent:last-child {
  margin-bottom: 0;
}

.popup-consent .bd-consent label {
  font-size: 12px;
}
