/* Important declarations in a named layer outrank the older unlayered !important
   Builder/theme rules without changing their font sizes, spacing or emphasis. */
@layer pp-local-typography {
  :root {
    --pp-font-heading: Georgia, "Times New Roman", serif !important;
    --pp-font-body: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, "Open Sans", "Helvetica Neue", sans-serif !important;
  }

  body,
  body *:not(:where(.fa, .fas, .far, .fab, .fal, .fad, .dashicons,
    .ast-icon, .fl-button-icon, .fl-icon i, [class^="ua-icon-"], [class*=" ua-icon-"],
    #wpadminbar, #wpadminbar *, #ppf-root, #ppf-root *)) {
    font-family: var(--pp-font-body) !important;
  }

  body :is(h1, h2, h3, h4, h5, h6, [role="heading"], .ppt-h1, .ppt-h2, .ppt-h3,
    .ppt-gtitle, .pp-muse-doc__title, .ppt-town > span),
  body :is(h1, h2, h3, h4, h5, h6, [role="heading"], .ppt-h1, .ppt-h2, .ppt-h3,
    .ppt-gtitle, .pp-muse-doc__title, .ppt-town > span) *:not(:where(.fa, .fas, .far, .fab, .fl-button-icon)) {
    font-family: var(--pp-font-heading) !important;
  }

  /* Same label treatment and control shape in header, hero, content and footer. */
  body .pp-type-consultation {
    align-items: center !important;
    justify-content: center !important;
    box-sizing: border-box !important;
    min-height: 50px !important;
    padding: 14px 24px !important;
    border: 1px solid #6fb0c7 !important;
    border-radius: 5px !important; /* Match James's tagged homepage header button. */
    background: #6fb0c7 !important;
    color: #11284b !important;
    font-family: var(--pp-font-body) !important;
    font-size: 16px !important;
    font-weight: 700 !important;
    line-height: 20px !important;
    letter-spacing: 0 !important;
    text-transform: none !important;
    text-decoration: none !important;
    text-align: center !important;
    box-shadow: none !important;
  }
  body .pp-type-consultation :not(.fl-button-icon) {
    font-family: var(--pp-font-body) !important;
    font-size: inherit !important;
    font-weight: inherit !important;
    line-height: inherit !important;
    letter-spacing: inherit !important;
    text-transform: inherit !important;
  }
  body .pp-type-consultation > .ast-custom-button {
    padding: 0 !important;
    border: 0 !important;
    min-height: 0 !important;
    background: transparent !important;
  }
  body .pp-type-consultation:hover { background-color: #75bad3 !important; }
  body .pp-type-consultation:focus-visible { outline: 3px solid #e9ae41; outline-offset: 3px; }

  /* Companion actions must match the rounded consultation button beside them. */
  body :is(.ppt-btn, .fl-button, .uabb-button, .pp-cred-button,
    .pp-dock-cta__btn, .pp-spot-button),
  body :is(.ppt-actions, .pp-dock-cta) > :is(a, button) {
    border-radius: 5px !important;
  }

  /* Equal paired actions: blue primary, solid white secondary. */
  body .pp-type-action-pair {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    align-items: stretch !important;
    gap: 14px !important;
    width: 100% !important;
    max-width: 498px !important;
  }
  body .pp-type-action-pair:not([hidden]) { display: grid !important; }
  body .pp-type-action-pair.ppt-actions--center { margin-inline: auto !important; }
  body .pp-type-action-pair > :is(a, button) {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    box-sizing: border-box !important;
    width: 100% !important;
    min-width: 0 !important;
    min-height: 50px !important;
    margin: 0 !important;
    padding: 14px 20px !important;
    border: 1px solid #fff !important;
    border-radius: 5px !important;
    background: #fff !important;
    color: #11284b !important;
    font-size: 16px !important;
    font-weight: 700 !important;
    line-height: 20px !important;
    letter-spacing: 0 !important;
    text-align: center !important;
    text-decoration: none !important;
  }
  body .pp-type-action-pair > .pp-type-consultation {
    border-color: #6fb0c7 !important;
    background: #6fb0c7 !important;
  }
  body .pp-type-action-pair > :is(a, button) * { color: inherit !important; }
  body .pp-type-action-pair > :is(a, button):hover { background: #eef5f8 !important; }
  body .pp-type-action-pair > .pp-type-consultation:hover { background: #75bad3 !important; }
  body .pp-type-action-pair > :is(a, button):focus-visible {
    outline: 3px solid #e9ae41;
    outline-offset: 3px;
  }
  @media (max-width: 600px) {
    body .pp-type-action-pair { grid-template-columns: minmax(0, 1fr) !important; grid-auto-rows: 1fr !important; }
  }

  /* Additional local feedback: center the exterior gallery's video disclosure. */
  body.page-id-144 .pp-more-videos > summary {
    display: flex !important;
    width: fit-content !important;
    margin-inline: auto !important;
  }
}
