/* ==========================================================================
   LIQUID BOTTOM NAV — Lovish Rental Hub
   Adapted from the Meniscus liquid-nav component, re-skinned to the site's
   own brand palette. Each tab carries its own accent (--acc, set inline in
   the HTML), so the bead and label recolour live as it travels between
   tabs — same trick the source component uses, just tuned to five brand
   tones instead of one.

   Structure (unchanged from the source component):
     .liquid-dock          the bar, fixed flush to the screen's edges
       .dock__cast         soft ground shadow
       .dock__skin (svg)   the ONE path — flat bar + parametric liquid socket,
                            rounded only at the top, square at the bottom
       .dock__bead         the accent bead that rides the surface
       .dock__tabs         real <a> links — Home / Vehicles / My Booking /
                            Contact / History
   ========================================================================== */

.liquid-dock {
  --ln-bar-hi: #211d3d;
  --ln-bar-lo: #120e1d;
  --ln-icon-off: rgba(255, 255, 255, 0.66);
  --ln-icon-on: #1a1420;
  --ln-glow-rgb: 255 107 44;         /* live-blended by js/liquid-nav.js */

  /* geometry — overwritten by js/liquid-nav.js once the bar is measured */
  --dock-rt: 22px;                   /* top-corner radius only */
  --bead-d: 60px;
  --bead-cy: 0px;
  --rise: 42px;

  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  width: 100%;
  max-width: 100%;
  height: calc(clamp(74px, 10.5vh, 88px) + env(safe-area-inset-bottom));
  padding-bottom: env(safe-area-inset-bottom);
  z-index: 500;

  touch-action: pan-y;
  -webkit-tap-highlight-color: transparent;

  /* no-JS / pre-measure fallback: a plain rounded-top plate */
  background: var(--ln-bar-hi);
  border-radius: var(--dock-rt) var(--dock-rt) 0 0;
}

@media (min-width: 768px) {
  .liquid-dock { display: none !important; }
}

.dock__cast {
  position: absolute;
  inset: 44% 5% 0 5%;
  border-radius: 999px 999px 0 0;
  background: #0a0813;
  box-shadow: 0 -14px 30px -10px rgba(0, 0, 0, 0.55) inset;
}

.dock__skin {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
  filter: drop-shadow(0 -6px 22px rgba(10, 8, 20, 0.4));
}
.dock__fill {
  fill: url(#lnPlate);
  stroke: url(#lnRim);
  stroke-width: 1;
}
.dock__plate-hi { stop-color: var(--ln-bar-hi); }
.dock__plate-lo { stop-color: var(--ln-bar-lo); }
.dock__rim-hi { stop-color: #fff; stop-opacity: 0.5; }
.dock__rim-lo { stop-color: #fff; stop-opacity: 0.05; }

/* --- the bead ----------------------------------------------------------- */

.dock__bead {
  position: absolute;
  top: var(--bead-cy);
  left: 0;
  width: var(--bead-d);
  height: var(--bead-d);
  margin: calc(var(--bead-d) / -2) 0 0 calc(var(--bead-d) / -2);
  border-radius: 50%;
  background: linear-gradient(168deg, color-mix(in srgb, rgb(var(--ln-glow-rgb)) 74%, #fff), rgb(var(--ln-glow-rgb)) 62%);
  box-shadow:
    0 0 0 1px rgb(var(--ln-glow-rgb) / 0.55),
    0 0 26px 3px rgb(var(--ln-glow-rgb) / 0.42),
    0 10px 18px -7px rgba(0, 0, 0, 0.6),
    inset 0 0 0 1px rgba(255, 255, 255, 0.4),
    inset 0 -3px 6px -3px rgba(26, 16, 34, 0.2);
  will-change: transform;
  pointer-events: none;
}
.liquid-dock:not(.is-ready) .dock__bead { opacity: 0; }

/* --- tabs ----------------------------------------------------------------*/

.dock__tabs {
  position: absolute;
  inset: 0 0 env(safe-area-inset-bottom) 0;
  display: flex;
  padding-inline: clamp(16px, 9%, 38px);
}

.tab {
  position: relative;
  flex: 1;
  display: block;
  height: 100%;
  padding: 0;
  border: 0;
  background: none;
  font: inherit;
  color: inherit;
  cursor: pointer;
  border-radius: 14px;
  text-decoration: none;
  --t: 0; /* 0 = resting on the plate · 1 = riding the bead */
}

.tab:focus-visible {
  outline: 2px solid var(--acc);
  outline-offset: -3px;
}

.tab__icon {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 24px;
  height: 24px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
  /* tinted with the tab's own accent at rest, ink once it rides the bead */
  color: color-mix(
    in oklab,
    color-mix(in oklab, var(--ln-icon-off) 58%, var(--acc) 42%) calc((1 - var(--t)) * 100%),
    var(--ln-icon-on)
  );
  transform: translate(-50%, -50%) translateY(calc(var(--t) * var(--rise) * -1));
  will-change: transform;
}
.tab__icon .fill-dot { fill: currentColor; stroke: none; }

.tab__label {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 12%;
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: color-mix(in oklab, var(--acc) 82%, #fff);
  opacity: 0;
  transform: translateY(calc((1 - var(--t)) * 7px));
  pointer-events: none;
  white-space: nowrap;
  text-align: center;
}

.tab[aria-current="page"] .tab__label,
.liquid-dock.is-dragging .tab__label { opacity: var(--t); }

@media (max-width: 380px) {
  .tab__icon { width: 22px; height: 22px; }
  .tab__label { font-size: 9.5px; }
}

@media (prefers-reduced-motion: reduce) {
  .liquid-dock * { transition-duration: 0.01ms !important; }
}