.mobile-bottom-nav {
  display: none;
}

@media screen and (max-width: 767px) {
  :root {
    --mobile-bottom-nav-height: 72px;
  }

  body {
    padding-bottom: calc(var(--mobile-bottom-nav-height) + env(safe-area-inset-bottom, 0px));
  }

  .app-wrapper .app-content {
    min-height: calc(100vh - var(--mobile-bottom-nav-height));
  }

  .mobile-bottom-nav {
    position: fixed;
    right: 10px;
    bottom: 10px;
    left: 10px;
    z-index: 1040;
    display: grid;
    width: auto !important;
    max-width: none;
    box-sizing: border-box;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    align-items: end;
    height: var(--mobile-bottom-nav-height);
    padding: 7px 6px calc(7px + env(safe-area-inset-bottom, 0px));
    border: 1px solid rgba(var(--dark), 0.08);
    border-radius: 22px;
    background: rgba(var(--white), 0.96);
    box-shadow: 0 12px 35px rgba(var(--dark), 0.16);
    -webkit-backdrop-filter: blur(16px);
    backdrop-filter: blur(16px);
  }

  .mobile-bottom-nav__item {
    position: relative;
    display: flex;
    min-width: 0;
    min-height: 52px;
    padding: 5px 2px;
    align-items: center;
    justify-content: flex-end;
    flex-direction: column;
    gap: 3px;
    border-radius: 14px;
    color: rgba(var(--dark), 0.58);
    font-size: 10px;
    font-weight: 600;
    line-height: 1.2;
    text-align: center;
    text-decoration: none;
    transition: color 160ms ease, background-color 160ms ease, transform 160ms ease;
    -webkit-tap-highlight-color: transparent;
  }

  .mobile-bottom-nav__item > i {
    font-size: 22px;
    line-height: 1;
  }

  .mobile-bottom-nav__item > span:last-child {
    width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .mobile-bottom-nav__item:hover,
  .mobile-bottom-nav__item:focus-visible,
  .mobile-bottom-nav__item.is-active {
    color: rgba(var(--primary), 1);
  }

  .mobile-bottom-nav__item.is-active:not(.mobile-bottom-nav__item--primary) {
    background: rgba(var(--primary), 0.09);
  }

  .mobile-bottom-nav__item:active {
    transform: scale(0.95);
  }

  .mobile-bottom-nav__item--primary {
    overflow: visible;
    color: rgba(var(--primary), 1);
  }

  .mobile-bottom-nav__primary-icon {
    display: grid;
    width: 48px !important;
    height: 48px;
    margin-top: -27px;
    overflow: visible !important;
    place-items: center;
    border: 5px solid rgba(var(--white), 1);
    border-radius: 50%;
    color: rgba(var(--white), 1);
    background: rgba(var(--primary), 1);
    box-shadow: 0 8px 18px rgba(var(--primary), 0.32);
  }

  .mobile-bottom-nav__primary-icon i {
    font-size: 25px;
  }

  .mobile-bottom-nav__item--primary.is-active .mobile-bottom-nav__primary-icon {
    background: rgba(var(--secondary), 1);
    box-shadow: 0 8px 18px rgba(var(--secondary), 0.3);
  }

  .go-top {
    bottom: calc(var(--mobile-bottom-nav-height) + 22px) !important;
  }

  .app-wrapper footer {
    margin-bottom: 4px;
  }
}

@media screen and (max-width: 360px) {
  .mobile-bottom-nav {
    right: 6px;
    left: 6px;
  }

  .mobile-bottom-nav__item {
    font-size: 9px;
  }

  .mobile-bottom-nav__item > i {
    font-size: 20px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .mobile-bottom-nav__item {
    transition: none;
  }
}
