/*
 * WordPress-only rules, on top of css/site.css (the Next.js design, generated) and css/fonts.css.
 */

/* The home page's opening plays the first time the home page appears in a visit. A script in the
   page head marks later visits before anything paints (inc/setup.php); this is hero.css's
   data-direct, which the Next.js site sets when you come back to the home page. */
html[data-opening="done"] .hero {
  --hold: 0s;
  --open: 0s;
}

html[data-opening="done"] .hero-open {
  display: none;
}

/* Logged-in visitors: keep the fixed header, and the mobile menu under it, below the admin bar. */
.admin-bar .site-header {
  top: 32px;
}

.admin-bar .mobile-menu {
  inset: calc(var(--header-h) + 32px) 0 0;
}

@media (max-width: 782px) {
  .admin-bar .site-header {
    top: 46px;
  }

  .admin-bar .mobile-menu {
    inset: calc(var(--header-h) + 46px) 0 0;
  }

  /* The admin bar would scroll away on phones, leaving a gap above the header */
  #wpadminbar {
    position: fixed;
  }
}

/* Enquiry form: a field only robots fill in, kept out of sight and out of the layout */
.form__trap {
  position: absolute !important;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

/* The message under the button after sending (inc/enquiry.php) */
.form__note[data-status] {
  color: var(--fg);
  font-weight: 600;
}

/* reCAPTCHA: Google's floating badge is hidden, and the form carries the notice Google asks for instead */
.grecaptcha-badge {
  visibility: hidden;
}

.form__legal {
  margin: 0;
  color: var(--muted);
  font-size: 0.75rem;
  line-height: 1.5;
}

.form__legal a {
  text-decoration: underline;
}

/* Plain text pages that are not built from sections (index.php) */
.thryv-content {
  max-width: 46rem;
}

.thryv-content > * + * {
  margin-top: 1.1em;
}

.thryv-content :is(h2, h3) {
  margin-top: 1.8em;
}

.thryv-content :is(ul, ol) {
  padding-left: 1.25em;
  list-style: revert;
}

.thryv-content a {
  color: var(--link);
  text-decoration: underline;
}
