:root {
  --mobile-bottom-nav-h: 4.35rem;
}

.mobile-bottom-nav {
  display: none;
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  width: 100%;
  z-index: 10001;
  pointer-events: auto;
}

.mobile-bottom-nav__shell {
  position: relative;
  pointer-events: auto;
  padding: 0.35rem 0.65rem calc(0.55rem + env(safe-area-inset-bottom, 0px));
  background: var(--elevated);
  background: color-mix(in srgb, var(--elevated) 96%, transparent);
  border-top: 1px solid rgba(128, 128, 128, 0.12);
  box-shadow: 0 -10px 32px rgba(15, 23, 42, 0.1);
  backdrop-filter: blur(16px) saturate(160%);
  -webkit-backdrop-filter: blur(16px) saturate(160%);
}

.mobile-bottom-nav__curve {
  position: absolute;
  top: -1.35rem;
  left: 50%;
  width: 4.75rem;
  height: 2.35rem;
  transform: translateX(-50%);
  background: var(--elevated);
  background: color-mix(in srgb, var(--elevated) 96%, transparent);
  border: 1px solid rgba(128, 128, 128, 0.12);
  border-bottom: none;
  border-radius: 4.75rem 4.75rem 0 0;
  box-shadow: 0 -6px 18px rgba(15, 23, 42, 0.06);
}

.mobile-bottom-nav__curve::before {
  content: "";
  position: absolute;
  inset: 0.55rem 0.85rem auto;
  height: 0.55rem;
  border-radius: 999px;
  background: color-mix(in srgb, var(--accent) 14%, transparent);
}

.mobile-bottom-nav__inner {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  align-items: end;
  gap: 0.15rem;
  max-width: 32rem;
  margin: 0 auto;
}

.mobile-bottom-nav__item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.2rem;
  min-height: 2.85rem;
  padding: 0.15rem 0.2rem 0;
  color: var(--text-2);
  text-decoration: none;
  font-size: 0.625rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  transition: color 0.2s ease, transform 0.2s ease;
}

.mobile-bottom-nav__item:hover,
.mobile-bottom-nav__item.is-active {
  color: var(--accent);
}

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

.mobile-bottom-nav__item--whatsapp.is-active,
.mobile-bottom-nav__item--whatsapp:hover {
  color: #25d366;
}

.mobile-bottom-nav__icon {
  display: grid;
  place-items: center;
  width: 1.35rem;
  height: 1.35rem;
}

.mobile-bottom-nav__label {
  line-height: 1.1;
  white-space: nowrap;
}

.mobile-bottom-nav__search {
  position: relative;
  z-index: 5;
  justify-self: center;
  align-self: start;
  display: grid;
  place-items: center;
  width: 3rem;
  height: 3rem;
  margin-top: -1.55rem;
  border: none;
  border-radius: 50%;
  background: linear-gradient(145deg, var(--accent), var(--accent-hover));
  color: #fff;
  box-shadow:
    0 10px 22px rgba(15, 39, 68, 0.24),
    0 0 0 4px color-mix(in srgb, var(--bg) 88%, transparent);
  cursor: pointer;
  pointer-events: auto;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.mobile-bottom-nav__search:hover {
  transform: translateY(-1px);
  box-shadow:
    0 14px 26px rgba(15, 39, 68, 0.28),
    0 0 0 4px color-mix(in srgb, var(--bg) 88%, transparent);
}

.mobile-bottom-nav__search:active {
  transform: scale(0.96);
}

.mobile-bottom-nav__search-ring {
  position: absolute;
  inset: -0.35rem;
  border-radius: 50%;
  border: 2px solid color-mix(in srgb, var(--accent) 22%, transparent);
  opacity: 0.85;
  pointer-events: none;
}

@media (max-width: 1023px) {
  body {
    padding-bottom: calc(var(--mobile-bottom-nav-h) + env(safe-area-inset-bottom, 0px));
  }

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

  .floating-action--whatsapp {
    display: none;
  }

  .floating-action--top {
    bottom: calc(var(--mobile-bottom-nav-h) + env(safe-area-inset-bottom, 0px) + 0.65rem);
  }
}

@media (min-width: 1024px) {
  .mobile-bottom-nav {
    display: none;
  }
}
