/* ============================================================
   Mobile bottom navigation
   ============================================================ */
:root {
  --mobile-nav-height: 3.5625rem;
  --mobile-nav-offset: calc(var(--mobile-nav-height) + env(safe-area-inset-bottom, 0px));
}

@media (max-width: 1100px) {
  :root {
    --navbar-offset: 0;
  }

  html {
    scroll-padding-top: 0;
  }

  main {
    padding-top: 0;
  }

  main > .hero:first-child:not(.home-hero) {
    margin-top: 0;
    padding-top: 0;
  }

  body.page-home main > .hero:first-child {
    margin-top: 0;
  }

  .navbar,
  .nav-overlay {
    display: none !important;
  }

  body {
    padding-bottom: var(--mobile-nav-offset);
  }

  body.nav-open,
  body.auth-modal-open,
  body.support-modal-open,
  body.mobile-catalog-open {
    padding-bottom: var(--mobile-nav-offset);
  }

  body.auth-modal-open .mobile-bottom-nav,
  body.mobile-catalog-open .mobile-bottom-nav,
  body.support-modal-open .mobile-bottom-nav {
    z-index: 3000;
    pointer-events: auto;
    visibility: visible;
    box-shadow: 0 -1px 0 #e5e7eb, 0 -10px 28px rgba(15, 23, 42, 0.1);
  }

  .mobile-bottom-nav {
    position: fixed;
    right: 0;
    left: 0;
    bottom: 0;
    z-index: 1040;
    display: flex !important;
    align-items: flex-start;
    justify-content: space-between;
    width: 100%;
    padding-bottom: env(safe-area-inset-bottom, 0px);
    background: #fff;
    border-top: 1px solid #e5e7eb;
    box-shadow: none;
    box-sizing: border-box;
  }

  .mobile-bottom-nav .mobile-nav-item {
    flex: 1 1 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.125rem;
    min-width: 0;
    height: var(--mobile-nav-height);
    margin: 0;
    padding: 0.375rem 0.125rem 0.3125rem;
    border: 0;
    border-radius: 0;
    background: transparent;
    color: #9ca3af;
    text-decoration: none;
    font-family: inherit;
    font-weight: 500;
    line-height: 1.1;
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    transition: color 0.15s ease;
    -webkit-tap-highlight-color: transparent;
    flex-shrink: 0;
  }

  .mobile-bottom-nav .mobile-nav-item:hover,
  .mobile-bottom-nav .mobile-nav-item:focus-visible {
    color: #111827;
    outline: none;
  }

  .mobile-bottom-nav .mobile-nav-item.is-active,
  .mobile-bottom-nav .mobile-nav-item--menu.is-open {
    color: #111827;
  }

  .mobile-bottom-nav .mobile-nav-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 1.375rem;
    height: 1.375rem;
    flex-shrink: 0;
    color: inherit;
  }

  .mobile-bottom-nav .mobile-nav-icon svg {
    display: block;
    width: 1.375rem;
    height: 1.375rem;
    color: inherit;
  }

  .mobile-bottom-nav .mobile-nav-label {
    display: block;
    font-size: 0.65625rem;
    font-weight: 500;
    line-height: 1.15;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
    color: inherit;
  }

  .mobile-bottom-nav .mobile-nav-item[aria-disabled="true"] {
    pointer-events: none;
    opacity: 0.55;
  }

  .support-modal-dialog {
    max-height: min(88vh, calc(100vh - var(--mobile-nav-offset) - 1.5rem));
  }

  .auth-modal-dialog {
    max-height: min(92vh, calc(100vh - var(--mobile-nav-offset) - 1rem));
  }

  .site-footer {
    margin-bottom: 0;
  }
}

@media (min-width: 1101px) {
  .mobile-bottom-nav {
    display: none !important;
  }
}

@media (max-width: 380px) {
  .mobile-bottom-nav .mobile-nav-label {
    font-size: 0.625rem;
  }

  .mobile-bottom-nav .mobile-nav-icon svg {
    width: 1.25rem;
    height: 1.25rem;
  }
}
