/**
 * Landing hero — "live_map" layout (Admin → Design → Hero layout).
 * Full-bleed map, walker pins and a floating booking sheet; bottom sheet on phones.
 */

.landing-hero-wrap--layout-live_map {
    /* clip abspos pins / wide form rows so mobile never gains a horizontal scroll */
    overflow-x: clip;
    overflow-y: visible;
    max-width: 100%;
    background: #eef0f3;
}
@supports not (overflow: clip) {
    .landing-hero-wrap--layout-live_map { overflow-x: hidden; }
}
.dark .landing-hero-wrap--layout-live_map { background: #0b1220; }

.lhm {
    --lhm-ink: #0f172a;
    --lhm-muted: #64748b;
    --lhm-line: #e5e7eb;
    --lhm-sheet: #fff;
    --lhm-field: #f3f4f6;
    --lhm-accent: var(--brand, #2563eb);
    position: relative;
    isolation: isolate;
    max-width: 100%;
    overflow-x: clip;
    min-height: clamp(640px, calc(100svh - 84px), 780px);
    color: var(--lhm-ink);
}
@supports not (overflow: clip) {
    .lhm { overflow-x: hidden; }
}
.dark .lhm {
    --lhm-ink: #f1f5f9;
    --lhm-muted: #94a3b8;
    --lhm-line: #1f2a3d;
    --lhm-sheet: #111a2b;
    --lhm-field: #1a2438;
}

/* ── Map ── */

.lhm-map {
    position: absolute;
    inset: 0;
    overflow: hidden;
    z-index: 0;
    background:
        linear-gradient(28deg, transparent 46%, #fff 46.4% 47.6%, transparent 48%),
        linear-gradient(-34deg, transparent 58%, #fff 58.3% 59.2%, transparent 59.5%),
        #e8eaee;
}
.lhm-map__img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: 60% 50%;
}
/* Beats the global `img:not(.cp-avatar):not(.moppsy-brand-logo) { max-width: 100% }` cap. */
img.lhm-map__img:not(.cp-avatar):not(.moppsy-brand-logo) {
    max-width: none;
    max-height: none;
}
.lhm--map-grey .lhm-map__img--light { filter: saturate(.85) contrast(1.02); }
.lhm-map__img--dark { display: none; }
.dark .lhm-map__img--light { display: none; }
.dark .lhm-map__img--dark { display: block; }

.lhm-map__fade {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(248,247,244,.7) 0%, rgba(248,247,244,.3) 30%, rgba(248,247,244,0) 48%),
        linear-gradient(0deg, rgba(248,247,244,.45) 0%, rgba(248,247,244,0) 16%);
}
.lhm--map-grey .lhm-map__fade {
    background:
        linear-gradient(90deg, rgba(238,240,243,.92) 0%, rgba(238,240,243,.55) 30%, rgba(238,240,243,0) 52%),
        linear-gradient(0deg, rgba(238,240,243,.7) 0%, rgba(238,240,243,0) 22%);
}
.dark .lhm-map__fade {
    background:
        linear-gradient(90deg, rgba(11,18,32,.92) 0%, rgba(11,18,32,.5) 30%, rgba(11,18,32,0) 52%),
        linear-gradient(0deg, rgba(11,18,32,.75) 0%, rgba(11,18,32,0) 22%);
}

.lhm-route {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    overflow: visible;
    pointer-events: none;
    z-index: 2;
}
.lhm-you,
.lhm-pin { z-index: 3; }
.lhm-route path { fill: none; stroke-linecap: round; stroke-linejoin: round; }
.lhm-route__base {
    stroke: rgba(37, 99, 235, .14);
    stroke-width: 3.5;
}
.lhm-route__draw {
    stroke: url(#lhm-route-grad);
    stroke-width: 2.25;
    stroke-dasharray: 18 82;
    animation: lhm-route-flow 2.8s cubic-bezier(.4, 0, .2, 1) infinite;
}
.lhm-route__head-tail {
    fill: rgba(59, 130, 246, .35);
}
.lhm-route__head-halo {
    fill: rgba(59, 130, 246, .22);
    transform-origin: 0 0;
    transform-box: fill-box;
    animation: lhm-head-pulse 2.8s ease-in-out infinite;
}
.lhm-route__head-core {
    fill: #fff;
    stroke: #2563eb;
    stroke-width: 2;
    filter: drop-shadow(0 0 10px rgba(37, 99, 235, .65));
}
.dark .lhm-route__base { stroke: rgba(147, 197, 253, .2); }
.dark .lhm-route__head-tail { fill: rgba(147, 197, 253, .35); }
.dark .lhm-route__head-halo { fill: rgba(147, 197, 253, .22); }
.dark .lhm-route__head-core { fill: #eff6ff; stroke: #93c5fd; }
@keyframes lhm-route-flow {
    to { stroke-dashoffset: -100; }
}
@keyframes lhm-head-pulse {
    0%, 100% { opacity: .5; transform: scale(.85); }
    50% { opacity: .95; transform: scale(1.2); }
}

.lhm-you,
.lhm-pin {
    position: absolute;
    left: var(--x);
    top: var(--y);
    transform: translate(-50%, -50%);
}
.lhm-you__dot {
    position: relative;
    display: block;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #2563eb;
    border: 3px solid #fff;
    box-shadow: 0 4px 12px rgba(37,99,235,.45);
}
.lhm-you__dot::before {
    content: '';
    position: absolute;
    inset: -14px;
    border-radius: 50%;
    background: rgba(37,99,235,.18);
    animation: lhm-ping 2.4s ease-out infinite;
}
@keyframes lhm-ping {
    0% { transform: scale(.4); opacity: 1; }
    100% { transform: scale(1.6); opacity: 0; }
}
.lhm-you__label {
    position: absolute;
    left: 50%;
    top: calc(100% + 6px);
    transform: translateX(-50%);
    padding: 2px 8px;
    border-radius: 999px;
    background: #2563eb;
    color: #fff;
    font-size: 10px;
    font-weight: 800;
    white-space: nowrap;
}

.lhm-pin {
    display: flex;
    align-items: center;
    gap: 0;
    padding: 3px;
    border-radius: 999px;
    background: color-mix(in srgb, var(--lhm-sheet) 92%, transparent);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(15, 23, 42, .06);
    box-shadow: 0 8px 22px rgba(15,23,42,.12), 0 1px 2px rgba(15,23,42,.06);
    animation: lhm-pin-in .6s var(--d, 0ms) cubic-bezier(.2,1.4,.4,1) backwards;
    transition: box-shadow .3s ease, transform .35s cubic-bezier(.2,1.2,.4,1), border-color .3s ease;
}
.lhm-pin::after {
    content: '';
    position: absolute;
    left: 50%;
    bottom: -4px;
    width: 8px;
    height: 8px;
    background: color-mix(in srgb, var(--lhm-sheet) 92%, transparent);
    border-right: 1px solid rgba(15, 23, 42, .06);
    border-bottom: 1px solid rgba(15, 23, 42, .06);
    transform: translateX(-50%) rotate(45deg);
    border-radius: 1px;
    z-index: -1;
}
@keyframes lhm-pin-in {
    from { opacity: 0; transform: translate(-50%, -20%) scale(.6); }
    to { opacity: 1; transform: translate(-50%, -50%) scale(1); }
}
.lhm-pin__bubble img {
    display: block;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    background: #e5e7eb;
}
.lhm-pin__tag {
    display: grid;
    max-width: 0;
    overflow: hidden;
    white-space: nowrap;
    line-height: 1.15;
    transition: max-width .45s cubic-bezier(.2,1,.3,1), padding .45s ease;
}
.lhm-pin__tag b { font-size: 13px; font-weight: 800; }
.lhm-pin__tag span { font-size: 11px; color: var(--lhm-muted); font-weight: 600; }
.lhm-pin.is-active {
    z-index: 2;
    transform: translate(-50%, -50%) scale(1.05);
    border-color: rgba(37, 99, 235, .28);
    box-shadow:
        0 12px 28px rgba(37, 99, 235, .18),
        0 0 0 4px rgba(37, 99, 235, .12);
}
.lhm-pin.is-active .lhm-pin__tag { max-width: 190px; padding: 0 12px 0 10px; }

/* ── Content ── */

.lhm-inner {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    box-sizing: border-box;
    width: 100%;
    max-width: 100%;
    min-height: inherit;
    padding-top: 2.5rem;
    padding-bottom: 2.5rem;
    pointer-events: none;
}
.lhm-inner > * { pointer-events: auto; }

.lhm-sheet {
    position: relative;
    box-sizing: border-box;
    width: min(100%, 27.5rem);
    max-width: 100%;
    padding: 1.75rem;
    border-radius: 1.5rem;
    background: var(--lhm-sheet);
    box-shadow: 0 24px 60px -12px rgba(15,23,42,.28), 0 2px 6px rgba(15,23,42,.06);
    overflow-x: clip;
}
@supports not (overflow: clip) {
    .lhm-sheet { overflow-x: hidden; }
}
.landing-hero-wrap--style-gradient .lhm-sheet {
    box-shadow: 0 24px 60px -12px color-mix(in srgb, var(--brand, #2563eb) 40%, transparent), 0 2px 6px rgba(15,23,42,.06);
}
.landing-hero-wrap--style-brand_soft .lhm-sheet {
    background: linear-gradient(180deg, color-mix(in srgb, var(--brand-soft, #eef2ff) 70%, var(--lhm-sheet)) 0%, var(--lhm-sheet) 45%);
}
.lhm-sheet__grabber { display: none; }

.lhm-live {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    max-width: 100%;
    padding: .35rem .75rem;
    border-radius: 999px;
    background: color-mix(in srgb, #10b981 12%, transparent);
    color: #047857;
    font-size: 12px;
    font-weight: 700;
    line-height: 1.35;
    text-wrap: balance;
}
.dark .lhm-live { color: #6ee7b7; }
.lhm-live__dot {
    position: relative;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #10b981;
}
.lhm-live__dot::after {
    content: '';
    position: absolute;
    inset: -4px;
    border-radius: 50%;
    border: 2px solid #10b981;
    animation: lhm-ping 1.8s ease-out infinite;
}

.lhm-title {
    margin-top: 1rem;
    font-size: clamp(2rem, 3.4vw, 2.75rem);
    line-height: 1.04;
    font-weight: 900;
    letter-spacing: -.035em;
}
.lhm-title span { display: block; color: var(--lhm-accent); }
.dark .lhm-title span { color: color-mix(in srgb, var(--lhm-accent) 70%, #fff); }
.lhm-sub {
    margin-top: .75rem;
    color: var(--lhm-muted);
    font-size: .95rem;
    line-height: 1.55;
}

/* Uber-style stacked fields joined by a timeline line */
.lhm-form {
    position: relative;
    display: grid;
    gap: .5rem;
    margin-top: 1.5rem;
    z-index: 5;
}
.lhm-form::before {
    content: '';
    position: absolute;
    left: calc(1rem + 6px);
    top: 1.85rem;
    height: 3.9rem;
    width: 2px;
    background: var(--lhm-ink);
    opacity: .7;
    z-index: 1;
}
.lhm-field {
    position: relative;
    display: flex;
    align-items: center;
    gap: .75rem;
    min-width: 0;
    max-width: 100%;
    min-height: 3.5rem;
    padding: 0 .5rem 0 1rem;
    border-radius: .9rem;
    background: var(--lhm-field);
    border: 2px solid transparent;
    transition: border-color .15s ease, background .15s ease;
}
.lhm-field--where:focus-within { border-color: var(--lhm-ink); background: var(--lhm-sheet); }
.lhm-field__icon {
    position: relative;
    z-index: 2;
    flex: none;
    width: 10px;
    height: 10px;
    background: var(--lhm-ink);
}
.lhm-field__icon--dot { border-radius: 50%; }
.lhm-field__icon--square { border-radius: 2px; }
.lhm-field__input {
    flex: 1;
    min-width: 0;
    height: 3.25rem;
    border: 0;
    background: transparent;
    color: var(--lhm-ink);
    font-size: 1rem;
    font-weight: 600;
    outline: none;
}
#landing-live-map .lhm-field__input { background: transparent; color: var(--lhm-ink); border: 0; }
.lhm-field__input::placeholder { color: var(--lhm-muted); font-weight: 500; }
.lhm-locate {
    display: grid;
    place-items: center;
    flex: none;
    width: 2.5rem;
    height: 2.5rem;
    border-radius: .7rem;
    background: transparent;
    color: var(--lhm-ink);
    transition: background .15s ease;
}
.lhm-locate:hover { background: color-mix(in srgb, var(--lhm-ink) 8%, transparent); }
.lhm-locate svg { width: 1.25rem; height: 1.25rem; }
.lhm-locate.is-busy svg { animation: lhm-spin 1s linear infinite; }
@keyframes lhm-spin { to { transform: rotate(360deg); } }

.lhm-suggest {
    position: absolute;
    left: 0;
    right: 0;
    top: calc(100% + .4rem);
    max-height: 16rem;
    overflow-y: auto;
    border-radius: 1rem;
    border: 1px solid var(--lhm-line);
    background: var(--lhm-sheet);
    box-shadow: 0 20px 40px rgba(15,23,42,.18);
    z-index: 50;
}

.lhm-field__label {
    flex: 0 1 auto;
    min-width: 0;
    font-size: .95rem;
    font-weight: 700;
}
.lhm-seg {
    display: flex;
    flex: 1 1 auto;
    min-width: 0;
    padding: 3px;
    border-radius: 999px;
    background: var(--lhm-sheet);
    box-shadow: inset 0 0 0 1px var(--lhm-line);
}
.lhm-seg__opt {
    flex: 1 1 0;
    min-width: 0;
}
.lhm-seg__opt input { position: absolute; opacity: 0; pointer-events: none; }
.lhm-seg__opt span {
    display: block;
    padding: .45rem .85rem;
    border-radius: 999px;
    font-size: .8rem;
    font-weight: 800;
    color: var(--lhm-muted);
    cursor: pointer;
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    transition: background .15s ease, color .15s ease;
}
.lhm-seg__opt input:checked + span { background: var(--lhm-ink); color: var(--lhm-sheet); }
.lhm-seg__opt--now input:checked + span { background: #f59e0b; color: #fff; }
.lhm-seg__opt input:focus-visible + span { outline: 2px solid var(--lhm-accent); outline-offset: 2px; }

.lhm-urgent-hint {
    margin: -.1rem .25rem 0;
    font-size: .75rem;
    line-height: 1.4;
    color: #b45309;
    font-weight: 600;
}
.dark .lhm-urgent-hint { color: #fbbf24; }

.lhm-cta {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: .5rem;
    width: 100%;
    box-sizing: border-box;
    min-height: 3.5rem;
    height: auto;
    padding: .85rem 1rem;
    margin-top: .35rem;
    border-radius: .9rem;
    background: var(--lhm-ink);
    color: var(--lhm-sheet);
    font-size: 1rem;
    font-weight: 800;
    text-align: center;
    transition: transform .15s ease, box-shadow .15s ease;
}
.lhm-cta svg { width: 1.2rem; height: 1.2rem; transition: transform .2s ease; }
.lhm-cta:hover { box-shadow: 0 10px 24px rgba(15,23,42,.25); }
.lhm-cta:hover svg { transform: translateX(3px); }
.lhm-cta:active { transform: scale(.985); }

.lhm-trust {
    display: flex;
    flex-wrap: wrap;
    gap: .35rem 1rem;
    margin-top: 1.1rem;
    font-size: .75rem;
    font-weight: 600;
    color: var(--lhm-muted);
}
.lhm-trust li { display: inline-flex; align-items: center; gap: .3rem; }
.lhm-trust svg { width: 1rem; height: 1rem; color: #10b981; }

.lhm-apps {
    margin-top: 1.1rem;
    padding-top: 1.1rem;
    border-top: 1px solid var(--lhm-line);
    max-width: 100%;
}
.lhm-apps > div {
    max-width: 100%;
}

/* Nearby walkers rail */
.lhm-rail {
    position: absolute;
    right: 2rem;
    bottom: 2rem;
    width: min(22rem, 34vw);
    padding: .85rem;
    border-radius: 1.25rem;
    background: color-mix(in srgb, var(--lhm-sheet) 92%, transparent);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: 0 18px 44px -10px rgba(15,23,42,.28);
}
.lhm-rail__head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    padding: 0 .35rem .55rem;
    font-size: .8rem;
    font-weight: 800;
}
.lhm-rail__head a { font-size: .75rem; font-weight: 700; color: var(--lhm-muted); }
.lhm-rail__head a:hover { color: var(--lhm-ink); }
.lhm-rail__list { display: grid; gap: .35rem; }
.lhm-walker {
    display: flex;
    align-items: center;
    gap: .7rem;
    padding: .55rem;
    border-radius: .9rem;
    transition: background .25s ease, box-shadow .25s ease;
}
.lhm-walker:hover,
.lhm-walker.is-active { background: var(--lhm-field); }
.lhm-walker.is-active { box-shadow: inset 3px 0 0 var(--lhm-ink); }
.lhm-walker img {
    flex: none;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    object-fit: cover;
    background: #e5e7eb;
}
.lhm-walker__body { flex: 1; min-width: 0; display: grid; line-height: 1.25; }
.lhm-walker__body b,
.lhm-walker__body span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lhm-walker__body b { font-size: .88rem; font-weight: 800; }
.lhm-walker__body span { font-size: .75rem; color: var(--lhm-muted); font-weight: 600; }
.lhm-walker__meta { display: grid; justify-items: end; gap: .15rem; line-height: 1.2; }
.lhm-walker__meta b { font-size: .85rem; font-weight: 800; white-space: nowrap; }
.lhm-walker__live {
    padding: 1px 6px;
    border-radius: 999px;
    background: color-mix(in srgb, #10b981 14%, transparent);
    color: #047857;
    font-size: 10px;
    font-weight: 800;
}
.dark .lhm-walker__live { color: #6ee7b7; }

/* ── Phones & small tablets: map on top, bottom sheet below ── */

@media (max-width: 1023px) {
    .lhm { min-height: 0; }
    .lhm-map {
        position: relative;
        inset: auto;
        height: 19rem;
    }
    .lhm-map__fade {
        background: linear-gradient(0deg, rgba(248,247,244,.6) 0%, rgba(248,247,244,0) 26%);
    }
    .lhm--map-grey .lhm-map__fade {
        background: linear-gradient(0deg, rgba(238,240,243,.85) 0%, rgba(238,240,243,0) 30%);
    }
    .dark .lhm-map__fade {
        background: linear-gradient(0deg, rgba(11,18,32,.9) 0%, rgba(11,18,32,0) 30%);
    }
    .lhm-you,
    .lhm-pin { left: var(--mx); top: var(--my); }
    .lhm-pin.is-active .lhm-pin__tag { max-width: 150px; }

    .lhm .lhm-inner {
        display: block;
        margin-top: -2.25rem;
        padding-top: 0;
        padding-bottom: 1.5rem;
    }
    .lhm-sheet {
        width: 100%;
        max-width: 40rem;
        margin: 0 auto;
        padding: 1.1rem 1.25rem 1.5rem;
        border-radius: 1.75rem 1.75rem 1.25rem 1.25rem;
        box-shadow: 0 -10px 30px -12px rgba(15,23,42,.25);
    }
    .lhm-sheet__grabber {
        display: block;
        width: 2.75rem;
        height: 5px;
        margin: 0 auto .9rem;
        border-radius: 999px;
        background: var(--lhm-line);
    }
    .lhm-title { font-size: clamp(1.75rem, 7.4vw, 2.25rem); }
    .lhm-sub { font-size: .9rem; }

    .lhm-rail {
        position: static;
        width: auto;
        max-width: 40rem;
        margin: .75rem auto 0;
        padding: .75rem 0 0;
        background: transparent;
        box-shadow: none;
        backdrop-filter: none;
        -webkit-backdrop-filter: none;
    }
    .lhm-rail__head { padding: 0 .25rem .55rem; }
    .lhm-rail__list {
        display: flex;
        gap: .6rem;
        padding: 0 0 .5rem;
        overflow-x: auto;
        scroll-snap-type: x mandatory;
        scrollbar-width: none;
    }
    .lhm-rail__list::-webkit-scrollbar { display: none; }
    .lhm-walker {
        flex: 0 0 min(82%, 17rem);
        scroll-snap-align: start;
        background: var(--lhm-sheet);
        box-shadow: 0 6px 18px -8px rgba(15,23,42,.25);
    }
    .lhm-rail__list:has(> :only-child) .lhm-walker { flex-basis: 100%; }
}

@media (max-width: 639px) {
    /* Sticky needs a non-clipping ancestor. The tiny whole-hero shift fights this. */
    body:has(.landing-hero-wrap--layout-live_map) .site-main-wrapper {
        overflow-x: visible;
    }
    .landing-hero-wrap--layout-live_map,
    .landing-hero-wrap--layout-live_map .lhm {
        overflow: visible;
        transform: none;
    }
    .lhm-map {
        position: sticky;
        top: 0;
        z-index: 0;
        height: 22rem;
        overflow: hidden;
    }
    .lhm .lhm-inner {
        position: relative;
        z-index: 2;
        margin-top: -2.75rem;
    }
    /* Tall photo so a large scroll drift stays inside the frame. */
    .lhm-map__img {
        inset: auto;
        top: -55%;
        left: -8%;
        width: 116%;
        height: 210%;
        transform: translate3d(0, var(--lhm-map-parallax-y, 0px), 0);
        will-change: transform;
    }
    .lhm-sheet { padding: 1rem 1rem 1.35rem; }
    .lhm-form { margin-top: 1.25rem; }
    /* Stack when-row so Later/Now are full-width equal pills (no sideways squeeze) */
    .lhm-field--when {
        flex-wrap: wrap;
        align-items: center;
        row-gap: .55rem;
        min-height: 0;
        padding: .7rem .75rem .75rem 1rem;
    }
    .lhm-field--when .lhm-field__label {
        flex: 1 1 auto;
        font-size: .9rem;
    }
    .lhm-field--when .lhm-seg {
        flex: 1 1 100%;
        width: 100%;
    }
    .lhm-seg__opt span {
        padding: .55rem .55rem;
        font-size: .78rem;
    }
    .lhm-form::before {
        /* timeline only spans the where field once when-row grows taller */
        height: 2.35rem;
    }
    .lhm-cta {
        min-height: 3.25rem;
        font-size: .95rem;
    }
    .lhm-trust {
        gap: .4rem .75rem;
    }
}

/* Desktop: oversized map drifts under the pins and booking card. */
@media (min-width: 1024px) {
    .lhm-map__img {
        inset: auto;
        top: -42%;
        left: -8%;
        width: 116%;
        height: 185%;
        transform: translate3d(0, var(--lhm-map-parallax-y, 0px), 0) scale(var(--lhm-map-parallax-scale, 1.12));
        transform-origin: 70% 46%;
        will-change: transform;
    }
}

@media (prefers-reduced-motion: reduce) {
    .lhm-route__draw,
    .lhm-you__dot::before,
    .lhm-live__dot::after { animation: none; }
    .lhm-route__head { display: none; }
    .lhm-pin { animation: none; }
    .lhm-map__img,
    .lhm-map__fade {
        transform: none !important;
        will-change: auto;
    }
}
@media (prefers-reduced-motion: reduce) and (max-width: 639px) {
    .lhm-map {
        position: relative;
        top: auto;
    }
}
