.mobile-tabbar-shell {
  --mobile-tabbar-bg: #0a0e14;
  --mobile-tabbar-line-soft: #1e2836;
  --mobile-tabbar-text-mute: #5a6578;
  --mobile-tabbar-accent: #c9f13b;
  --mobile-tabbar-accent-bg: rgba(201, 241, 59, 0.1);
  --mobile-tabbar-text: #f4f6f9;
}

.mobile-tabbar-shell--inline {
  display: block;
  flex-shrink: 0;
}

.mobile-tabbar-shell--fixed {
  display: none;
}

.mobile-tabbar-shell .tabbar {
  flex-shrink: 0;
  background: rgba(10, 14, 20, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-top: 1px solid var(--mobile-tabbar-line-soft);
  padding: 8px 8px 22px;
  display: grid;
  grid-template-columns: repeat(var(--mobile-tabbar-count, 4), 1fr);
  gap: 2px;
}

.mobile-tabbar-shell .tab {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  padding: 8px 4px;
  color: var(--mobile-tabbar-text-mute);
  font-family: "Inter", system-ui, sans-serif;
  font-size: 10px;
  font-weight: 500;
  line-height: 1.2;
  cursor: pointer;
  border-radius: 10px;
  transition: color 0.2s ease, background-color 0.2s ease;
}

.mobile-tabbar-shell .tab-icon-wrap {
  position: relative;
  display: inline-grid;
  place-items: center;
}

.mobile-tabbar-shell .tab-badge {
  position: absolute;
  top: -4px;
  right: -8px;
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  border-radius: 999px;
  background: var(--mobile-tabbar-accent);
  color: var(--mobile-tabbar-bg);
  font-size: 9px;
  font-weight: 700;
  line-height: 16px;
  text-align: center;
  box-shadow: 0 0 0 2px var(--mobile-tabbar-bg);
}

.mobile-tabbar-shell .tab-badge.is-bumped {
  animation: commerce-tab-badge-bump 0.55s ease;
}

.mobile-tabbar-shell .tab.active {
  color: var(--mobile-tabbar-accent);
}

.mobile-tabbar-shell .tab:focus-visible {
  outline: none;
  background: var(--mobile-tabbar-accent-bg);
  color: var(--mobile-tabbar-accent);
}

@keyframes commerce-tab-badge-bump {
  0%,
  100% {
    transform: scale(1);
  }

  35% {
    transform: scale(1.18);
  }

  65% {
    transform: scale(0.94);
  }
}

@media (max-width: 768px) {
  body.has-mobile-tabbar {
    padding-bottom: calc(5rem + env(safe-area-inset-bottom, 0px));
  }

  .mobile-tabbar-shell--fixed {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 995;
    display: block;
    background: rgba(10, 14, 20, 0.85);
  }

  .mobile-tabbar-shell--fixed .tabbar {
    padding-bottom: calc(22px + env(safe-area-inset-bottom, 0px));
  }

  body.menu-open .mobile-tabbar-shell--fixed,
  body.tun-lightbox-open .mobile-tabbar-shell--fixed {
    opacity: 0;
    transform: translateY(0.5rem);
    pointer-events: none;
  }
}
