.bottom-tab-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 100;
  max-width: var(--app-width);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-around;
  height: calc(68px + env(safe-area-inset-bottom, 0px));
  padding: 0 var(--space-2) env(safe-area-inset-bottom, 0px);
  background: var(--bg);
  border-top: 1px solid var(--gray-800);
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
  touch-action: manipulation;
  overflow: hidden;
}

.bottom-tab-bar a,
.bottom-tab-bar button {
  -webkit-user-drag: none;
}

.tab-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--space-1);
  height: 64px;
  text-decoration: none;
  color: var(--gray-500);
  transition: color 0.15s ease;
  -webkit-tap-highlight-color: transparent;
  position: relative;
}

.tab-item:hover {
  color: var(--gray-300);
}

.tab-item.tab-active {
  color: var(--text);
}

.tab-item.tab-active .tab-icon {
  fill: currentColor;
}


.tab-ripple {
  position: absolute;
  top: 50%;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: color-mix(in srgb, var(--text) 4%, transparent);
  transform: translate(-50%, -50%) scale(0);
  animation: tab-ripple 1.35s ease-out forwards;
  pointer-events: none;
}

.tab-ripple--ring {
  background: none;
  border: 2px solid color-mix(in srgb, var(--text) 9%, transparent);
  animation-delay: 0.18s;
}

@keyframes tab-ripple {
  to {
    transform: translate(-50%, -50%) scale(45);
    opacity: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  .tab-ripple {
    animation: none;
  }
}

.tab-icon {
  width: 24px;
  height: 24px;
  flex-shrink: 0;
}

.tab-label {
  font-size: var(--type-caption);
  font-weight: 500;
  letter-spacing: 0.01em;
  line-height: 1;
}

.tab-plus {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  margin: 0 var(--space-1);
  border: none;
  border-radius: 50%;
  background: var(--btn-primary-bg);
  color: var(--btn-primary-text);
  box-shadow: 0 4px 14px var(--shadow-color);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: transform 0.15s ease;
}

.tab-plus:active {
  transform: scale(0.94);
}

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

body.has-tab-bar .flash-notifications {
  bottom: calc(68px + env(safe-area-inset-bottom, 0px) + var(--space-4));
}

body.native-app .bottom-tab-bar {
  display: none;
}

body.native-app {
  padding-bottom: 0;
}
