/* Shippn site header — ported from the Shippn design system story
   "Examples / Site Header / Signed out" (storybook.shippn.com).
   Values and class names follow the story; the DS components it uses (sh-popover, sh-drawer,
   sh-button) are re-implemented below with the same measurements. */

/* Sticky wrapper: the header template part gets the class "hx-sticky". */
.hx-sticky { position: sticky; top: 0; z-index: 100; }
.admin-bar .hx-sticky { top: var(--wp-admin--admin-bar--height, 32px); }
@media (max-width: 600px) { .admin-bar .hx-sticky { top: 0; } }

.hx { --ink:#172b4d; --sub:#44546f; --muted:#626f86; --line:#dfe1e6; --line-soft:#ebecf0; --surface:#f7f8f9; --hover:#f1f2f4; --accent:#ff6c36; --accent-hover:#e64d1a; --accent-ink:#c8471b; --brand:#160e2e; --btn-ink:#111827;
      box-sizing:border-box; width:100%; overflow-x:clip; background:#fff; font-family:'Inter',system-ui,-apple-system,sans-serif; color:var(--ink); -webkit-font-smoothing:antialiased; line-height:1.5; }
.hx *, .hx *::before, .hx *::after { box-sizing:border-box; }
.hx a { color:inherit; text-decoration:none; }
.hx [hidden] { display:none !important; }
.hx p { margin:0; }
.hx svg { display:block; flex:none; }
@media (prefers-reduced-motion: reduce) { .hx * { transition:none !important; animation:none !important; } }

.hx-skip { position:absolute; left:12px; top:-48px; background:var(--brand); color:#fff !important; padding:10px 16px; border-radius:8px; z-index:60; transition:top .15s; }
.hx-skip:focus { top:12px; }

/* bar */
.hx-bar { position:relative; z-index:30; background:rgba(255,255,255,.9); -webkit-backdrop-filter:saturate(180%) blur(8px); backdrop-filter:saturate(180%) blur(8px); border-bottom:1px solid var(--line); }
.hx-inner { max-width:1400px; margin:0 auto; padding:0 24px; height:64px; display:flex; align-items:center; gap:16px; }
.hx-logo { height:30px; flex:none; display:flex; }
.hx-logo img { height:100%; width:auto; }

.hx-desktop { display:flex; align-items:center; gap:16px; flex:1; min-width:0; }
.hx-nav { display:flex; align-items:center; gap:2px; }
.hx-spacer { flex:1; min-width:12px; }
.hx-actions { display:flex; align-items:center; gap:8px; flex:none; }
.hx-cta { display:flex; align-items:center; gap:4px; }

.hx-navlink { display:inline-flex; align-items:center; gap:4px; font:inherit; font-size:14.5px; font-weight:500; line-height:1.5; color:var(--sub); background:none; border:none; cursor:pointer; padding:8px 12px; border-radius:8px; white-space:nowrap; position:relative; transition:background .12s,color .12s; }
.hx-navlink:hover, .hx-navlink[aria-expanded="true"] { background:var(--hover); color:var(--ink); }
.hx-navlink--dd .hx-chev { color:var(--muted); transition:transform .15s; }
.hx-navlink[aria-expanded="true"] .hx-chev { transform:rotate(180deg); }
.hx :focus-visible { outline:2px solid var(--accent); outline-offset:2px; border-radius:8px; }

/* buttons (DS Button size=sm: 32px, 14px/500, radius 6px) */
.hx .hx-btn { display:inline-flex; align-items:center; justify-content:center; gap:6px; height:32px; padding:0 10px; border:0; border-radius:6px; font:inherit; font-size:14px; font-weight:500; line-height:1; white-space:nowrap; cursor:pointer; transition:background .12s,color .12s; }
.hx .hx-btn--primary { background:var(--accent); color:#fff; }
.hx .hx-btn--primary:hover { background:var(--accent-hover); color:#fff; }
.hx .hx-btn--ghost { background:transparent; color:var(--btn-ink); }
.hx .hx-btn--ghost:hover { background:var(--hover); }

/* icon button */
.hx-iconbtn { position:relative; display:inline-flex; align-items:center; justify-content:center; width:38px; height:38px; border:none; background:none; color:var(--sub); border-radius:9px; cursor:pointer; transition:background .12s,color .12s; padding:0; }
.hx-iconbtn:hover { background:var(--hover); color:var(--ink); }

/* popover (DS Popover: placement bottom-start, 8px offset, 1px border, radius 6px, elevation-3) */
.hx-pop { position:relative; }
.hx-pop__panel { position:absolute; top:calc(100% + 8px); left:0; z-index:40; width:var(--hx-w, 400px); max-width:calc(100vw - 32px); background:#fff; border:1px solid #e5e7eb; border-radius:6px; box-shadow:0 4px 6px -1px rgba(0,0,0,.1), 0 2px 4px -2px rgba(0,0,0,.1); animation:hx-popin .14s ease; }
@keyframes hx-popin { from { opacity:0; transform:translateY(-4px); } to { opacity:1; } }

/* mega */
.hx-mega__panel { padding:8px; }
.hx-mega__panel--split { display:grid; grid-template-columns:minmax(0,1fr) 220px; gap:12px; }
.hx-mega__col { min-width:0; }
.hx-mega__title { font-size:11px; font-weight:700; letter-spacing:.06em; text-transform:uppercase; color:var(--muted); margin:8px 12px !important; line-height:1.4; }
.hx-mega__grid { display:grid; grid-template-columns:repeat(2, minmax(0,1fr)); gap:2px; }
.hx-mega__panel:not(.hx-mega__panel--split) .hx-mega__grid { grid-template-columns:1fr; }
.hx-mega__item { display:flex; gap:12px; padding:10px 12px; border-radius:10px; transition:background .12s; min-width:0; }
.hx-mega__item:hover { background:var(--hover); }
.hx-mega__ico { flex:none; width:34px; height:34px; border-radius:9px; background:#fff3ee; color:var(--accent-ink); display:flex; align-items:center; justify-content:center; }
.hx-mega__text { display:flex; flex-direction:column; gap:1px; min-width:0; line-height:1.35; }
.hx-mega__label { font-size:14px; font-weight:600; color:var(--ink); }
.hx-mega__desc { font-size:12.5px; color:var(--muted); overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.hx-mega__feature { display:flex; flex-direction:column; gap:8px; padding:16px; border-radius:12px; background:linear-gradient(160deg,#fff5f0,#fdeee6); border:1px solid #ffe0d1; }
.hx-mega__ico--lg { width:40px; height:40px; background:#fff; }
.hx-mega__feature-title { font-size:14px; font-weight:700; color:var(--ink); line-height:1.35; }
.hx-mega__feature-desc { font-size:12.5px; color:var(--sub); line-height:1.45; }
.hx-mega__feature-cta { display:inline-flex; align-items:center; gap:4px; font-size:13px; font-weight:600; color:var(--accent-ink); margin-top:auto; }

/* mobile */
.hx-mobile { display:none; align-items:center; gap:4px; margin-left:auto; }

/* drawer (DS Drawer: placement right, size md = 480px, 45% backdrop) */
.hx-drawer { position:fixed; inset:0; z-index:100000; }
.hx-drawer__backdrop { position:absolute; inset:0; background:rgba(0,0,0,.45); opacity:0; transition:opacity .2s ease; }
.hx-drawer__panel { position:absolute; top:0; right:0; bottom:0; width:min(480px, 100vw); background:#fff; box-shadow:0 25px 50px -12px rgba(0,0,0,.25); display:flex; flex-direction:column; transform:translateX(100%); transition:transform .2s ease; }
.hx-drawer.is-open .hx-drawer__backdrop { opacity:1; }
.hx-drawer.is-open .hx-drawer__panel { transform:none; }
.hx-drawer__header { display:flex; align-items:center; justify-content:space-between; gap:12px; padding:24px 24px 16px; border-bottom:1px solid var(--line); }
.hx-drawer__title { font-size:18px; font-weight:600; line-height:1.4; color:var(--ink); }
.hx-drawer__close { width:32px; height:32px; }
.hx-drawer__body { flex:1; overflow-y:auto; padding:16px 16px 24px; }

.hx-d-list { display:flex; flex-direction:column; padding:4px 8px; }
.hx-d-row { display:flex; align-items:center; gap:12px; padding:10px 12px; border-radius:10px; font-size:15px; color:var(--ink); cursor:pointer; list-style:none; }
.hx-d-row::-webkit-details-marker { display:none; }
.hx-d-row > span:first-of-type { flex:1; }
.hx-d-row:hover, .hx-d-subrow:hover { background:var(--hover); }
.hx-d-caret { margin-left:auto; color:var(--muted); transition:transform .2s; }
.hx-d-group[open] .hx-d-caret { transform:rotate(180deg); }
.hx-d-sub { display:flex; flex-direction:column; padding:0 0 4px 8px; }
.hx-d-subrow { display:flex; align-items:center; gap:10px; padding:8px 12px; border-radius:8px; color:var(--sub); font-size:14px; }
.hx-d-subrow svg { color:var(--muted); }
.hx-d-cta { display:flex; flex-direction:column; gap:8px; padding:12px 16px; }
.hx .hx-d-cta .hx-btn { width:100%; height:40px; font-size:15px; }

@media (max-width: 1080px) {
	.hx-desktop { display:none; }
	.hx-mobile { display:flex; }
	.hx-inner { height:60px; padding:0 16px; }
}
