/* PD Site Header — 2026 persona nav. All selectors prefixed .pdsh- / #pd-site-header.
   Deactivating the plugin restores the theme header untouched. */

/* Hide the tiles theme header while this plugin is active */
body.pdsh-active header.header[role="banner"],
body.pdsh-active header.header { display: none !important; }

#pd-site-header { font-family: 'Manrope', ui-sans-serif, system-ui, sans-serif; font-size: 16px; line-height: 1.5; }
#pd-site-header *, #pd-site-header *:before, #pd-site-header *:after { box-sizing: border-box; }
#pd-site-header a { text-decoration: none; }
.pdsh-wrap { max-width: 1140px; margin: 0 auto; padding: 0 24px; }

/* ---- topbar ---- */
.pdsh-topbar { background: var(--pd-navy, #272262); color: rgba(255,255,255,.85); font-size: .76rem; font-weight: 600; }
.pdsh-topbar .pdsh-wrap { display: flex; align-items: center; gap: 22px; height: 34px; }
.pdsh-topbar a { color: rgba(255,255,255,.85); display: inline-flex; align-items: center; gap: 7px; white-space: nowrap; }
.pdsh-topbar a:hover { color: #fff; }
.pdsh-topbar b { color: #fff; font-weight: 700; }
.pdsh-topbar-right { margin-left: auto; display: flex; gap: 22px; }
.pdsh-dot { width: 5px; height: 5px; border-radius: 50%; background: #10b981; display: inline-block; }

/* ---- header bar ---- */
.pdsh-head { background: #fff; border-bottom: 1px solid var(--pd-line, #e2e8f0); position: relative; z-index: 900; }
.pdsh-head > .pdsh-wrap { display: flex; align-items: center; gap: 26px; height: 74px; }
.pdsh-brand img { height: 42px; width: auto; display: block; }

.pdsh-nav { display: flex; align-items: center; gap: 4px; margin-left: 8px; }
.pdsh-nav-link { padding: 9px 13px; border-radius: 9px; font-size: .92rem; font-weight: 600; color: var(--pd-ink, #1a1845); white-space: nowrap; }
.pdsh-nav-link:hover { background: var(--pd-tint, #f8f9fc); color: var(--pd-ink, #1a1845); }
.pdsh-has-caret:after { content: '\25BE'; font-size: .7em; margin-left: 6px; opacity: .55; }

/* dropdowns */
.pdsh-drop-parent { position: relative; }
.pdsh-drop { position: absolute; top: calc(100% + 8px); left: -8px; background: #fff; border: 1px solid var(--pd-line, #e2e8f0); border-radius: 14px; box-shadow: 0 14px 34px rgba(15,23,42,.13); padding: 13px; display: none; z-index: 950; min-width: 330px; }
.pdsh-drop:before { content: ''; position: absolute; top: -9px; left: 0; right: 0; height: 10px; }
.pdsh-drop-parent.pdsh-open .pdsh-drop { display: block; }
@media (hover: hover) { .pdsh-drop-parent:hover .pdsh-drop { display: block; } }
.pdsh-drop-cols { min-width: 520px; column-count: 2; column-gap: 8px; }
.pdsh-ditem { display: block; break-inside: avoid; padding: 9px 11px; border-radius: 10px; }
.pdsh-ditem:hover { background: var(--pd-tint, #f8f9fc); }
.pdsh-ditem b { display: block; font-size: .88rem; color: var(--pd-navy, #272262); font-weight: 700; line-height: 1.3; }
.pdsh-ditem span { display: block; font-size: .76rem; color: var(--pd-muted, #4a5570); line-height: 1.45; margin-top: 1px; }

/* CTAs */
.pdsh-cta { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.pdsh-btn { display: inline-flex; align-items: center; justify-content: center; border-radius: var(--pd-radius, 12px); white-space: nowrap; font-weight: 700; font-size: .92rem; padding: 10px 18px; transition: .15s; }
.pdsh-btn-navy { background: var(--pd-navy, #272262); color: #fff !important; }
.pdsh-btn-navy:hover { background: var(--pd-navy-deep, #1a1845); }
.pdsh-btn-ghost { border: 1.5px solid var(--pd-line, #e2e8f0); color: var(--pd-ink, #1a1845) !important; background: #fff; }
.pdsh-btn-ghost:hover { border-color: var(--pd-soft, #64748b); }

/* mobile */
.pdsh-burger { display: none; margin-left: auto; width: 42px; height: 42px; border-radius: 6px; border: 1.5px solid var(--pd-line, #e2e8f0); background: #fff; align-items: center; justify-content: center; font-size: 1.1rem; color: var(--pd-ink, #1a1845); cursor: pointer; }
.pdsh-mobile { display: none; flex-direction: column; background: #fff; border-bottom: 1px solid var(--pd-line, #e2e8f0); padding: 10px 20px 16px; }
/* .pdsh-open only counts at burger widths — an open menu carried through a
   resize to desktop must not keep painting below the bar (v0.13.0). */
@media (max-width: 900px) { .pdsh-mobile.pdsh-open { display: flex; } }
.pdsh-mobile a { padding: 12px 8px; font-weight: 700; color: var(--pd-ink, #1a1845); border-bottom: 1px solid var(--pd-tint, #f8f9fc); font-size: .95rem; }
.pdsh-mobile-quote { color: var(--pd-navy, #272262) !important; }

@media (max-width: 900px) {
  .pdsh-nav, .pdsh-cta { display: none; }
  .pdsh-burger { display: flex; }
  .pdsh-head > .pdsh-wrap { gap: 14px; height: 64px; }
  .pdsh-brand img { height: 36px; }
  /* a.pdsh-tel-extra: the element part keeps this above the base
     `.pdsh-topbar a { display:inline-flex }` rule, which otherwise outranks a
     lone class and leaves the extra phone lines painting off the edge. */
  a.pdsh-tel-extra, .pdsh-topbar-right { display: none; }
}

/* text-style sign-in (v0.3.0 — replaces the boxed ghost button) */
.pdsh-signin { padding: 9px 10px; font-weight: 700; font-size: .92rem; color: var(--pd-ink, #1a1845); white-space: nowrap; }
.pdsh-signin:hover { color: var(--pd-navy, #272262); }

/* grouped dropdowns (v0.4.0 — headed sections so tools read as a set) */
.pdsh-dgroup-named { break-inside: avoid; }
.pdsh-dgroup-named + .pdsh-dgroup-named { margin-top: 9px; padding-top: 9px; border-top: 1px solid var(--pd-tint, #f8f9fc); }
.pdsh-dgroup-t { display: block; padding: 0 11px 4px; font-size: .66rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--pd-soft, #64748b); }
.pdsh-dtag { margin-left: 7px; padding: 2px 7px; font-size: .62rem; font-weight: 800; font-style: normal; letter-spacing: .04em; text-transform: uppercase; color: var(--pd-navy, #272262); background: var(--pd-line, #e2e8f0); border-radius: 999px; vertical-align: middle; }

/* ---- fixed header (v0.8.0) ----
   Two birds: the header is sticky while scrolling, AND pages whose theme
   fires wp_body_open late (the homepage injects us ~30% into the document)
   no longer paint content first and pop the header in above it — the
   padding below is in <head> CSS, so the top slot is reserved from first
   paint and the header simply appears in place. */
#pd-site-header { position: fixed; top: 0; left: 0; right: 0; z-index: 990; }
body.pdsh-active { padding-top: 109px !important; } /* 34 topbar + 74 bar + 1 border */
@media (max-width: 900px) { body.pdsh-active { padding-top: 99px !important; } }
body.pdsh-active.admin-bar #pd-site-header { top: 32px; }
@media (max-width: 782px) { body.pdsh-active.admin-bar #pd-site-header { top: 46px; } }

/* sign-in door chooser (v0.9.0) — right-aligned so it doesn't clip offscreen */
.pdsh-drop-right { left: auto; right: -8px; min-width: 290px; }

/* trigger buttons (v0.10.0) — parents open options, never navigate */
button.pdsh-nav-link, button.pdsh-signin { background: none; border: 0; font-family: inherit; font-size: .92rem; cursor: pointer; appearance: none; }
button.pdsh-signin { font-size: .92rem; }

/* expandable dropdown sections (v0.12.0) — "3 main headline topics with
   expandable sections" (Sam, 28/08). Topic headers are buttons in the same
   never-navigate language as the nav parents; header.js keeps one open. */
.pdsh-drop-secs { min-width: 350px; }
.pdsh-dsec + .pdsh-dsec { margin-top: 3px; padding-top: 3px; border-top: 1px solid var(--pd-tint, #f8f9fc); }
.pdsh-dsec-t { display: flex; width: 100%; align-items: center; gap: 10px; padding: 10px 11px; border-radius: 10px; background: none; border: 0; font-family: inherit; cursor: pointer; text-align: left; appearance: none; }
.pdsh-dsec-t:hover { background: var(--pd-tint, #f8f9fc); }
.pdsh-dsec-t:after { content: '\25BE'; font-size: .7em; color: var(--pd-ink, #1a1845); opacity: .55; margin-left: auto; transition: transform .15s; }
.pdsh-dsec.pdsh-open > .pdsh-dsec-t:after { transform: rotate(180deg); }
.pdsh-dsec-tt b { display: block; font-size: .88rem; color: var(--pd-navy, #272262); font-weight: 700; line-height: 1.3; }
.pdsh-dsec-tt span { display: block; font-size: .76rem; color: var(--pd-muted, #4a5570); line-height: 1.45; margin-top: 1px; }
.pdsh-dsec-b { display: none; padding: 1px 0 4px; }
.pdsh-dsec.pdsh-open > .pdsh-dsec-b { display: block; }
.pdsh-dsec-b .pdsh-ditem { padding-left: 22px; }

/* ---- duplicate chrome bar on product/basket/checkout (v0.13.0) ----
   The native Woo pages print their own thin chrome bar (pdph-chrome__header:
   logo + Basket/Secure-checkout pill, from pd-quote-tools' single-product
   shell and pd-project-hub-token's PD_PHub_Chrome). With this header active
   that bar is pure duplication — hide it wherever we render. The basket chip
   (.pdsh-basket) takes over its way-back-to-basket job; the chrome FOOTER
   (legal links) is those pages' only footer and is left alone. Scoped to
   body.pdsh-active, so deactivating this plugin restores the bar untouched —
   the same reversibility contract as the theme-header hide up top. */
body.pdsh-active header.pdph-chrome__header { display: none !important; }

/* basket chip (v0.13.0) — rendered only when Woo is active and the page is
   shop-context or the basket is non-empty (pdsh_basket_chip). Ghost-button
   language; count badge in brand navy. */
.pdsh-basket { position: relative; display: inline-flex; align-items: center; justify-content: center; width: 42px; height: 42px; border-radius: 10px; border: 1.5px solid var(--pd-line, #e2e8f0); background: #fff; color: var(--pd-ink, #1a1845); }
.pdsh-basket:hover { border-color: var(--pd-soft, #64748b); color: var(--pd-navy, #272262); }
.pdsh-basket svg { width: 19px; height: 19px; }
.pdsh-basket-n { position: absolute; top: -7px; right: -7px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 999px; background: var(--pd-navy, #272262); color: #fff; font-size: .66rem; font-weight: 800; line-height: 1; display: inline-flex; align-items: center; justify-content: center; }
@media (max-width: 900px) {
  .pdsh-basket { margin-left: auto; width: 40px; height: 40px; }
  .pdsh-basket ~ .pdsh-burger { margin-left: 0; }
}

/* mobile accordion (v0.13.0) — dropdown children were unreachable on touch
   (the menu listed top-level links only). Nav parents and the professionals
   headline topics are now expandable sections: buttons in the same
   never-navigate language as desktop, one open per level (header.js). The
   menu scrolls inside the fixed header so every child stays reachable on a
   small viewport. */
.pdsh-mobile { max-height: calc(100vh - 99px); max-height: calc(100dvh - 99px); overflow-y: auto; -webkit-overflow-scrolling: touch; }
.pdsh-msec-t, .pdsh-msub-t { display: flex; width: 100%; align-items: center; padding: 12px 8px; background: none; border: 0; border-bottom: 1px solid var(--pd-tint, #f8f9fc); font-family: inherit; font-size: .95rem; font-weight: 700; color: var(--pd-ink, #1a1845); text-align: left; cursor: pointer; appearance: none; }
.pdsh-msec-t:after, .pdsh-msub-t:after { content: '\25BE'; font-size: .7em; opacity: .55; margin-left: auto; transition: transform .15s; }
.pdsh-msec.pdsh-open > .pdsh-msec-t:after, .pdsh-msub.pdsh-open > .pdsh-msub-t:after { transform: rotate(180deg); }
.pdsh-msec-b, .pdsh-msub-b { display: none; }
.pdsh-msec.pdsh-open > .pdsh-msec-b, .pdsh-msub.pdsh-open > .pdsh-msub-b { display: block; }
.pdsh-mobile .pdsh-m-child { display: block; padding: 11px 8px 11px 24px; font-weight: 600; font-size: .92rem; color: var(--pd-ink, #1a1845); border-bottom: 1px solid var(--pd-tint, #f8f9fc); }
.pdsh-msub-t { padding-left: 24px; font-size: .9rem; }
.pdsh-msub-b .pdsh-m-child { padding-left: 40px; }
