/* Keep listing navigation together without changing other public pages. */
@media screen and (max-width: 900px) {
  html.fv-listing-page,
  html.fv-listing-page body {
    /* hidden creates a separate scroll container and prevents viewport stickiness. */
    overflow-x: clip;
    overflow-y: visible;
  }

  html.fv-listing-page:has(body.ms-public-menu-open) {
    overflow-y: hidden;
  }

  html.fv-listing-page {
    --fv-listing-header-height: calc(65px + env(safe-area-inset-top, 0px));
    scroll-padding-top: calc(var(--fv-listing-header-height) + 60px);
  }

  html.fv-listing-page .ms-public-header {
    position: sticky;
    top: 0;
    z-index: 15000;
    background: #fff;
  }

  html.fv-listing-page .ms-public-header .header-inner {
    width: calc(100% - 32px);
    min-height: 64px;
    padding-block: 10px;
    flex-direction: row;
    flex-wrap: nowrap;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
  }

  html.fv-listing-page .ms-public-header .fv-brand-wrap {
    min-width: 0;
    flex: 0 1 130px;
  }

  html.fv-listing-page .ms-public-header .brand {
    display: flex;
    min-width: 0;
    max-width: 100%;
  }

  html.fv-listing-page .ms-public-header img.site-logo {
    display: block;
    width: 130px !important;
    height: 44px !important;
    max-width: 100%;
    object-fit: contain;
    object-position: left center;
  }

  html.fv-listing-page .ms-public-header .ms-public-tools {
    flex: 0 0 auto;
    margin-left: auto;
    gap: 8px;
  }

  html.fv-listing-page .ms-public-header .ms-public-menu {
    display: none !important;
    position: absolute !important;
    inset: 100% 12px auto;
    margin: 0;
    padding: 12px;
    background: #fff;
    border: 1px solid #bac9c2;
    border-radius: 8px;
    box-shadow: 0 12px 28px #102f2b20;
    max-height: calc(100dvh - var(--fv-listing-header-height) - 16px);
    overflow-y: auto;
  }

  html.fv-listing-page .ms-public-header.is-open .ms-public-menu {
    display: flex !important;
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
  }

  html.fv-listing-page .ms-public-header .fv-more-panel {
    position: static;
    width: auto;
    border: 0;
    box-shadow: none;
  }

  html.fv-listing-page .listing-return-bar {
    position: sticky;
    top: 0;
    z-index: 9000;
    margin: 0;
    padding: 6px 0;
    background: #fff;
    border-bottom: 1px solid #bac9c2;
    box-shadow: 0 3px 8px #102f2b0d;
  }

  html.fv-listing-page.fv-listing-header-ready .listing-return-bar {
    top: var(--fv-listing-header-height);
  }

  html.fv-listing-page .listing-return-bar .listing-return-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    max-width: 100%;
    padding: 9px 14px;
    border: 1px solid #075b47;
    border-radius: 6px;
    background: #075b47;
    color: #fff !important;
    font-size: 14px;
    line-height: 1.35;
    font-weight: 700;
    letter-spacing: 0;
    text-decoration: none;
    overflow-wrap: anywhere;
  }

  html.fv-listing-page .listing-return-link:focus-visible {
    outline: 3px solid #007cac;
    outline-offset: 2px;
  }

  html.fv-listing-page .listing-report-modal {
    z-index: 16010;
  }
}
