/* ═══════════════════════════════════════════════════════════════════════
   Mobile bottom navigation — all masters (public site · customer dashboard ·
   vendor panel · admin console)
   ───────────────────────────────────────────────────────────────────────
   Appears only ≤ 768px (bottom-of-screen pill, exact same language as the
   rest of the site). Desktop users never see it (display:none). Every tab
   is a shortcut; the active tab pops out of the capsule and pulses.
   ═══════════════════════════════════════════════════════════════════════ */

.nb-bar,
.nb-bar * { -webkit-tap-highlight-color: transparent; box-sizing: border-box; }

@media (min-width: 769px) {
    .nb-bar { display: none !important; }
}

@media (max-width: 768px) {

    /* leave room so page content never sits under the bar */
    body { padding-bottom: calc(104px + env(safe-area-inset-bottom, 0px)) !important; }

    .nb-bar {
        position: fixed; left: 50%; bottom: calc(14px + env(safe-area-inset-bottom, 0px));
        transform: translateX(-50%); z-index: 1200;
        display: flex; align-items: center; justify-content: space-between; gap: 2px;
        width: min(94vw, 460px); height: 64px; padding: 8px 14px;
        border-radius: 999px;
        background:
            radial-gradient(200px 60px at 12% 130%, rgba(79,70,229,0.10), transparent 65%),
            radial-gradient(220px 70px at 88% -30%, rgba(56,189,248,0.12), transparent 66%),
            linear-gradient(180deg, rgba(255,255,255,0.88), rgba(255,255,255,0.96));
        backdrop-filter: blur(24px) saturate(170%);
        -webkit-backdrop-filter: blur(24px) saturate(170%);
        border: 1px solid rgba(79,70,229,0.30);
        box-shadow:
            0 18px 42px -14px rgba(30,41,59,0.38),
            0 8px 22px -12px rgba(79,70,229,0.35),
            inset 0 1px 0 rgba(255,255,255,0.75);
        animation: nbDockPop 0.85s 0.15s cubic-bezier(0.22, 1.4, 0.36, 1) both;
    }

    /* glow on the floor beneath the dock */
    .nb-bar::after {
        content: ""; position: absolute; left: 16%; right: 16%; bottom: -14px; height: 15px;
        pointer-events: none; border-radius: 50%;
        background: radial-gradient(50% 100% at 50% 0, rgba(79,70,229,0.42), transparent 72%);
        filter: blur(7px);
        animation: nbFloorGlow 3.4s ease-in-out infinite;
    }

    .nb-item {
        position: relative; flex: none; width: 62px; height: 50px;
        display: flex; align-items: flex-start; justify-content: center;
        text-decoration: none !important; cursor: pointer;
        transition: width 0.45s cubic-bezier(0.25, 1.4, 0.45, 1);
    }

    .nb-label {
        position: absolute; bottom: 1px; left: 0; right: 0; text-align: center;
        font-size: 8.3px; font-weight: 800; letter-spacing: 0.15em; text-transform: uppercase;
        color: #475569; transition: color 0.3s; white-space: nowrap;
    }

    .nb-ico {
        position: relative;
        width: 42px; height: 42px; border-radius: 15px;
        display: flex; align-items: center; justify-content: center;
        color: #475569; background: rgba(255,255,255,0);
        border: 1px solid transparent;
        transition: transform 0.5s cubic-bezier(0.25, 1.5, 0.4, 1), background 0.4s, color 0.4s, box-shadow 0.5s, border-radius 0.45s;
    }
    .nb-ico i { font-size: 19px; transition: transform 0.45s var(--nb-ease, cubic-bezier(0.175, 0.885, 0.32, 1.275)), color 0.3s; }

    .nb-item:hover:not(.active) .nb-ico i { transform: translateY(-4px) scale(1.12); color: var(--primary, #4f46e5); }
    .nb-item:hover:not(.active) .nb-label { color: var(--primary, #4f46e5); }

    .nb-item.active { width: 92px; }
    .nb-item.active .nb-ico {
        transform: translateY(-16px) scale(1.07); border-radius: 18px; color: #fff;
        background: linear-gradient(150deg, #6366f1, #4f46e5 55%, #3730a3);
        border-color: rgba(226,232,240,0.38);
        box-shadow:
            0 16px 30px -8px rgba(79,70,229,0.95),
            inset 0 1px 0 rgba(255,255,255,0.32),
            0 0 24px rgba(99,102,241,0.55);
        animation: nbChipFloat 3.4s 0.7s ease-in-out infinite;
    }
    .nb-item.active .nb-ico i { color: #fff; filter: drop-shadow(0 3px 8px rgba(2,6,23,0.5)); }
    .nb-item.active .nb-ring {
        position: absolute; inset: -3px; border-radius: 21px;
        border: 1.5px solid rgba(129,140,248,0.85); opacity: 0; pointer-events: none;
        animation: nbChipRing 2.3s 0.3s ease-out infinite;
    }
    .nb-item.active .nb-label { color: var(--primary, #4f46e5); font-weight: 800; }

    .nb-item:focus-visible { outline: 3px solid rgba(99,102,241,0.55); outline-offset: 2px; border-radius: 14px; }

    @media (max-width: 460px) {
        .nb-bar { width: min(96vw, 460px); padding: 8px 16px; gap: 1px; }
        .nb-item { width: 54px; }
        .nb-item.active { width: 80px; }
    }
    @media (max-width: 370px) {
        .nb-bar { padding: 8px 11px; }
        .nb-item { width: 47px; }
        .nb-item.active { width: 74px; }
        .nb-ico { width: 38px; height: 38px; }
        .nb-item.active .nb-ico { transform: translateY(-13px) scale(1.04); }
    }
}

@keyframes nbDockPop {
    from { opacity: 0; transform: translate(-50%, 160%) scaleX(0.55) scaleY(0.8); }
    60% { opacity: 1; }
    to { opacity: 1; transform: translate(-50%, 0); }
}
@keyframes nbChipFloat {
    0%, 100% { transform: translateY(-16px) scale(1.07); }
    50% { transform: translateY(-20px) scale(1.1) rotate(-1.5deg); }
}
@keyframes nbChipRing {
    0% { transform: scale(0.82); opacity: 0.9; }
    75% { transform: scale(1.35); opacity: 0; }
    100% { transform: scale(1.35); opacity: 0; }
}
@keyframes nbFloorGlow {
    0%, 100% { opacity: 0.5; transform: scaleX(1); }
    50% { opacity: 1; transform: scaleX(0.86); }
}

@media (prefers-reduced-motion: reduce) {
    .nb-bar, .nb-item.active .nb-ico, .nb-bar::after, .nb-item.active .nb-ring { animation: none !important; }
}
