/* =========================================
   MOBILE BOTTOM NAV v2 — mobile only (≤767px)
   Enqueued by locksmith-core.php while "Global: Mobile Bottom Nav" is enabled.
   Reuses site tokens from the Oxygen stylesheet: --ls-gold, --ls-dark,
   --ls-white, --ls-font, --ls-fw-bold, --ls-fw-xbold.
   Desktop (≥768px) is untouched: nothing below applies there.
   ========================================= */
@media (max-width: 767px) {

  :root {
    --ls-mnav-h: 72px;
    --ls-mnav-safe: env(safe-area-inset-bottom, 0px);
    --ls-mnav-call: #22c55e;            /* same green as the old nav's CALL disc */
    --ls-mnav-wa: #1eb859;              /* WhatsApp */
    --ls-mnav-green-text: #178a41;
    --ls-mnav-muted: #5b6070;
    --ls-mnav-line: #1e2230;            /* dark divider already used across the site */
    --ls-mnav-ic-bg: #1e293b;
    --ls-mnav-sheet-text: #94a3b8;
    --ls-mnav-z: 9998;                  /* below the mobile menu overlay (9999), like the old nav */
  }

  /* Reserve space so page content never sits under the bar (overrides body padding-bottom:80px) */
  body.ls-mnav-on { padding-bottom: calc(var(--ls-mnav-h) + var(--ls-mnav-safe)) !important; }

  /* Hide the floating gold bubble on mobile only when the admin toggle is on */
  .ls-sticky-widget.ls-sw-hide-mobile { display: none !important; }

  /* ---------- bar ---------- */
  .ls-mnav {
    position: fixed;
    left: 0; right: 0; bottom: 0;
    height: calc(var(--ls-mnav-h) + var(--ls-mnav-safe));
    padding-bottom: var(--ls-mnav-safe);
    background: var(--ls-white, #fff);
    border-top: 1px solid #e6e6e6;
    display: grid;
    grid-template-columns: 1fr 1fr 1fr 1fr;
    align-items: end;
    z-index: var(--ls-mnav-z);
    font-family: var(--ls-font, 'Inter', system-ui, -apple-system, sans-serif);
    box-sizing: border-box;
  }
  .ls-mnav-item {
    appearance: none; -webkit-appearance: none;
    border: 0; background: none; margin: 0;
    font: inherit; color: var(--ls-mnav-muted);
    cursor: pointer; text-decoration: none;
    display: flex; flex-direction: column; align-items: center; justify-content: flex-end;
    gap: 5px; height: var(--ls-mnav-h); padding: 0 4px 10px; box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
    line-height: 1;
  }
  .ls-mnav-item:hover { color: var(--ls-mnav-muted); text-decoration: none; }
  .ls-mnav-lbl {
    font-size: 10px; letter-spacing: .1em; font-weight: var(--ls-fw-bold, 700);
    text-transform: uppercase; white-space: nowrap;
    max-width: 100%; overflow: hidden; text-overflow: ellipsis;
  }
  .ls-mnav-item > svg {
    width: 24px; height: 24px; stroke: currentColor; fill: none;
    stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round;
  }
  .ls-mnav-caret { display: inline-block; font-size: 9px; line-height: 0; transition: transform .2s; }
  .ls-mnav-toggle[aria-expanded="true"] { color: var(--ls-gold, #c9a24d); }
  .ls-mnav-toggle[aria-expanded="true"] .ls-mnav-caret { transform: rotate(180deg); }
  .ls-mnav-item:focus-visible {
    outline: 3px solid var(--ls-gold, #c9a24d); outline-offset: -3px; border-radius: 10px;
  }

  /* ---------- raised discs (Call / WhatsApp) ---------- */
  .ls-mnav-act { position: relative; padding-bottom: 8px; }
  .ls-mnav-disc {
    width: 58px; height: 58px; border-radius: 50%;
    display: grid; place-items: center; color: #fff;
    transform: translateY(-14px);
    box-shadow: 0 8px 18px rgba(0,0,0,.25);
    border: 4px solid var(--ls-white, #fff);
    position: relative; box-sizing: border-box;
    transition: transform .2s ease;
  }
  .ls-mnav-act:active .ls-mnav-disc { transform: translateY(-14px) scale(.96); }
  .ls-mnav-disc svg { width: 26px; height: 26px; fill: #fff; stroke: none; }
  .ls-mnav-act .ls-mnav-lbl { margin-top: -10px; color: var(--ls-mnav-green-text); }
  .ls-mnav-call .ls-mnav-disc { background: var(--ls-mnav-call); }
  .ls-mnav-wa   .ls-mnav-disc { background: var(--ls-mnav-wa); }

  /* One pulse only — on Call. Same feel as the old nav's ls-call-pulse ring. */
  .ls-mnav-call .ls-mnav-disc::after {
    content: ""; position: absolute; inset: -4px; border-radius: 50%;
    border: 3px solid var(--ls-mnav-call); opacity: 0; pointer-events: none;
    animation: ls-mnav-pulse 2.2s ease-out infinite;
  }
  @keyframes ls-mnav-pulse {
    0%   { transform: scale(.9);  opacity: .7; }
    70%  { transform: scale(1.45); opacity: 0; }
    100% { opacity: 0; }
  }

  /* ---------- backdrop + sheets ---------- */
  .ls-mnav-backdrop {
    position: fixed; inset: 0; background: rgba(0,0,0,.55);
    opacity: 0; pointer-events: none; transition: opacity .2s;
    z-index: calc(var(--ls-mnav-z) - 2);
  }
  .ls-mnav-backdrop.is-on { opacity: 1; pointer-events: auto; }

  .ls-mnav-sheet {
    position: fixed; left: 0; right: 0;
    bottom: calc(var(--ls-mnav-h) + var(--ls-mnav-safe));
    background: var(--ls-dark, #0b1117); color: var(--ls-white, #fff);
    border-radius: 20px 20px 0 0; border-top: 1px solid var(--ls-mnav-line);
    padding: 10px 14px 16px; box-sizing: border-box;
    z-index: calc(var(--ls-mnav-z) - 1);
    max-height: calc(100dvh - var(--ls-mnav-h) - var(--ls-mnav-safe) - 60px);
    overflow: auto; -webkit-overflow-scrolling: touch;
    font-family: var(--ls-font, 'Inter', system-ui, -apple-system, sans-serif);
    transform: translateY(110%); visibility: hidden;
    transition: transform .26s cubic-bezier(.2,.8,.2,1), visibility 0s linear .26s;
  }
  .ls-mnav-sheet.is-open { transform: none; visibility: visible; transition-delay: 0s; }
  .ls-mnav-handle { width: 40px; height: 4px; border-radius: 2px; background: #3a3f4b; margin: 2px auto 12px; }
  .ls-mnav-sheet-title {
    font-size: 15px; color: var(--ls-mnav-sheet-text); font-weight: 600;
    margin: 0 4px 8px; line-height: 1.3; text-transform: none; letter-spacing: 0;
  }

  .ls-mnav-row {
    display: flex; align-items: center; gap: 14px;
    padding: 13px 6px; border-top: 1px solid var(--ls-mnav-line);
    color: var(--ls-white, #fff); text-decoration: none; font-size: 16.5px; line-height: 1.3;
  }
  .ls-mnav-row:first-of-type { border-top: 0; }
  .ls-mnav-row:hover, .ls-mnav-row:focus { color: var(--ls-white, #fff); text-decoration: none; }
  .ls-mnav-ic {
    width: 34px; height: 34px; border-radius: 9px; background: var(--ls-mnav-ic-bg);
    display: grid; place-items: center; color: var(--ls-gold, #c9a24d); flex: none;
  }
  .ls-mnav-ic svg { width: 19px; height: 19px; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
  .ls-mnav-chev { margin-left: auto; color: #5f6572; }
  .ls-mnav-row-area { margin-top: 6px; border-top: 1px dashed #3a3f4b; color: #cfd3da; }

  .ls-mnav-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; padding: 4px 0 6px; }
  .ls-mnav-chip {
    background: var(--ls-mnav-ic-bg); border: 1px solid var(--ls-mnav-line); border-radius: 12px;
    padding: 13px 14px; color: var(--ls-white, #fff); text-decoration: none; font-size: 16px; text-align: center;
    line-height: 1.3;
  }
  .ls-mnav-chip:hover, .ls-mnav-chip:focus { color: var(--ls-white, #fff); text-decoration: none; }
  .ls-mnav-chip-all { grid-column: 1 / -1; background: transparent; border-color: var(--ls-gold, #c9a24d); color: var(--ls-gold, #c9a24d); }
  .ls-mnav-chip-all:hover, .ls-mnav-chip-all:focus { color: var(--ls-gold, #c9a24d); }

  .ls-mnav-row:focus-visible, .ls-mnav-chip:focus-visible {
    outline: 3px solid var(--ls-gold, #c9a24d); outline-offset: 2px; border-radius: 10px;
  }

  /* Tiny screens */
  @media (max-width: 360px) {
    .ls-mnav-lbl { font-size: 9px; letter-spacing: .06em; }
    .ls-mnav-disc { width: 54px; height: 54px; }
  }

  /* Reduced motion: no pulse, no slide */
  @media (prefers-reduced-motion: reduce) {
    .ls-mnav-call .ls-mnav-disc::after { animation: none; }
    .ls-mnav-sheet, .ls-mnav-backdrop, .ls-mnav-caret, .ls-mnav-disc { transition: none; }
  }
}

/* Desktop / tablet (≥768px): the markup is still printed by the shortcode, so hide it
   exactly like the old nav was hidden. Desktop keeps its own header + floating bubble. */
@media (min-width: 768px) {
  .ls-mnav, .ls-mnav-sheet, .ls-mnav-backdrop { display: none !important; }
}
