/* Основная навигация: в центре шапки (десктоп) + снизу (мобилка) */

.desktop-nav {
  display: none;
}

.mobile-nav {
  display: none;
}

@media (min-width: 721px) {
  .desktop-nav {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: nowrap;
    gap: 4px;
    padding: 0;
    background: transparent;
    border: 0;
  }

  .desktop-nav__item {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 12px;
    border-radius: 999px;
    color: #666;
    text-decoration: none;
    font-size: 14px;
    font-weight: 700;
    white-space: nowrap;
  }

  .desktop-nav__item:hover {
    background: rgba(255, 255, 255, 0.42);
    color: #334155;
  }

  .desktop-nav__item.active {
    color: #000;
    background: rgba(37, 99, 235, 0.1);
  }

  .desktop-nav__item .icon {
    font-size: 18px;
    line-height: 1;
  }

  .desktop-nav .badge {
    position: absolute;
    top: 2px;
    right: 4px;
    min-width: 18px;
    height: 18px;
    border-radius: 999px;
    background: #2563eb;
    color: #fff;
    font-size: 11px;
    font-weight: 900;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 5px;
    line-height: 1;
  }
}

@media (max-width: 720px) {
  .topbar-center {
    display: none;
  }

  body.has-app-nav {
    padding-bottom: calc(68px + env(safe-area-inset-bottom, 0px));
  }

  .mobile-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    display: flex;
    justify-content: space-around;
    padding: 8px 0 calc(12px + env(safe-area-inset-bottom, 0px));
    background: var(--header-shell-bg, rgba(248, 250, 252, 0.72));
    -webkit-backdrop-filter: blur(var(--header-shell-blur, 12px));
    backdrop-filter: blur(var(--header-shell-blur, 12px));
    border-top: 1px solid var(--header-shell-border, rgba(148, 163, 184, 0.28));
    z-index: 1000;
  }

  .mobile-nav a {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 56px;
    color: #666;
    text-decoration: none;
    font-size: 12px;
    font-weight: 700;
  }

  .mobile-nav a.active {
    color: #000;
  }

  .mobile-nav .icon {
    font-size: 24px;
    line-height: 1;
  }

  .mobile-nav .label {
    margin-top: 2px;
    line-height: 1.1;
  }

  .mobile-nav .badge {
    position: absolute;
    top: -2px;
    right: 8px;
    min-width: 18px;
    height: 18px;
    border-radius: 999px;
    background: #2563eb;
    color: #fff;
    font-size: 11px;
    font-weight: 900;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 5px;
    line-height: 1;
  }
}
