/* ===========================================================
   Location Hub — popup + location picker
   =========================================================== */

.lhub-lock-scroll { overflow: hidden; }

/* ---------- Modal shell ---------- */
.lhub-modal {
    position: fixed;
    inset: 0;
    z-index: 999999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    -webkit-font-smoothing: antialiased;
}
.lhub-modal[hidden] { display: none; }
.lhub-modal *, .lhub-pick, .lhub-pick * { box-sizing: border-box; }

.lhub-modal__overlay {
    position: absolute;
    inset: 0;
    background: rgba( 10, 17, 33, 0.55 );
    backdrop-filter: blur( 8px );
    -webkit-backdrop-filter: blur( 8px );
    animation: lhub-fade 0.3s ease;
}

.lhub-modal__box {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 540px;
    background: #fff;
    border-radius: 24px;
    overflow: hidden;
    box-shadow: 0 24px 70px rgba( 10, 17, 33, 0.4 );
    animation: lhub-pop 0.34s cubic-bezier( 0.16, 1, 0.3, 1 );
}
@keyframes lhub-fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes lhub-pop {
    from { opacity: 0; transform: translateY( 20px ) scale( 0.97 ); }
    to   { opacity: 1; transform: none; }
}

/* ---------- Header ---------- */
.lhub-modal__header {
    position: relative;
    padding: 40px 36px 30px;
    text-align: center;
    color: #fff;
    background:
        radial-gradient( 140% 120% at 50% 0%, rgba(255,255,255,0.22), rgba(255,255,255,0) 55% ),
        linear-gradient( 140deg, var( --lhub-theme, #45BCCA ) 0%, var( --lhub-theme-dark, #2d8c98 ) 100% );
}
.lhub-modal__badge {
    width: 62px; height: 62px;
    margin: 0 auto 16px;
    border-radius: 18px;
    background: rgba( 255, 255, 255, 0.16 );
    border: 1px solid rgba( 255, 255, 255, 0.28 );
    display: flex; align-items: center; justify-content: center;
    box-shadow: 0 8px 20px rgba( 0, 0, 0, 0.12 );
}
.lhub-modal__badge svg { width: 30px; height: 30px; fill: #fff; display: block; }
.lhub-modal__title {
    margin: 0 0 8px;
    font-size: 25px; line-height: 1.2; font-weight: 700; color: #fff;
}
.lhub-modal__subtitle {
    margin: 0 auto;
    max-width: 400px;
    font-size: 14.5px; line-height: 1.55;
    color: rgba( 255, 255, 255, 0.9 );
}

/* ---------- Body / cards (flexbox) ---------- */
.lhub-modal__body { padding: 26px 26px 30px; }
.lhub-modal__grid {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    justify-content: center;
}

.lhub-loc {
    flex: 1 1 calc( 50% - 6px );
    min-width: 180px;
    display: flex;
    align-items: center;
    gap: 13px;
    text-align: left;
    border: 1px solid #e7ebf1;
    background: #fff;
    border-radius: 16px;
    padding: 15px 16px;
    cursor: pointer;
    transition: border-color 0.18s, box-shadow 0.18s, transform 0.14s;
}
.lhub-loc:hover {
    border-color: transparent;
    box-shadow: 0 10px 26px rgba( 69, 188, 202, 0.28 ), 0 0 0 2px var( --lhub-theme, #45BCCA ) inset;
    transform: translateY( -3px );
}
.lhub-loc:active { transform: translateY( -1px ); }

.lhub-loc__icon {
    flex: 0 0 auto;
    width: 42px; height: 42px;
    border-radius: 12px;
    background: linear-gradient( 140deg, var( --lhub-theme, #45BCCA ), var( --lhub-theme-dark, #2d8c98 ) );
    display: flex; align-items: center; justify-content: center;
    box-shadow: 0 4px 12px rgba( 69, 188, 202, 0.35 );
}
.lhub-loc__icon svg { width: 20px; height: 20px; fill: #fff; display: block; }
.lhub-loc__name {
    flex: 1 1 auto;
    font-size: 16px; font-weight: 600; color: #1b2738; line-height: 1.25;
}
.lhub-loc__arrow {
    flex: 0 0 auto;
    width: 18px; height: 18px;
    fill: #c3cad6;
    transition: transform 0.18s, fill 0.18s;
}
.lhub-loc:hover .lhub-loc__arrow { fill: var( --lhub-theme, #45BCCA ); transform: translateX( 3px ); }

/* ---------- Close button ---------- */
.lhub-modal__x {
    position: absolute;
    top: 16px; right: 16px;
    z-index: 2;
    width: 36px; height: 36px;
    border: 0;
    border-radius: 50%;
    background: rgba( 255, 255, 255, 0.18 );
    display: flex; align-items: center; justify-content: center;
    cursor: pointer;
    transition: background 0.16s, transform 0.16s;
}
.lhub-modal__x svg { width: 16px; height: 16px; stroke: #fff; stroke-width: 2.4; }
.lhub-modal__x:hover { background: rgba( 255, 255, 255, 0.32 ); transform: rotate( 90deg ); }

/* ---------- Location picker pill (inline) ---------- */
.lhub-pick {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    border: 1px solid color-mix( in srgb, var( --lhub-theme, #45BCCA ) 30%, #dde3ec );
    background: #fff;
    border-radius: 999px;
    padding: 8px 14px;
    cursor: pointer;
    font: inherit;
    line-height: 1;
    white-space: nowrap;
    color: #1b2738;
    transition: border-color 0.16s, box-shadow 0.16s, background 0.16s;
}
.lhub-pick:hover {
    border-color: var( --lhub-theme, #45BCCA );
    box-shadow: 0 6px 18px rgba( 69, 188, 202, 0.22 );
}
.lhub-pick__pin {
    flex: 0 0 auto;
    width: 26px; height: 26px;
    border-radius: 50%;
    background: linear-gradient( 140deg, var( --lhub-theme, #45BCCA ), var( --lhub-theme-dark, #2d8c98 ) );
    display: inline-flex; align-items: center; justify-content: center;
}
.lhub-pick__pin svg { width: 14px; height: 14px; fill: #fff; display: block; }
.lhub-pick__cap {
    font-size: 11px; letter-spacing: 0.04em; text-transform: uppercase; color: #9aa3b2;
}
.lhub-pick__name { font-size: 14.5px; font-weight: 600; }
.lhub-pick__chev { flex: 0 0 auto; width: 16px; height: 16px; fill: #9aa3b2; transition: transform 0.16s, fill 0.16s; }
.lhub-pick:hover .lhub-pick__chev { fill: var( --lhub-theme, #45BCCA ); transform: translateY( 1px ); }

/* ---------- Responsive ---------- */
@media ( max-width: 480px ) {
    .lhub-modal__header { padding: 32px 24px 24px; }
    .lhub-modal__title { font-size: 22px; }
    .lhub-modal__body { padding: 20px 18px 24px; }
    .lhub-loc { flex: 1 1 100%; }
}

/* Fallback where color-mix is unsupported */
@supports not ( background: color-mix( in srgb, #000 50%, #fff ) ) {
    .lhub-pick { border-color: #dde3ec; }
}
