/* ------------------------------------------------------------------
   Floating "liquid glass" bottom tab bar.
   Markup is rendered by the Wedding Manager plugin (class-tab-bar.php);
   this file is responsible for all of its appearance and scroll behaviour.
------------------------------------------------------------------ */

.wm-tabbar {
  position: fixed;
  left: 50%;
  transform: translateX(-50%);
  bottom: calc(14px + env(safe-area-inset-bottom, 0px));
  z-index: 9999;

  /* Sit inside the screen edges; cap width on larger screens. */
  width: calc(100% - 24px);
  max-width: 560px;

  box-sizing: border-box;
  border-radius: var(--w-radius-pill);

  /* Liquid glass surface */
  background: rgba(255, 255, 255, 0.6);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  border: 1px solid rgba(255, 255, 255, 0.55);
  box-shadow:
    0 8px 30px rgba(63, 70, 56, 0.18),
    inset 0 1px 0 rgba(255, 255, 255, 0.6);

  overflow: hidden;
}

/* Graceful fallback where backdrop-filter is unsupported: opaque-ish surface. */
@supports not ((-webkit-backdrop-filter: blur(1px)) or (backdrop-filter: blur(1px))) {
  .wm-tabbar { background: rgba(255, 255, 255, 0.92); }
}

.wm-tabbar__scroll {
  display: flex;
  align-items: stretch;
  gap: 2px;
  padding: 8px 10px;

  overflow-x: auto;
  scroll-snap-type: x proximity;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;            /* Firefox */

  /* Fade masks at the edges to signal there is more to scroll. */
  -webkit-mask-image: linear-gradient(to right, transparent 0, #000 18px, #000 calc(100% - 18px), transparent 100%);
  mask-image: linear-gradient(to right, transparent 0, #000 18px, #000 calc(100% - 18px), transparent 100%);
}
.wm-tabbar__scroll::-webkit-scrollbar { display: none; } /* Safari/Chrome */

.wm-tabbar__item {
  flex: 0 0 auto;
  scroll-snap-align: center;

  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;

  min-width: 60px;
  padding: 8px 10px;
  border-radius: 16px;

  color: var(--w-text-secondary);
  text-align: center;
  text-decoration: none;
  transition: color 0.15s ease, background-color 0.15s ease;
}

.wm-tabbar__item:hover,
.wm-tabbar__item:focus { color: var(--w-text-primary); }

.wm-tabbar__icon {
  width: 24px;
  height: 24px;
  display: block;
}
.wm-tabbar__icon svg {
  width: 100%;
  height: 100%;
  display: block;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.wm-tabbar__label {
  font-family: "EB Garamond", Georgia, serif;
  font-size: 0.72rem;
  line-height: 1;
  letter-spacing: 0.2px;
  white-space: nowrap;
}

/* Active page: olive text, no fill */
.wm-tabbar__item.is-active {
  color: var(--w-heritage-olive);
}
.wm-tabbar__item.is-active:hover,
.wm-tabbar__item.is-active:focus { color: var(--w-heritage-olive); }

/* Logout sits apart visually */
.wm-tabbar__item--logout { color: var(--w-text-accent); }
.wm-tabbar__item--logout:hover { color: var(--w-burnished-copper); }
