/* Halal Nearby: a map, a local guide, or both. */
.hms-tools.t-nearby { display: flex; color: var(--t-ink); }
.t-nearby .t-widget-header { padding: 12px 18px; gap: 10px; }
.t-nearby .t-widget-header > div { flex: 1; }
.t-nearby .t-widget-header h1 { font-size: 20px; }
.t-nearby .t-widget-header .t-kicker { font-size: 7px; margin-bottom: 3px; }
.t-nearby .t-lookup-brand { flex-basis: 44px; width: 44px; height: 44px; border-radius: 12px; }
.t-nearby .t-lookup-brand img { width: 36px; height: 36px; }
.t-nearby .t-nearby-location { display: flex; align-items: center; gap: 5px; min-width: 0; margin-top: 4px; font-size: 11px; line-height: 1.4; font-weight: 400; color: inherit; opacity: .85; }
.t-nearby-location svg { width: 13px; height: 13px; flex-shrink: 0; }
.t-nearby-location span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.t-nearby #widget-expand { display: inline-flex; align-items: center; justify-content: center; padding: 0; line-height: 1; color: inherit; background: #ffffff18; border: 1px solid currentColor; opacity: .8; border-radius: 10px; width: 34px; height: 34px; flex: 0 0 34px; }
.t-nearby #widget-expand svg { display: block; width: 18px; height: 18px; }
.t-nearby #widget-expand:hover { opacity: 1; box-shadow: 0 3px 12px #10254d18; }
.t-nearby .t-widget-filters { padding: 9px 18px; background: var(--t-paper); border-bottom: 1px solid var(--t-line); flex-shrink: 0; }
.t-nearby-filter-actions { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; align-items: center; gap: 12px; width: 100%; }
.t-nearby .t-widget-filters select { min-width: 0; width: 100%; }
.t-nearby-open-toggle { position: relative; display: inline-flex; align-items: center; gap: 5px; cursor: pointer; font-size: 10px; font-weight: 500; white-space: nowrap; color: var(--t-muted); }
.t-nearby-open-toggle input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.t-nearby-switch { width: 25px; height: 15px; border-radius: 12px; background: var(--t-line); border: 1px solid var(--t-muted); position: relative; flex-shrink: 0; transition: background .15s; }
.t-nearby-switch::after { content: ''; position: absolute; width: 9px; height: 9px; top: 2px; left: 2px; background: white; border-radius: 50%; box-shadow: 0 1px 3px #21365d30; transition: transform .15s; }
.t-nearby-open-toggle input:checked + .t-nearby-switch { background: #248165; border-color: #248165; }
.t-nearby-open-toggle input:checked + .t-nearby-switch::after { transform: translateX(10px); }
.t-nearby-open-toggle input:checked ~ span:last-child { color: var(--lookup-open); }
.t-nearby-open-toggle input:focus-visible + .t-nearby-switch { outline: 3px solid #90ace7; outline-offset: 3px; }
.t-nearby .t-widget-filters .t-input { min-height: 36px; max-width: 240px; padding: 8px 10px; border-radius: 9px; font-size: 10px !important; }
.t-nearby #nearby-reset { display: inline-flex; align-items: center; gap: 4px; font-size: 11px; font-weight: 500; white-space: nowrap; padding: 7px 2px; }
.t-nearby #nearby-reset svg { width: 15px; height: 15px; }
.t-nearby-content { display: flex; flex-direction: column; flex: 1; min-height: 0; }
.t-nearby-map-wrap { position: relative; height: 42%; min-height: 210px; flex-shrink: 0; border-bottom: 1px solid var(--t-line); }
.t-nearby .t-widget-map { width: 100%; height: 100%; min-height: 0; }
.t-nearby-map-hint, .t-nearby-map-summary { position: absolute; left: 12px; background: #fffffff2; color: #334c74; border: 1px solid #d9e3f3; box-shadow: 0 3px 12px #18337512; border-radius: 8px; padding: 7px 10px; font-size: 9px; line-height: 1.4; pointer-events: none; max-width: calc(100% - 65px); }
.t-nearby-map-hint { top: 12px; }
.t-nearby-map-summary { bottom: 27px; display: none; }
.t-nearby-list { display: flex; flex-direction: column; flex: 1; min-height: 0; overflow: hidden; }
.t-nearby .t-widget-list-heading { padding: 13px 18px 10px; flex-shrink: 0; gap: 8px; }
.t-nearby .t-widget-list-heading > div { display: flex; align-items: center; gap: 9px; flex-wrap: wrap; }
.t-nearby .t-widget-list-heading strong { color: var(--t-ink); font-size: 12px; font-weight: 600; }
.t-nearby .t-widget-list-heading .t-help { font-size: 10px; white-space: nowrap; }
.t-nearby-sort { color: var(--t-muted); font-size: 9px; }
.t-nearby-sort::before { content: '↗'; display: inline-block; margin-right: 4px; }
.t-nearby .t-widget-results { padding: 0 16px 12px; align-content: start; grid-auto-rows: max-content; scrollbar-width: thin; scrollbar-color: #b8c8e1 transparent; }
.t-nearby-distance { display: inline-flex; align-items: center; gap: 4px; margin-top: 8px; font-size: 10px; font-weight: 600; line-height: 1.5; color: var(--t-primary); }
.t-nearby-distance svg { width: 13px; height: 13px; }
.t-nearby .t-lookup-card-bottom { display: block; }
.t-nearby .t-lookup-hours { display: flex; gap: 4px 10px; }
.t-nearby .t-lookup-card-bottom .t-lookup-actions { margin-top: 10px; }
.t-nearby-note { font-size: 8px; line-height: 1.5; text-align: center; padding: 7px 16px 9px; color: var(--t-muted); flex-shrink: 0; }
.t-nearby-routing-credit { display: none; width: fit-content; margin: 6px auto 0; padding: 3px 7px; background: white; border-radius: 4px; }
.t-nearby-routing-credit img { display: block; width: 100px; height: auto; }
.t-nearby[data-nearby-layout=cards] .t-nearby-routing-credit, .t-nearby.t-nearby-map-unavailable .t-nearby-routing-credit { display: block; }
.t-nearby .t-powered { flex-shrink: 0; margin-top: 0; padding: 10px 16px; }
.t-nearby .t-powered a { justify-content: center; }
.t-nearby-empty { padding: 25px 12px; text-align: center; }
.t-nearby-empty > svg { width: 28px; height: 28px; color: var(--t-primary); display: block; margin: 0 auto 10px; }
.t-nearby-empty strong { font-size: 13px; font-weight: 600; }
.t-nearby-empty p { font-size: 11px; line-height: 1.6; color: var(--t-muted); margin-top: 6px; }
.t-nearby[data-nearby-layout=map] .t-nearby-list { display: none; }
.t-nearby[data-nearby-layout=map] .t-nearby-map-wrap { height: auto; flex: 1; }
.t-nearby[data-nearby-layout=map] .t-nearby-map-summary { display: block; }
.t-nearby[data-nearby-layout=cards] .t-nearby-map-wrap, .t-nearby.t-nearby-map-unavailable .t-nearby-map-wrap { display: none; }
.t-nearby.t-nearby-map-unavailable .t-nearby-list { display: flex; }
.t-nearby[data-lookup-size=small] .t-widget-header { padding: 11px 14px; }
.t-nearby[data-lookup-size=small] .t-widget-header h1 { font-size: 18px; }
.t-nearby[data-lookup-size=small] .t-lookup-brand { flex-basis: 42px; width: 42px; height: 42px; border-radius: 12px; }
.t-nearby[data-lookup-size=small] .t-lookup-brand img { width: 34px; height: 34px; }
.t-nearby[data-lookup-size=small] .t-widget-filters { padding: 8px 14px; }
.t-nearby[data-lookup-size=small] .t-widget-list-heading { padding: 11px 12px 9px; }
.t-nearby[data-lookup-size=small] .t-widget-results { padding: 0 11px 10px; }
.t-nearby[data-lookup-size=small] .t-nearby-map-wrap { min-height: 195px; height: 38%; }
.t-nearby[data-lookup-size=small][data-nearby-layout=map] .t-nearby-map-wrap { height: auto; }

/* Clear blue pins, numbered groups, and readable labels at street level. */
.t-nearby-pins { position: absolute; left: 0; top: 0; }
.t-nearby .t-nearby-pin { position: absolute; display: flex; align-items: center; width: 34px; height: 34px; margin: -17px 0 0 -17px; padding: 0; background: none; border: 0; border-radius: 50%; overflow: visible; cursor: pointer; font-family: 'Segoe UI', Arial, sans-serif; z-index: 2; }
.t-nearby-pin-dot { display: grid; place-items: center; width: 30px; height: 30px; margin: 2px; flex: 0 0 30px; background: linear-gradient(140deg, #4978c6, #283b90); color: #fff; border: 2px solid #fff; border-radius: 50%; box-shadow: 0 2px 5px #18376a55; font-size: 13px; font-weight: 650; transition: transform .18s, box-shadow .18s; }
.t-nearby-pin-dot svg { width: 16px; height: 16px; }
.t-nearby-pin.is-retailer .t-nearby-pin-dot { background: linear-gradient(140deg, #438caa, #235c8e); }
.t-nearby-pin.is-cluster .t-nearby-pin-dot { width: 38px; height: 38px; flex-basis: 38px; margin: -2px; border: 3px solid white; outline: 5px solid #3f67ad22; }
.t-nearby-pin.is-venue { z-index: 3; }
.t-nearby-pin.is-venue .t-nearby-pin-dot { background: white; color: #3767b7; box-shadow: 0 0 0 6px #5181c928, 0 2px 6px #17326144; border: 2px solid #567ecc; width: 25px; height: 25px; flex-basis: 25px; margin: 4.5px; }
.t-nearby-pin-label { display: none; position: absolute; left: 37px; min-width: 95px; max-width: 170px; padding: 6px 9px; text-align: left; border: 1px solid #d2def0; border-radius: 8px; background: #fffffffa; box-shadow: 0 2px 8px #1732611a; color: #273e6c; font-size: 10px; line-height: 1.3; }
.t-nearby-pin-label strong { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; font-weight: 600; overflow: hidden; white-space: normal; }
.t-nearby-pin-label > span { display: block; margin-top: 2px; color: #5f7494; font-size: 9px; white-space: nowrap; }
.t-nearby-pin-label > small { display: block; margin-top: 2px; color: #5f7494; font-size: 8px; white-space: nowrap; }
.t-nearby-pin.has-label .t-nearby-pin-label { display: block; }
.t-nearby-pin.label-left .t-nearby-pin-label { left: auto; right: 37px; }
.t-nearby-pin:hover, .t-nearby-pin:focus-visible { z-index: 10; }
.t-nearby-pin:hover .t-nearby-pin-label, .t-nearby-pin:focus-visible .t-nearby-pin-label { display: block; }
.t-nearby-pin:hover .t-nearby-pin-dot { transform: translateY(-2px); box-shadow: 0 4px 10px #18376a55; }
.t-nearby-pin:focus-visible { outline: 3px solid #779ada; outline-offset: 3px; }
.t-nearby-pin-line { position: absolute; height: 1px; transform-origin: left center; background: #4978b9aa; pointer-events: none; }

/* Map-only popups carry the full card, including opening times and actions. */
.t-nearby .gm-style .gm-style-iw-c { padding: 0; border: 1px solid var(--t-line); border-radius: 15px; background: var(--t-paper); box-shadow: 0 9px 30px #18337530; }
.t-nearby .gm-style .gm-style-iw-d { overflow: auto !important; scrollbar-width: thin; background: var(--t-paper); }
.t-nearby .gm-style .gm-style-iw-tc::after { background: var(--t-paper); }
.t-nearby .gm-style .gm-style-iw-chr { height: 30px; }
.t-nearby .gm-style .gm-style-iw-ch { padding: 0; }
.t-nearby .gm-style .gm-ui-hover-effect { width: 30px !important; height: 30px !important; margin: 0 !important; }
.t-nearby .gm-style-iw-chr .gm-ui-hover-effect > span { width: 18px !important; height: 18px !important; margin: 6px !important; }
.t-nearby[data-theme=dark] .gm-style .gm-ui-hover-effect > span { filter: invert(1); }
.t-nearby-popup { width: 340px; max-width: 100%; color: var(--t-ink); font-family: 'Segoe UI', Arial, sans-serif; }
.t-nearby-popup .t-lookup-card { border: 0; border-radius: 0; box-shadow: none; background: var(--t-paper); }
.t-nearby-popup .t-lookup-card-main { padding: 0 12px 12px; grid-template-columns: 58px minmax(0, 1fr); gap: 10px; }
.t-nearby .t-nearby-popup .t-lookup-card h3 { font-size: 15px; }
.t-nearby-popup .t-lookup-photo { min-height: 75px; }
.t-nearby-popup .t-lookup-card-bottom { margin: 0 12px; padding-top: 10px; }
.t-nearby-popup .t-lookup-card-meta > span:first-child { display: none; }
.t-nearby .t-nearby-popup .t-lookup-actions a, .t-nearby-popup .t-lookup-action-unavailable { padding: 8px 5px; font-size: 10px; gap: 3px; }
.t-nearby-popup .t-lookup-actions svg { width: 12px; height: 12px; }

@media (max-width: 540px) {
    .t-nearby .t-widget-header h1 { font-size: 19px; }
    .t-nearby .t-widget-header { padding: 12px 14px; }
    .t-nearby .t-lookup-card-main { grid-template-columns: 64px minmax(0, 1fr); gap: 11px; }
    .t-nearby .t-widget-list-heading > div { gap: 4px 8px; }
    .t-nearby-pin-label { max-width: 135px; }
}
@media (min-width: 760px) {
    .t-nearby[data-nearby-layout=cards] .t-widget-results { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .t-nearby[data-nearby-layout=cards] #nearby-more { grid-column: 1 / -1; }
}
@media (min-width: 960px) {
    .t-nearby:not([data-nearby-layout=cards]):not([data-nearby-layout=map]) .t-nearby-content { flex-direction: row; }
    .t-nearby:not([data-nearby-layout=cards]):not([data-nearby-layout=map]) .t-nearby-map-wrap { height: 100%; flex: 1; border-bottom: 0; border-right: 1px solid var(--t-line); }
    .t-nearby:not([data-nearby-layout=cards]):not([data-nearby-layout=map]) .t-nearby-list { flex: 0 0 380px; }
}
@media (max-height: 520px) {
    .t-nearby .t-widget-header { padding-top: 9px; padding-bottom: 9px; }
    .t-nearby .t-nearby-map-wrap { min-height: 150px; }
    .t-nearby .t-widget-filters { padding-top: 8px; padding-bottom: 8px; }
}
@media (prefers-reduced-motion: reduce) { .t-nearby-pin-dot { transition: none; } }

/* A tiny map in the appearance chooser helps explain the finished guide. */
.t-nearby-appearances .t-appearance-sample { height: 99px; }
.t-nearby-appearances .t-appearance-search { position: relative; height: 28px; margin: 0; border: 0; border-radius: 0; background: repeating-linear-gradient(35deg, transparent 0 19px, #fff9 20px 23px, transparent 24px 44px), linear-gradient(115deg, #e8eef7 64%, #bbd8e9 65%); }
.t-nearby-appearances .t-appearance-search::before, .t-nearby-appearances .t-appearance-search::after { content: ''; position: absolute; width: 7px; height: 7px; top: 8px; left: 29%; border-radius: 50%; border: 1px solid white; background: #4066ad; box-shadow: 22px 5px 0 #4066ad; }
.t-nearby-appearances .t-appearance-search::after { left: 68%; top: 13px; width: 10px; height: 10px; }
.t-nearby-appearances .t-appearance-card { margin-top: 6px; }
