/* Mobile floating dock — frosted glass, matches brand red / Inter */
/* Served directly until next Vite production build includes the @import in app.css */

.mobile-bottom-nav {
  --mbn-height: 54px;
  --mbn-gap: 10px;
  --mbn-radius: 20px;
  --mbn-fg: #5b6570;
  --mbn-fg-active: var(--color-primary, #c8102e);
  --mbn-shadow: 0 10px 28px rgb(15 23 42 / 0.14), 0 2px 6px rgb(15 23 42 / 0.06);
  display: none;
  position: fixed;
  left: 50%;
  bottom: calc(var(--mbn-gap) + env(safe-area-inset-bottom, 0px));
  z-index: 55;
  width: min(calc(100vw - 28px), 328px);
  transform: translateX(-50%) translateZ(0);
  pointer-events: none;
}

.mobile-bottom-nav__list {
  pointer-events: auto;
  display: grid;
  grid-template-columns: repeat(var(--mbn-cols, 4), minmax(0, 1fr));
  align-items: stretch;
  gap: 0;
  margin: 0;
  padding: 4px;
  list-style: none;
  min-height: var(--mbn-height);
  border-radius: var(--mbn-radius);
  border: 1px solid rgb(255 255 255 / 0.55);
  background: linear-gradient(
      180deg,
      rgb(255 255 255 / 0.78) 0%,
      rgb(255 255 255 / 0.62) 100%
    );
  box-shadow: var(--mbn-shadow), inset 0 1px 0 rgb(255 255 255 / 0.72);
  backdrop-filter: blur(22px) saturate(170%);
  -webkit-backdrop-filter: blur(22px) saturate(170%);
}

.mobile-bottom-nav__item {
  min-width: 0;
}

.mobile-bottom-nav__btn {
  display: flex;
  width: 100%;
  height: 100%;
  min-height: calc(var(--mbn-height) - 8px);
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  margin: 0;
  padding: 4px 2px;
  border: 0;
  border-radius: 16px;
  background: transparent;
  color: var(--mbn-fg);
  text-decoration: none;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition:
    color 0.2s ease,
    background-color 0.2s ease,
    transform 0.22s cubic-bezier(0.22, 1, 0.36, 1);
}

.mobile-bottom-nav__icon {
  display: inline-flex;
  width: 20px;
  height: 20px;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: transform 0.22s cubic-bezier(0.22, 1, 0.36, 1);
}

.mobile-bottom-nav__icon svg,
.mobile-bottom-nav__svg {
  display: block;
  width: 18px;
  height: 18px;
}

.mobile-bottom-nav__label {
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-family: var(
    --font-sans,
    "Inter",
    "PingFang SC",
    "Microsoft YaHei",
    sans-serif
  );
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.01em;
  line-height: 1.15;
}

.mobile-bottom-nav__btn:hover,
.mobile-bottom-nav__btn:focus-visible {
  color: var(--mbn-fg-active);
  outline: none;
}

.mobile-bottom-nav__btn:focus-visible {
  box-shadow: 0 0 0 2px rgb(200 16 46 / 0.28);
}

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

.mobile-bottom-nav__item.is-active .mobile-bottom-nav__btn {
  color: var(--mbn-fg-active);
}

.mobile-bottom-nav__item.is-active .mobile-bottom-nav__icon {
  transform: translateY(-0.5px);
}

/* Inquiry CTA — compact brand pill */
.mobile-bottom-nav__item--inquiry .mobile-bottom-nav__btn {
  color: #fff;
  background: linear-gradient(
    145deg,
    var(--color-primary, #c8102e) 0%,
    #a50d25 100%
  );
  box-shadow:
    0 6px 14px rgb(200 16 46 / 0.28),
    inset 0 1px 0 rgb(255 255 255 / 0.22);
}

.mobile-bottom-nav__item--inquiry .mobile-bottom-nav__btn:hover,
.mobile-bottom-nav__item--inquiry .mobile-bottom-nav__btn:focus-visible {
  color: #fff;
  background: linear-gradient(145deg, #a50d25 0%, var(--color-primary, #c8102e) 100%);
}

.mobile-bottom-nav__item--inquiry .mobile-bottom-nav__label {
  font-weight: 700;
}

/* WhatsApp soft green tint on active press only */
.mobile-bottom-nav__item--whatsapp .mobile-bottom-nav__btn:hover,
.mobile-bottom-nav__item--whatsapp .mobile-bottom-nav__btn:focus-visible {
  color: #1faa55;
}

@media (max-width: 1023px) {
  .mobile-bottom-nav {
    display: block;
    animation: mobile-bottom-nav-in 0.45s cubic-bezier(0.22, 1, 0.36, 1) both;
  }

  body {
    /* Dock height 54 + bottom gap 10 + breathing room 12 */
    padding-bottom: calc(76px + env(safe-area-inset-bottom, 0px));
  }

  body.mobile-nav-open .mobile-bottom-nav {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition:
      opacity 0.2s ease,
      visibility 0.2s ease;
  }
}

@media (prefers-reduced-motion: reduce) {
  .mobile-bottom-nav {
    animation: none;
  }

  .mobile-bottom-nav__btn,
  .mobile-bottom-nav__icon {
    transition: none;
  }
}

@keyframes mobile-bottom-nav-in {
  from {
    opacity: 0;
    transform: translateX(-50%) translateY(16px);
  }

  to {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
  }
}

/* Very small phones: tighten dock */
@media (max-width: 360px) {
  .mobile-bottom-nav {
    width: min(calc(100vw - 16px), 328px);
    --mbn-height: 50px;
  }

  .mobile-bottom-nav__label {
    font-size: 9px;
  }

  .mobile-bottom-nav__icon svg,
  .mobile-bottom-nav__svg {
    width: 16px;
    height: 16px;
  }
}
