/* Fixed mobile dock. data-tab and active class are shared by click and swipe navigation. */

.fs-bottom-nav {
  position: fixed;
  z-index: 100;
  left: 50%;
  bottom: max(10px, env(safe-area-inset-bottom));
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 2px;
  width: min(calc(100% - 20px), 420px);
  min-height: 64px;
  padding: 6px;
  border: 1px solid rgba(71, 85, 105, 0.72);
  border-radius: 21px;
  background: rgba(8, 18, 34, 0.94);
  box-shadow:
    0 18px 46px rgba(0, 0, 0, 0.58),
    inset 0 1px 0 rgba(255, 255, 255, 0.025);
  backdrop-filter: blur(18px);
  transform: translateX(-50%);
}

.fs-bottom-hidden {
  display: none;
}

body.fs-upgrade-open .fs-bottom-nav {
  visibility: hidden;
  pointer-events: none;
}

.fs-bottom-item {
  position: relative;
  display: flex;
  min-width: 0;
  min-height: 51px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  padding: 4px 1px 3px;
  border: 0;
  border-radius: 14px;
  background: transparent;
  color: #64748b;
  cursor: pointer;
  transition: color 150ms ease, background 150ms ease, transform 150ms ease;
}

.fs-bottom-item::before {
  position: absolute;
  top: 2px;
  left: 50%;
  width: 18px;
  height: 2px;
  border-radius: 999px;
  background: #38bdf8;
  content: "";
  opacity: 0;
  transform: translateX(-50%) scaleX(0.45);
  transition: opacity 150ms ease, transform 150ms ease;
}

.fs-bottom-icon {
  display: grid;
  width: 30px;
  height: 29px;
  place-items: center;
  border-radius: 10px;
  transition: color 150ms ease, background 150ms ease, transform 150ms ease;
}

.fs-bottom-icon svg {
  width: 19px;
  height: 19px;
  overflow: visible;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.75;
}

.fs-bottom-label {
  max-width: 100%;
  overflow: hidden;
  color: inherit;
  font-size: 9px;
  font-weight: 650;
  line-height: 1.15;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.fs-bottom-item:hover {
  color: #cbd5e1;
}

.fs-bottom-item:active {
  transform: scale(0.97);
}

.fs-bottom-item:focus-visible {
  outline: 2px solid rgba(56, 189, 248, 0.75);
  outline-offset: -2px;
}

.fs-bottom-item-active {
  background: linear-gradient(180deg, rgba(14, 165, 233, 0.13), rgba(30, 64, 175, 0.06));
  color: #e0f2fe;
}

.fs-bottom-item-active::before {
  opacity: 1;
  transform: translateX(-50%) scaleX(1);
}

.fs-bottom-item-active .fs-bottom-icon {
  background: rgba(14, 165, 233, 0.12);
  color: #38bdf8;
  transform: translateY(-1px);
}

.fs-bottom-item-active .fs-bottom-label {
  color: #f8fafc;
}

@media (max-width: 360px) {
  .fs-bottom-nav {
    width: calc(100% - 14px);
    padding: 5px 4px;
  }

  .fs-bottom-label {
    font-size: 8px;
  }

  .fs-bottom-icon {
    width: 28px;
  }
}
