/* ============================================================
   B2B Order Management page (src/pages/platform/b2b-order-management.astro),
   loaded only on that page, after public/home/tokens.css, public/home/home.css
   and public/search/search.css (which give it the buttons, the dark glow
   ground, hero, logo strip, tab rails, platform cards, FAQ and resource tiles).
   Brand colors: src/styles/tokens.css. Sections in page order; each group
   names its component in src/components/sections/b2b-oms/.
   Breakpoints: 1100, 960 (calculator stacks), 880 (rails become accordions),
   760, 640, 520.
   ============================================================ */

/* the design lines the hero up with the sections below (1280px plus the gutters) */
.kb2b-page .ks-hero__in { max-width: calc(1280px + 2 * var(--ks-gutter)); }

/* Outline button on dark or blue ground (hero, closing band) */
.kb2b-cta-row, .kb2b-finalcta .kh-cta-row { gap: 14px; }
.kb2b-btn-ghost { display: inline-flex; align-items: center; background: transparent; color: var(--kibo-white); border-color: rgba(255,255,255,.32); text-decoration: none; }
.ks-hero .kb2b-btn-ghost { border-color: rgba(255,255,255,.45); }
.kb2b-btn-ghost:hover { background: var(--kibo-white); color: var(--kibo-dark-grey); border-color: var(--kibo-white); }
.kb2b-btn-ghost:focus-visible { outline: 2px solid var(--kibo-yellow); outline-offset: 2px; }

/* ==== Hero (B2bHero.astro): the Search hero plus a bold one-liner ==== */
.kb2b-hero__kicker { margin: 0; font-size: 22px; line-height: 1.3; font-weight: 600; color: var(--kibo-white); }

/* ==== Customer strip (B2bCustomers.astro): the Search marquee without a heading ==== */
.ks-customers.kb2b-customers { padding: 64px 0; }

/* ==== Stat bands (B2bStats.astro): dark glow ground with a left shade ==== */
.kb2b-band__shade { position: absolute; inset: 0; pointer-events: none; background: linear-gradient(to right, rgba(46,52,62,.92) 0%, rgba(46,52,62,.72) 32%, rgba(46,52,62,0) 64%); }
.kb2b-band__in { position: relative; z-index: 2; max-width: 1280px; margin: 0 auto; padding: 92px var(--ks-gutter); }
.kb2b-band__in--benefits { padding-top: 128px; padding-bottom: 80px; }
.kb2b-band__h { text-align: center; max-width: 980px; margin: 0 auto; text-wrap: balance; }
.kb2b-table { margin: 48px auto 0; display: flex; flex-direction: column; width: fit-content; max-width: min(100%, 980px); border-bottom: 1.5px solid var(--kibo-yellow); }
.kb2b-table--equal { display: grid; grid-auto-rows: 1fr; max-width: min(100%, 1100px); margin: 0 auto; }
.kb2b-table__row { display: grid; grid-template-columns: minmax(0, 280px) auto; align-items: center; gap: 20px 72px; padding: 28px 0; border-top: 1.5px solid var(--kibo-yellow); }
.kb2b-table .kh-anl__line { gap: 16px; }
.kb2b-table .kh-anl__line > span { max-width: 620px; }
.kb2b-table .kh-anl__line strong { font-weight: 600; }
.kb2b-table .kh-anl__arrow { height: 44px; }
.kb2b-arrow--down { transform: rotate(180deg); }
.kb2b-table__logo img { max-width: 100%; }
.kb2b-table__logo .kb2b-logo-h29 { height: 29px; }
.kb2b-table__logo .kb2b-logo-h30 { height: 30px; }
.kb2b-table__logo .kb2b-logo-h35 { height: 35px; }
.kb2b-table__logo .kb2b-logo-h36 { height: 36px; }
.kb2b-table__logo .kb2b-logo-h46 { height: 46px; }
.kb2b-table__logo .kb2b-logo-h53 { height: 53px; }

/* ==== Tab rails (B2bRail.astro): the Search rail plus intro lines and bullets ==== */
.ks-section--glow.kb2b-glow--gold {
  background-image:
    radial-gradient(58% 68% at 14% 16%, rgba(255,206,1,.3) 0%, rgba(255,206,1,0) 62%),
    radial-gradient(46% 60% at 88% 10%, rgba(255,206,1,.22) 0%, rgba(255,206,1,0) 66%),
    radial-gradient(70% 78% at 70% 98%, rgba(255,206,1,.26) 0%, rgba(255,206,1,0) 60%);
}
.kb2b-head__copy { display: flex; flex-direction: column; gap: 14px; min-width: 0; flex: 1 1 560px; }
.kb2b-head__sub { margin: 0; font-size: 18px; line-height: 1.34; color: var(--kibo-white); text-wrap: pretty; }
.kb2b-head__intro { display: flex; flex-direction: column; gap: 12px; max-width: 960px; margin-top: 4px; color: var(--kibo-white); }
.kb2b-head__intro p { margin: 0; font-size: 16px; line-height: 1.5; max-width: 660px; }
.ks-head.kb2b-head--tight { margin-bottom: 32px; gap: 14px 24px; }
.kb2b-rail__icon { display: block; color: var(--kibo-white); }
.kb2b-bullets { margin: 0; padding: 0; list-style: none; display: grid; gap: 10px; max-width: 62ch; color: var(--kibo-white); }
.kb2b-bullets li { position: relative; padding-left: 22px; font-size: 16px; line-height: 1.45; text-wrap: pretty; }
.kb2b-bullets li::before { content: ""; position: absolute; left: 0; top: 11px; width: 10px; height: 1.5px; background: var(--kibo-yellow); }
.kb2b-bullets--tight { gap: 8px; max-width: none; }
.kb2b-bullets--tight li { line-height: 1.5; }
.kb2b-bullets--tight li::before { top: 12px; }
#order-flow { scroll-margin-top: 96px; }
/* the post-order icon's mask (B2bIcon.astro) */
.kb2b-mask-on { fill: var(--kibo-white); stroke: none; }
.kb2b-mask-off { fill: var(--kibo-black); stroke: none; }

/* ==== ROI calculator (B2bRoi.astro) ==== */
.kb2b-roi { background: var(--kh-blue); padding: var(--ks-section-y) var(--ks-gutter); color: var(--kibo-white); }
.kb2b-roi__in { max-width: 1280px; margin: 0 auto; display: flex; flex-direction: column; gap: 40px; }
.kb2b-roi__head { display: flex; flex-direction: column; gap: 14px; max-width: 1120px; }
.kb2b-roi__h { margin: 0; font-family: var(--font-base); font-weight: 400; font-size: 31px; line-height: 1.12; letter-spacing: -.01em; color: var(--kibo-white); white-space: nowrap; }
.kb2b-roi__h strong, .kb2b-roi__lede strong { font-weight: 600; }
.kb2b-roi__lede { margin: 0; font-size: 18px; line-height: 1.42; color: var(--kibo-white); }
.kb2b-roi__frame { display: grid; grid-template-columns: minmax(0, 820px) minmax(0, 1fr); gap: 40px; align-items: start; }

/* input card */
.kb2b-roi__card { background: var(--kibo-dark-grey); border-radius: 5px; box-shadow: 0 2px 14px rgba(0,0,0,.18); padding: 22px 24px; display: flex; flex-direction: column; gap: 14px; }
.kb2b-roi__top { display: flex; align-items: center; justify-content: space-between; gap: 12px 16px; flex-wrap: wrap; margin: 0 0 2px; }
.kb2b-roi__title { margin: 0; font-family: var(--font-base); font-size: 19px; font-weight: 500; line-height: 1.3; letter-spacing: -.01em; color: var(--kibo-white); }
.kb2b-switch { display: flex; align-items: center; gap: 12px; border: 0; padding: 0; cursor: pointer; background: none; font-family: var(--font-base); color: var(--kibo-white); text-align: left; }
.kb2b-switch__label { font-size: 15px; font-weight: 500; line-height: 1.3; }
.kb2b-switch__track { position: relative; flex-shrink: 0; width: 50px; height: 30px; border-radius: 999px; background: rgba(255,255,255,.06); }
.kb2b-switch__knob { position: absolute; top: 7px; left: 7px; width: 16px; height: 16px; border-radius: 50%; background: var(--kibo-yellow); box-shadow: 0 1px 3px rgba(46,52,62,.35); transition: transform .6s cubic-bezier(.65,0,.35,1); }
.kb2b-switch[aria-checked="true"] .kb2b-switch__knob { transform: translateX(20px); }
.kb2b-switch:focus-visible { outline: 2px solid var(--kibo-yellow); outline-offset: 4px; border-radius: 4px; }

.kb2b-field { background: rgba(255,255,255,.06); border-radius: 5px; padding: 12px 16px 14px; }
.kb2b-field__top { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; line-height: 1.15; }
.kb2b-field__top--gap { margin-bottom: 8px; }
.kb2b-field__label { font-size: 14px; font-weight: 500; line-height: 1.15; color: var(--kibo-white); }
.kb2b-field__val { font-size: 20px; font-weight: 600; line-height: 1; font-variant-numeric: tabular-nums; white-space: nowrap; color: var(--kibo-white); }
.kb2b-field__help { margin: 4px 0 3px; font-size: 12px; line-height: 1.4; color: var(--kibo-white); }
.kb2b-field__foot { margin: 6px 0 0; font-size: 12px; line-height: 1.4; color: var(--kibo-white); }

/* Sliders: a 1.5px track (yellow up to the thumb, bright blue after) in a
   20px-tall input so the thumb is easy to hit, with room above and below so
   the thumb never touches the text. --kb2b-fill is set by the
   page script. */
.kb2b-range {
  --kb2b-fill: 50%;
  -webkit-appearance: none; appearance: none; display: block; width: 100%; height: 20px; margin: 10px 0 4px;
  background: transparent; cursor: pointer;
}
.kb2b-field__top--gap + .kb2b-range { margin-top: 4px; }
.kb2b-range::-webkit-slider-runnable-track { height: 1.5px; border-radius: 999px; background: linear-gradient(to right, var(--kibo-yellow) var(--kb2b-fill), var(--kibo-link) var(--kb2b-fill)); }
.kb2b-range::-webkit-slider-thumb { -webkit-appearance: none; appearance: none; width: 16px; height: 16px; margin-top: -7.25px; border: 0; border-radius: 50%; background: var(--kibo-yellow); box-shadow: 0 1px 3px rgba(46,52,62,.35); }
.kb2b-range::-moz-range-track { height: 1.5px; border-radius: 999px; background: var(--kibo-link); }
.kb2b-range::-moz-range-progress { height: 1.5px; border-radius: 999px; background: var(--kibo-yellow); }
.kb2b-range::-moz-range-thumb { width: 16px; height: 16px; border: 0; border-radius: 50%; background: var(--kibo-yellow); box-shadow: 0 1px 3px rgba(46,52,62,.35); }
.kb2b-range:focus { outline: none; }
.kb2b-range:focus-visible::-webkit-slider-thumb { box-shadow: 0 0 0 2px var(--kibo-dark-grey), 0 0 0 4px var(--kibo-white); }
.kb2b-range:focus-visible::-moz-range-thumb { box-shadow: 0 0 0 2px var(--kibo-dark-grey), 0 0 0 4px var(--kibo-white); }

/* legacy row: opens and closes with the switch */
.kb2b-roi__legacy { display: grid; grid-template-rows: 0fr; opacity: 0; margin-top: -14px; transition: grid-template-rows .7s cubic-bezier(.65,0,.35,1), opacity .5s cubic-bezier(.65,0,.35,1), margin-top .7s cubic-bezier(.65,0,.35,1); }
.kb2b-roi__legacy.is-open { grid-template-rows: 1fr; opacity: 1; margin-top: 0; }
.kb2b-roi__legacy-in { overflow: hidden; min-height: 0; }
.kb2b-roi__legacy-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }

/* result */
.kb2b-roi__result { display: flex; flex-direction: column; }
.kb2b-roi__big { position: relative; display: flex; align-items: center; gap: 20px; flex-wrap: wrap; margin: 0 0 8px; }
.kb2b-roi__num { margin: 0; font-family: var(--font-base); font-size: clamp(50px, 9vw, 74px); font-weight: 600; line-height: 1.02; letter-spacing: -.035em; font-variant-numeric: tabular-nums; color: var(--kibo-white); }
.kb2b-roi__ghost { position: absolute; margin: 0; pointer-events: none; white-space: nowrap; }
.kb2b-roi__rtitle { margin: 0; font-family: var(--font-base); font-size: 19px; font-weight: 600; line-height: 1.2; letter-spacing: -.01em; color: var(--kibo-white); }
.kb2b-roi__note { margin: 10px 0 0; font-size: 14px; line-height: 1.4; font-weight: 500; max-width: 330px; color: var(--kibo-white); }
.kb2b-roi__below { margin: 22px 0 0; padding: 16px 18px; border-radius: 5px; background: var(--kibo-white); color: var(--kibo-dark-grey); font-size: 14px; line-height: 1.6; max-width: 70ch; }
.kb2b-roi__below strong { font-weight: 600; }
.kb2b-roi__actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-top: 24px; }
.kb2b-roi__actions .kh-psec-btn { font-family: var(--font-base); cursor: pointer; }

/* report pop-up: the HubSpot form in a dialog */
.kb2b-gate { position: fixed; inset: 0; margin: auto; height: fit-content; width: min(640px, calc(100% - 32px)); max-height: calc(100vh - 48px); overflow: auto; padding: 28px 26px; border: 0; border-radius: 5px; background: var(--kibo-light-grey); color: var(--kibo-black); box-shadow: 0 24px 60px rgba(0,0,0,.28); }
.kb2b-gate::backdrop { background: rgba(20,24,30,.55); -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px); }
.kb2b-gate__close { position: absolute; top: 14px; right: 14px; width: 34px; height: 34px; border: 0; border-radius: 50%; cursor: pointer; background: var(--kibo-white); color: var(--kibo-dark-grey); display: flex; align-items: center; justify-content: center; }
/* The HubSpot form iframe: fills the dialog, rebuilt with fresh query
   params every time the popup opens. */
.kb2b-gate__frame iframe { display: block; width: 100%; height: 76vh; max-height: 720px; border: 0; background: var(--kibo-white); }
.kb2b-gate__close:hover { background: var(--kibo-grey-200); }
.kb2b-gate__close:focus-visible { outline: 2px solid var(--kibo-dark-grey); outline-offset: 2px; }
.kb2b-gate__title { margin: 0 0 5px; padding-right: 44px; font-family: var(--font-base); font-size: 19px; font-weight: 600; line-height: 1.3; color: var(--kibo-dark-grey); }
.kb2b-gate__title:focus { outline: none; }
.kb2b-gate__intro { margin: 0 0 17px; font-size: 14px; line-height: 1.45; color: var(--kibo-black); text-wrap: balance; }
.kb2b-gate__thanks .kh-psec-btn { font-family: var(--font-base); }

/* ==== Resource tiles (B2bResources.astro): the Search tiles with a document icon ==== */
.kb2b-res__icon { display: flex; align-items: flex-end; height: 72px; color: var(--kibo-dark-grey); transform: scale(1.25); transform-origin: left bottom; }
.kb2b-res__pill { fill: var(--kibo-yellow); }
.kb2b-res__date { font-size: 14px; }
.kb2b-res__tile .ks-res__type { white-space: nowrap; }

/* ==== Closing band (B2bFinalCta.astro): the homepage's .kh-finalcta with an icon and two buttons ==== */
.kb2b-finalcta__icon { width: 264px; max-width: 100%; margin: 0 auto 28px; }
.kb2b-flow { display: block; width: 100%; height: auto; overflow: visible; }
.kb2b-flow-line { fill: none; stroke: var(--kibo-white); stroke-width: 3; stroke-linejoin: miter; stroke-linecap: butt; }
.kb2b-fill-y { fill: var(--kibo-yellow); stroke: none; }
.kb2b-fill-ground { fill: var(--kh-blue); }
.kb2b-cube { stroke-width: 1; stroke-linejoin: round; stroke-opacity: .55; }
.kb2b-cube--y { fill: var(--kibo-yellow); stroke: var(--kibo-yellow); }
.kb2b-cube--b { fill: var(--kh-blue); stroke: var(--kh-blue); }
.kb2b-cube--s { fill: var(--kh-sky); stroke: var(--kh-sky); }
.kb2b-page .kb2b-finalcta h2 { max-width: 22ch; margin: 0 auto 28px; }

/* =================== Responsive =================== */

@media (max-width: 1100px) {
  .kb2b-roi__h { white-space: normal; text-wrap: balance; }
}

/* calculator: results under the inputs */
@media (max-width: 960px) {
  .kb2b-roi__frame { grid-template-columns: 1fr; }
}

@media (max-width: 760px) {
  .kb2b-band__in--benefits { padding-top: 80px; padding-bottom: 64px; }
  .kb2b-band__in--proof { padding-top: 64px; padding-bottom: 64px; }
  .kb2b-table__row { grid-template-columns: 1fr; gap: 14px; padding: 22px 0; }
  .kb2b-table .kh-anl__line { font-size: 19px; }
  .kb2b-table .kh-anl__arrow { height: 44px; }
  .kb2b-table__logo .kb2b-logo-h53 { height: 44px; }
  .kb2b-table__logo .kb2b-logo-h46 { height: 38px; }
  .kb2b-hero__kicker { font-size: 20px; }
}

@media (max-width: 640px) {
  .ks-customers.kb2b-customers { padding: 48px 0; }
  .kb2b-head__sub { font-size: 17px; }
  .kb2b-roi__card { padding: 20px 16px; }
  .kb2b-roi__lede { font-size: 17px; }
  .kb2b-gate { padding: 24px 18px; }
}

/* the two legacy sliders stack on narrow phones */
@media (max-width: 520px) {
  .kb2b-roi__legacy-grid { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  .kb2b-btn-ghost, .kb2b-switch__knob, .kb2b-roi__legacy { transition: none !important; }
}
