/*
 * What the old fixed header left behind.
 *
 * Divi's header was `position: fixed`, so the theme reserved room for it at the
 * top of the page — 80px in Divi, 66px in the child theme, above 1300px — and
 * set `overflow-x: hidden` on html, body and #page-container to contain it. The
 * redesigned header sits in normal flow, so both of those now cause damage.
 *
 * The reserved room became a band of empty page under the header: the gap
 * people were seeing on the sales pages, exactly as tall as the product bar
 * sitting beneath it.
 *
 * And `overflow-x: hidden` on html *and* body makes each of them a scroll
 * container — the spec turns the other axis into `auto` — which is where the
 * second scrollbar came from, and why scrolling those pages fought back.
 * `clip` keeps the horizontal clipping without either side effect: it does not
 * force the other axis, so nothing becomes a scroller.
 *
 * The doubled id is deliberate: the theme's rule is `.et_fixed_nav
 * #page-container` with `!important`, which outranks a plain id even from a
 * sheet loaded later.
 */

html,
body,
#page-container {
  /* `!important` because the theme's own declarations carry it. */
  overflow-x: clip !important;
  overflow-y: visible !important;
}

#page-container#page-container {
  padding-top: 0 !important;
}

/*
 * The sales pages' own bar — programme name on the left, the page's sections
 * and its buy button on the right — is the thing that should follow you down
 * those pages, so it is the one that sticks.
 *
 * The theme already draws it on 70% white. Pinned over moving content that is
 * not enough on its own, so it gets the blur that makes translucency legible,
 * and a hairline to sit on.
 */
#pdv_product_nav {
  position: sticky;
  top: 0;
  z-index: 90;
}

#pdv_product_nav #product_nav {
  background: oklch(1 0 0 / 0.82);
  -webkit-backdrop-filter: saturate(180%) blur(12px);
  backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid oklch(0.923 0.006 264);
}

/*
 * Anything reached by an anchor keeps clear of whatever is pinned above it —
 * the product bar on the sales pages, the navigation everywhere else. Without
 * this, clicking "Content" lands the heading underneath the bar that took you
 * there.
 */
:target {
  scroll-margin-top: 84px;
}

/*
 * Buttons stop shouting.
 *
 * The child theme forces `text-transform: uppercase` on its button classes, so
 * recasing the labels in the markup would have changed nothing on screen. The
 * labels are written in sentence case now and these rules let them through —
 * matching the theme's own selectors, since three of them are id-scoped and
 * would otherwise win.
 */
.common_button,
.common__Button,
.pdv_price_table .table_button .table_button_inner,
#priceTables_container .priceTables_container .price_table .table_button .table_button_inner,
#priceTables_container .priceTables_container .price_table .table_button_anchor,
#prog_helper_container .prog_helper_container .action_call_part .table_button .table_button_inner {
  text-transform: none;
}
