/*
 * OneSuite Header
 * Port of onesuite.io's Header.astro / MobileHeader.astro (Tailwind) to plain CSS.
 * Every rule is scoped under .osh-root with two-class selectors so Kadence's
 * global button / a:hover / ul styles can't leak in.
 *
 * Tune from Customizer → Additional CSS, e.g.  :root { --osh-z: 99999; --osh-gutter-lg: 0px; }
 */

:root {
  --osh-bg: #fcfcfc;
  --osh-text: #0e111a;
  --osh-text-muted: #606473;
  --osh-text-sub: #5a606e;
  --osh-hover: #2461ba;
  --osh-brand: #0246a7;
  --osh-item-title: #0346a7;
  --osh-border: #e4e7ec;
  --osh-tint: #f6f8fa;
  --osh-icon-ink: #141b34;

  /* Background and bottom border always run full width. The content inside
     keeps onesuite.io's width: max 1240px, inset by these gutters on narrower
     screens. Set the gutters to 0px to let the content use the full width. */
  --osh-max-width: 1240px;
  --osh-gutter-md: 51px;  /* 768px – 1023px, mobile bar only */
  --osh-gutter-lg: 100px; /* 1024px – 1439px */

  --osh-z: 1000;          /* header; backdrop and mobile panel sit one below */
  --osh-sticky-top: var(--wp-admin--admin-bar--height, 0px);
  --osh-font: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

/* ---------- Reset (scoped) ---------- */

.osh-root {
  display: contents; /* no box of its own, so the headers can stick against the page */
}

.osh-root .osh-desktop,
.osh-root .osh-mobile,
.osh-root .osh-mmenu {
  font-family: var(--osh-font);
  font-size: 16px;
  line-height: 1.5;
  color: var(--osh-text);
  text-align: start;
  letter-spacing: normal;
  text-transform: none;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.osh-root *,
.osh-root *::before,
.osh-root *::after {
  box-sizing: border-box;
}

.osh-root ul,
.osh-root li {
  margin: 0;
  padding: 0;
  list-style: none;
}

.osh-root ul::before,
.osh-root li::before,
.osh-root li::marker {
  content: none;
}

.osh-root p {
  margin: 0;
}

.osh-root img {
  display: block;
  max-width: none;
  border: 0;
  border-radius: 0;
  box-shadow: none;
}

/* Base resets sit at (0,1,1) so component classes (0,2,0) override them.
   The :hover/:focus/:active resets (0,2,1) only undo the paint Kadence
   applies to those states (colour, background, shadow), never layout. */
.osh-root a {
  color: inherit;
  text-decoration: none;
  box-shadow: none;
  background-image: none;
}

.osh-root a:hover,
.osh-root a:focus,
.osh-root a:active {
  color: inherit;
  text-decoration: none;
  box-shadow: none;
}

.osh-root button:hover,
.osh-root button:focus,
.osh-root button:active {
  background: transparent;
  border-color: transparent;
  box-shadow: none;
  color: inherit;
}

.osh-root button {
  -webkit-appearance: none;
  appearance: none;
  margin: 0;
  padding: 0;
  width: auto;
  min-height: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  color: inherit;
  font: inherit;
  letter-spacing: inherit;
  line-height: inherit;
  text-transform: none;
  text-shadow: none;
  text-align: inherit;
  cursor: pointer;
}

.osh-root svg {
  display: block;
  flex-shrink: 0;
}

.osh-root a:focus-visible,
.osh-root button:focus-visible {
  outline: 2px solid var(--osh-brand);
  outline-offset: 2px;
  border-radius: 2px;
}

.osh-root [hidden] {
  display: none !important;
}

/* ---------- Buttons (btn-primary / btn-secondary) ---------- */

.osh-root .osh-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 16px;
  border: 1px solid;
  border-radius: 5px;
  font-family: var(--osh-font);
  font-size: 13px;
  font-weight: 500;
  line-height: 20px;
  white-space: nowrap;
  text-align: center;
  cursor: pointer;
}

.osh-root .osh-btn:active {
  transform: translateY(1px);
}

.osh-root .osh-btn:focus-visible {
  outline: 3px solid #3b82f6;
  outline-offset: 2px;
  border-radius: 5px;
}

.osh-root .osh-btn--secondary {
  background: var(--osh-tint);
  border-color: var(--osh-border);
  color: var(--osh-text);
  transition: all 300ms ease-out;
}

.osh-root .osh-btn--secondary:hover {
  background: linear-gradient(180deg, #ffffff 0%, #f6f8fa 100%);
  border-color: #2461ba;
  color: #0246a7;
}

.osh-root .osh-btn--primary {
  overflow: hidden;
  color: #fff;
  border-color: #2461ba;
  background: linear-gradient(110deg, #0246a7 0%, #2461ba 45%, #3b82f6 55%, #0246a7 100%);
  background-size: 250% 250%;
  background-position: left center;
  transition:
    background-position 400ms cubic-bezier(0.4, 0, 0.2, 1),
    box-shadow 300ms ease,
    border-color 300ms ease;
}

.osh-root .osh-btn--primary:hover,
.osh-root .osh-btn--primary:focus,
.osh-root .osh-btn--primary:active {
  color: #fff;
}

.osh-root .osh-btn--primary:hover {
  background-position: right center;
  border-color: #3b82f6;
}

[dir="rtl"] .osh-root .osh-btn--primary { background-position: right center; }
[dir="rtl"] .osh-root .osh-btn--primary:hover { background-position: left center; }

.osh-root .osh-btn--nav {
  font-size: 15px;
}

.osh-root .osh-btn--block {
  display: flex;
  width: 100%;
}

/* ---------- Phone link (ContactPhone.astro) ---------- */

.osh-root .osh-phone {
  display: flex;
  flex-shrink: 0;
  align-items: center;
  gap: 4px;
  white-space: nowrap;
  color: var(--osh-text);
  font-size: 15px;
  font-weight: 500;
  line-height: 20px;
  letter-spacing: -0.2px;
}

.osh-root .osh-phone:hover {
  color: var(--osh-hover);
}

/* ======================================================================
   Desktop (≥ 1200px) — Header.astro
   ====================================================================== */

/* Full-width shell: background + bottom border span the page. */
.osh-root .osh-desktop {
  display: none;
  position: relative;
  z-index: var(--osh-z);
  width: 100%;
  background: var(--osh-bg);
  border-bottom: 1px solid var(--osh-border);
}

@media (min-width: 1200px) {
  .osh-root .osh-desktop { display: block; }
}

/* Content column, shared by the bar and the mega menu panels so they line up.
   Explicit width because Kadence's #wrapper is a flex column, where an
   auto-margined child would shrink to its content. */
.osh-root .osh-bar,
.osh-root .osh-frame-wrapper {
  width: calc(100% - 2 * var(--osh-gutter-lg));
  max-width: var(--osh-max-width);
  margin-inline: auto;
}

@media (min-width: 1440px) {
  .osh-root .osh-bar,
  .osh-root .osh-frame-wrapper { width: 100%; }
}

.osh-root[data-osh-sticky="both"] .osh-desktop,
.osh-root[data-osh-sticky="desktop"] .osh-desktop {
  position: sticky;
  top: var(--osh-sticky-top);
}

/* Not positioned, so the mega menu frame below positions against the
   full-width .osh-desktop shell instead of this content column. */
.osh-root .osh-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 16.5px 8px;
}

.osh-root .osh-brand {
  display: flex;
  align-items: center;
  gap: 16px;
}

.osh-root .osh-logo,
.osh-root .osh-mlogo {
  display: block;
  max-width: 148px;
  max-height: 32px;
}

.osh-root .osh-logo img,
.osh-root .osh-mlogo img {
  width: 148px;
  max-width: 100%; /* lets the logo give way when the bar is tight, as on onesuite.io */
  height: 32px;
  object-fit: contain;
}

.osh-root .osh-main {
  position: relative;
  display: flex;
  flex: 1 1 0%;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.osh-root .osh-nav {
  display: flex;
  align-items: center;
}

.osh-root .osh-nav-link {
  display: flex;
  align-items: flex-end;
  gap: 4px;
  padding: 8px;
  white-space: nowrap;
  color: var(--osh-text);
  font-family: var(--osh-font);
  font-size: 16px;
  font-weight: 500;
  line-height: 20px;
  letter-spacing: -0.2px;
  cursor: pointer;
}

.osh-root .osh-nav-link:hover {
  color: var(--osh-hover);
}

.osh-root .osh-nav-link--plain { padding-block: 10px; }
.osh-root .osh-nav-link--static:hover { color: var(--osh-text); }

.osh-root .osh-phone--desktop {
  padding: 8px 6px;
  margin-inline-start: auto;
}

.osh-root .osh-phone--desktop .osh-phone-number { display: none; }

@media (min-width: 1340px) {
  .osh-root .osh-phone--desktop .osh-phone-number { display: inline; }
}

.osh-root .osh-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  max-height: 36px;
}

@media (min-width: 1440px) {
  .osh-root .osh-bar { gap: 30px; padding-inline: 20px; }
  .osh-root .osh-main { gap: 16px; }
  .osh-root .osh-nav-link { padding-inline: 12px; }
}

/* ---------- Mega menu frame ---------- */

/* Full width (positioned against .osh-desktop). Starts 56px down the 74px
   header, right under the labels, so the pointer can travel from label to
   panel without crossing a gap. */
.osh-root .osh-frame {
  position: absolute;
  inset-inline-start: 0;
  top: 48px;
  margin-top: 8px;
  z-index: 50;
  width: 100%;
  overflow: hidden;
  background: var(--osh-bg);
  border-bottom: 1px solid var(--osh-border);
  box-shadow: 0 12px 20px -12px rgba(255, 255, 255, 0.05);
  opacity: 0;
  visibility: hidden;
}

.osh-root .osh-frame-wrapper {
  position: relative;
}

.osh-root .osh-panel {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  opacity: 0;
  visibility: hidden;
}

.osh-root .osh-panel--grouped { padding-block: 32px; }
.osh-root .osh-panel--flat { padding-block: 16px; }

/* Grouped (Product): labelled columns */
.osh-root .osh-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  padding-inline: 24px;
}

.osh-root .osh-group {
  min-width: 0;
  padding-bottom: 16px;
}

.osh-root .osh-group + .osh-group {
  border-inline-start: 1px solid var(--osh-border);
  padding-inline-start: 24px;
}

.osh-root .osh-group:not(:last-child) { padding-inline-end: 24px; }

.osh-root .osh-group-label {
  font-size: 12px;
  font-weight: 500;
  line-height: 1;
  letter-spacing: 0.025em;
  text-transform: uppercase;
  color: var(--osh-text-muted);
}

.osh-root .osh-group-items {
  display: flex;
  flex-direction: column;
  gap: 32px;
  margin-top: 32px;
}

/* Flat (Use cases, Resources): 3-column list */
.osh-root .osh-flat {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  padding-inline: 24px;
}

.osh-root .osh-flat > li {
  min-width: 0;
  padding-block: 16px;
}

.osh-root .osh-flat > li:not(:nth-child(3n + 1)) {
  border-inline-start: 1px solid var(--osh-border);
  padding-inline-start: 24px;
}

.osh-root .osh-flat > li:not(:nth-child(3n)) { padding-inline-end: 24px; }

@media (min-width: 1440px) {
  .osh-root .osh-grid,
  .osh-root .osh-flat { padding-inline: 48px; }
  .osh-root .osh-group + .osh-group,
  .osh-root .osh-flat > li:not(:nth-child(3n + 1)) { padding-inline-start: 40px; }
  .osh-root .osh-group:not(:last-child),
  .osh-root .osh-flat > li:not(:nth-child(3n)) { padding-inline-end: 40px; }
}

/* Menu item (MegaMenuItem.astro) */
.osh-root .osh-item {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: -8px;
  padding: 8px;
  border-radius: 8px;
  cursor: pointer;
}

.osh-root .osh-item:hover { background: var(--osh-tint); }

.osh-root .osh-item-icon {
  display: flex;
  flex-shrink: 0;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: 4px;
  background: var(--osh-tint);
  transition: background-color 150ms cubic-bezier(0.4, 0, 0.2, 1);
}

.osh-root .osh-item:hover .osh-item-icon { background: var(--osh-bg); }
.osh-root .osh-item-icon img { width: 24px; height: 24px; }

.osh-root .osh-item-text {
  display: block;
  min-width: 0;
}

.osh-root .osh-item-title {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--osh-item-title);
  font-size: 15px;
  font-weight: 600;
  line-height: 22px;
}

.osh-root .osh-badge {
  display: inline-flex;
  align-items: center;
  height: 19px;
  padding-inline: 6px;
  border: 1px solid #0d9c31;
  border-radius: 3.5px;
  background: #e6ffec;
  color: #0b7225;
  font-size: 12px;
  font-weight: 500;
  line-height: 1;
}

.osh-root .osh-item-sub {
  display: block;
  margin-top: 2px;
  color: var(--osh-text-sub);
  font-size: 12px;
  font-weight: 400;
  line-height: 20px;
}

/* Page dimmer, appended to <body> by the script */
.osh-backdrop {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  z-index: calc(var(--osh-z) - 1);
  background: rgba(0, 0, 0, 0.1);
  -webkit-backdrop-filter: blur(3px);
  backdrop-filter: blur(3px);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

/* Set for a moment while the script moves the page's own sticky elements
   below the bar, so their CSS transitions can't animate (or park) the change. */
html.osh-measuring *,
html.osh-measuring *::before,
html.osh-measuring *::after {
  transition: none !important;
}

/* Scroll lock while a menu is open (onesuite.io's .scroll-off) */
html.osh-scroll-lock {
  overflow: hidden;
  touch-action: none;
  scrollbar-gutter: stable;
}

/* ======================================================================
   Mobile + tablet (< 1200px) — MobileHeader.astro
   ====================================================================== */

.osh-root .osh-mobile {
  position: relative;
  z-index: var(--osh-z);
}

.osh-root[data-osh-sticky="both"] .osh-mobile,
.osh-root[data-osh-sticky="mobile"] .osh-mobile {
  position: sticky;
  top: var(--osh-sticky-top);
}

/* The WP admin bar stops being fixed at 600px and scrolls away. */
@media (max-width: 600px) {
  .osh-root[data-osh-sticky] .osh-mobile { top: 0; }
}

@media (min-width: 1200px) {
  .osh-root .osh-mobile,
  .osh-root .osh-mmenu { display: none !important; }
}

.osh-root .osh-mbar {
  position: relative;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 24px 20px;
  background: var(--osh-bg);
  border-bottom: 1px solid var(--osh-border);
}

/* Bar background/border full width; content inset by the gutters. */
@media (min-width: 768px) {
  .osh-root .osh-mbar { padding-inline: calc(20px + var(--osh-gutter-md)); }
}

@media (min-width: 1024px) {
  .osh-root .osh-mbar { padding-inline: calc(20px + var(--osh-gutter-lg)); }
}

.osh-root .osh-mright {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
}

.osh-root .osh-phone--bar { padding: 6px; }
.osh-root .osh-phone--bar .osh-phone-number { display: none; }

.osh-root .osh-mactions {
  display: none;
  align-items: center;
  gap: 8px;
}

@media (min-width: 768px) {
  .osh-root .osh-mactions { display: flex; }
}

@media (min-width: 1024px) {
  .osh-root .osh-phone--bar .osh-phone-number { display: inline; }
}

.osh-root .osh-burger {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px;
  border-radius: 6px;
  color: var(--osh-icon-ink);
  transition: background-color 150ms cubic-bezier(0.4, 0, 0.2, 1), color 150ms cubic-bezier(0.4, 0, 0.2, 1);
}

.osh-root .osh-burger:hover,
.osh-root .osh-burger:focus { color: var(--osh-icon-ink); }
.osh-root .osh-burger:hover { background: #f3f4f6; }

.osh-root .osh-burger-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
}

.osh-root .osh-burger-icon svg { width: 100%; height: 100%; }
.osh-root .osh-burger-close { display: none; }
.osh-root .osh-burger[aria-expanded="true"] .osh-burger-open { display: none; }
.osh-root .osh-burger[aria-expanded="true"] .osh-burger-close { display: flex; }

/* ---------- Slide-down panel ---------- */

.osh-root .osh-mmenu {
  position: fixed;
  z-index: calc(var(--osh-z) - 1);
  top: 81px;
  inset-inline: 0;
  height: calc(100vh - 81px);
  height: calc(100dvh - 81px);
  overflow-y: auto;
  background: var(--osh-bg);
  opacity: 0;
  transform: translateY(-100%);
  transition: all 400ms cubic-bezier(0.4, 0, 0.2, 1);
}

.osh-root .osh-mmenu.is-open {
  opacity: 1;
  transform: translateY(0);
}

.osh-root .osh-mnav {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 40px;
  height: 100%;
  padding: 0 24px 24px;
}

@media (min-width: 480px) {
  .osh-root .osh-mnav { height: auto; }
}

/* Panel full width too; its content lines up with the bar's. */
@media (min-width: 768px) {
  .osh-root .osh-mnav { padding-inline: calc(24px + var(--osh-gutter-md)); }
}

@media (min-width: 1024px) {
  .osh-root .osh-mnav { padding-inline: calc(24px + var(--osh-gutter-lg)); }
}

.osh-root .osh-mlist {
  margin-top: 12px;
  color: var(--osh-text);
}

.osh-root .osh-mrow {
  padding-block: 16px;
  border-bottom: 1px solid var(--osh-border);
}

.osh-root .osh-acc-btn,
.osh-root .osh-mplain {
  display: flex;
  align-items: center;
  width: 100%;
  font-family: var(--osh-font);
  font-size: 14px;
  font-weight: 600;
  line-height: 20px;
  letter-spacing: -0.2px;
  color: var(--osh-text);
}

.osh-root .osh-acc-btn { justify-content: space-between; }

.osh-root .osh-acc-arrow {
  width: 16px;
  height: 16px;
  transition: transform 300ms cubic-bezier(0.4, 0, 0.2, 1);
}

.osh-root .osh-acc-btn[aria-expanded="true"] .osh-acc-arrow { transform: rotate(180deg); }

.osh-root .osh-c-brand { color: #2461ba; }
.osh-root .osh-c-harvest { color: #fa5d00; }

/* Accordion body: max-height trick, same as MobileMenuAccordion.astro.
   Visibility keeps collapsed links out of the tab order. */
.osh-root .osh-acc-panel {
  max-height: 0;
  overflow-y: auto;
  opacity: 0;
  visibility: hidden;
  transition: all 300ms cubic-bezier(0.4, 0, 0.2, 1), visibility 0s linear 300ms;
}

.osh-root .osh-acc-panel.is-open {
  max-height: 1000px;
  margin-top: 8px;
  opacity: 1;
  visibility: visible;
  transition: all 300ms cubic-bezier(0.4, 0, 0.2, 1), visibility 0s;
}

.osh-root .osh-mlink { display: block; }

.osh-root .osh-mlink-inner {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 12px;
}

.osh-root .osh-mlink-inner:hover { background: var(--osh-tint); }

.osh-root .osh-mlink-icon {
  display: block;
  flex-shrink: 0;
  padding: 12px;
  border-radius: 8px;
  background: var(--osh-tint);
}

.osh-root .osh-mlink-icon img { width: 20px; height: 20px; }

.osh-root .osh-mlink-text { display: block; }

.osh-root .osh-mlink-title {
  display: block;
  font-size: 14px;
  font-weight: 600;
  line-height: 20px;
  letter-spacing: -0.2px;
}

.osh-root .osh-mlink-sub {
  display: block;
  color: var(--osh-text-sub);
  font-size: 12px;
  font-weight: 400;
  line-height: 20px;
}

/* ---------- Panel footer ---------- */

.osh-root .osh-mfoot {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

@media (min-width: 480px) {
  .osh-root .osh-mfoot { gap: 16px; }
}

.osh-root .osh-phone--menu { padding-block: 8px; }
.osh-root .osh-mtrial { width: 100%; }

.osh-root .osh-note {
  margin-top: 4px;
  color: var(--osh-text-muted);
  font-size: 12px;
  line-height: 1.5;
  text-align: start;
}

@media (prefers-reduced-motion: reduce) {
  .osh-root .osh-mmenu,
  .osh-root .osh-acc-panel,
  .osh-root .osh-acc-arrow { transition-duration: 0s !important; }
}
