/*
 * Kay Sticky Header Offset
 * Oxygen header selector: .ks-header
 *
 * The JavaScript measures the closed visible header row and stores the
 * result in --ks-fixed-header-offset.
 */

:root {
  --ks-fixed-header-offset: 118px;
}

@media (max-width: 1279px) {
  /*
   * A fixed header is outside normal document flow.
   * Reserve the same amount of space at the top of the page.
   */
  body:not(.oxygen-builder-body) {
    padding-top: var(--ks-fixed-header-offset, 118px) !important;
  }

  /*
   * Anchor links such as comparison, applications and support should
   * stop below the fixed header rather than behind it.
   */
  html {
    scroll-padding-top: calc(var(--ks-fixed-header-offset, 118px) + 16px);
  }

  body:not(.oxygen-builder-body) section[id],
  body:not(.oxygen-builder-body) [id^="kcap-"],
  body:not(.oxygen-builder-body) [id^="kcs-"] {
    scroll-margin-top: calc(var(--ks-fixed-header-offset, 118px) + 16px);
  }
}

/* Short landscape devices normally use a more compact header. */
@media (max-width: 1279px) and (orientation: landscape) and (max-height: 700px) {
  :root {
    --ks-fixed-header-offset: 82px;
  }
}

/* Do not add artificial spacing inside the Oxygen editor canvas. */
body.oxygen-builder-body {
  padding-top: 0 !important;
}
