/* Monserrato mobile app shell v1.0.0 - scoped to the bottom tab bar.
   Header offsets are synchronized to the actual fixed header by mobile-pwa.js. */
/* First-paint header heights: eliminate light bands before defer scripts execute.
   mobile-pwa.js subsequently measures the real expanded height subpixel-accurately. */
html:root { --ms-header-offset: 119.156px; }
@media (max-width: 991px) { html:root { --ms-header-offset: 116.797px; } }
@media (max-width: 767px) { html:root { --ms-header-offset: 100.844px; } }
@media (max-width: 620px) { html:root { --ms-header-offset: 97.5px; } }
@media (max-width: 532px) { html:root { --ms-header-offset: 111px; } }

#ms-mobile-tabs { display: none; }
@media (max-width: 991px) {
  :root { --ms-mobile-tabs-height: 72px; }
  body { padding-bottom: calc(var(--ms-mobile-tabs-height) + env(safe-area-inset-bottom, 0px)) !important; }
  #ms-mobile-tabs.ms-mobile-tabs {
    position: fixed !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    z-index: 1005 !important;
    display: grid !important;
    grid-template-columns: repeat(5, minmax(0, 1fr)) !important;
    align-items: center;
    width: 100%;
    height: calc(var(--ms-mobile-tabs-height) + env(safe-area-inset-bottom, 0px));
    margin: 0 !important;
    padding: 5px max(4px, env(safe-area-inset-right, 0px)) calc(5px + env(safe-area-inset-bottom, 0px)) max(4px, env(safe-area-inset-left, 0px)) !important;
    border: 0 !important;
    border-top: 1px solid #dbe4e9 !important;
    border-radius: 0 !important;
    background: #fff !important;
    color: #455d70 !important;
    box-shadow: 0 -5px 20px rgba(7, 26, 44, .10);
    font-family: Inter, system-ui, -apple-system, "Segoe UI", sans-serif !important;
    -webkit-font-smoothing: antialiased;
    box-sizing: border-box;
    isolation: isolate;
  }
  #ms-mobile-tabs .ms-mobile-tab {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 4px;
    padding: 5px 2px !important;
    min-width: 0 !important;
    min-height: 51px !important;
    width: 100% !important;
    height: 100%;
    margin: 0 !important;
    background: transparent !important;
    color: #566b7c !important;
    border: 0 !important;
    border-radius: 11px !important;
    box-shadow: none !important;
    text-align: center;
    text-decoration: none !important;
    font-family: inherit !important;
    font-weight: 650 !important;
    font-size: 11px !important;
    line-height: 1.1 !important;
    letter-spacing: 0 !important;
    text-transform: none !important;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
    box-sizing: border-box;
  }
  #ms-mobile-tabs .ms-mobile-tab > svg {
    display: block !important;
    height: 23px !important;
    width: 23px !important;
    min-width: 23px !important;
    max-width: 23px !important;
    flex: 0 0 23px;
    color: inherit !important;
    stroke: currentColor !important;
    fill: none !important;
    overflow: visible;
  }
  #ms-mobile-tabs .ms-mobile-tab > span {
    display: block !important;
    width: 100%;
    min-width: 0;
    max-width: 100%;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    color: inherit !important;
    font: inherit !important;
    line-height: 1.15 !important;
    text-align: center;
  }
  #ms-mobile-tabs .ms-mobile-tab:hover,
  #ms-mobile-tabs .ms-mobile-tab:focus-visible,
  #ms-mobile-tabs .ms-mobile-tab.is-active {
    background: #fff2ec !important;
    color: #ae3212 !important;
  }
  #ms-mobile-tabs .ms-mobile-tab.is-active { font-weight: 800 !important; }
  #ms-mobile-tabs .ms-mobile-tab:focus-visible {
    outline: 2px solid #c93812 !important;
    outline-offset: -2px !important;
  }
  body.ms-bottom-nav-menu-open #ms-mobile-tabs,
  body.ms-mobile-keyboard-open #ms-mobile-tabs {
    visibility: hidden !important;
    pointer-events: none !important;
  }
  /* The Monsy launcher is lifted above the tab bar. Chat dialogs remain above the bar. */
  #soc-master-widget {
    --soc-offset-y: calc(93px + env(safe-area-inset-bottom, 0px)) !important;
  }
  body.ms-mobile-keyboard-open #soc-master-widget {
    --soc-offset-y: calc(12px + env(safe-area-inset-bottom, 0px)) !important;
  }
}
@media (max-width: 360px) {
  #ms-mobile-tabs .ms-mobile-tab { gap: 3px; font-size: 10.5px !important; }
  #ms-mobile-tabs .ms-mobile-tab > svg { width: 22px !important; height: 22px !important; }
}
@media (min-width: 992px) {
  #ms-mobile-tabs { display: none !important; }
}
@media (prefers-reduced-motion: reduce) {
  #ms-mobile-tabs *, #ms-mobile-tabs *::before, #ms-mobile-tabs *::after { animation: none !important; transition: none !important; }
}
