/* The listings map. Tokens come from style.css (:root); this file only
   dresses the map page and the pin card. Mobile first, one thumb. */

.mapshell { border-top: 1px solid var(--line); }
.mapbar { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 14px 20px; padding: 22px 0 16px; }
.mapbar-lead h1 { margin: 2px 0 0; font-size: clamp(26px, 4.6vw, 40px); }
.mapbar-tools { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }

.mchips { display: flex; gap: 6px; background: var(--cream, #F4EDE7); border: 1px solid var(--line); border-radius: 999px; padding: 4px; }
.mchip { border: 0; background: transparent; font: 600 13.5px/1 var(--sans, Inter, sans-serif); color: var(--clay, #8A7268);
         padding: 10px 14px; min-height: 40px; border-radius: 999px; cursor: pointer; }
.mchip[aria-pressed="true"] { background: var(--ink, #22252A); color: #fff; }

.mlist-pill { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 18px; border-radius: 999px;
              background: var(--ink, #22252A); color: #fff; font: 600 14px/1 var(--sans, Inter, sans-serif); text-decoration: none; }
.mlist-pill:hover { background: var(--pop, #8A1428); }

.mapstage { position: relative; }
#rosemap { width: 100%; height: calc(100dvh - var(--map-top, 210px)); min-height: 420px; background: var(--cream, #F4EDE7); }
@supports not (height: 100dvh) { #rosemap { height: calc(100vh - var(--map-top, 210px)); } }
/* the basemap wears the house palette: warm it, quiet it */
#rosemap canvas { filter: saturate(0.82) sepia(0.05) contrast(0.98); }

.mapload { position: absolute; inset: 0; display: grid; place-content: center; gap: 10px; justify-items: center;
           background: var(--cream, #F4EDE7); color: var(--clay, #8A7268); font: 500 14px/1.4 var(--sans, Inter, sans-serif);
           transition: opacity .4s; z-index: 3; }
.mapload span { width: 26px; height: 26px; border: 2px solid var(--line); border-top-color: var(--pop, #8A1428);
                border-radius: 50%; animation: maploadspin 0.9s linear infinite; }
@keyframes maploadspin { to { transform: rotate(360deg); } }
.mapload.off { opacity: 0; pointer-events: none; }
@media (prefers-reduced-motion: reduce) { .mapload span { animation: none; } }

.mapcount { position: absolute; top: 12px; left: 50%; transform: translateX(-50%); z-index: 4; margin: 0;
            background: #fff; border: 1px solid var(--line); border-radius: 999px; padding: 9px 16px;
            font: 600 13px/1 var(--sans, Inter, sans-serif); color: var(--ink, #22252A);
            box-shadow: 0 6px 18px rgba(34, 37, 42, 0.08); white-space: nowrap; }

.mapnotice { position: absolute; left: 10px; bottom: 10px; z-index: 4; max-width: min(78vw, 460px);
             background: rgba(250, 247, 244, 0.92); border: 1px solid var(--line); border-radius: 10px;
             padding: 7px 10px; font: 400 10.5px/1.45 var(--sans, Inter, sans-serif); color: var(--clay, #8A7268); }
.mapnotice span { display: block; opacity: 0.85; }

.mapnojs { position: absolute; inset: 0; display: grid; place-content: center; background: var(--cream); z-index: 5;
           font: 400 16px/1.5 var(--sans, Inter, sans-serif); padding: 24px; text-align: center; }

/* ── the pin card ─────────────────────────────────────────────────────── */
.mapcard { position: fixed; z-index: 60; background: #fff; border: 1px solid var(--line); border-radius: 18px;
           box-shadow: 0 18px 48px rgba(34, 37, 42, 0.18); overflow: hidden; width: min(360px, calc(100vw - 24px)); }
/* phone: docked above the bottom, thumb reach; desktop: floats by the pin bar */
.mapcard { left: 50%; transform: translateX(-50%); bottom: max(14px, env(safe-area-inset-bottom)); }
@media (min-width: 900px) { .mapcard { left: auto; right: 26px; bottom: 26px; transform: none; } }
.mapcard-photo { aspect-ratio: 3 / 2; background: var(--blush, #F6EAEB); position: relative; }
.mapcard-photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.mapcard-status { position: absolute; top: 10px; left: 10px; background: rgba(255, 255, 255, 0.94); color: var(--ink);
                  font: 600 11px/1 var(--sans, Inter, sans-serif); letter-spacing: 0.04em; text-transform: uppercase;
                  border-radius: 999px; padding: 7px 10px; }
.mapcard-x { position: absolute; top: 8px; right: 8px; width: 44px; height: 44px; border: 0; border-radius: 50%;
             background: rgba(255, 255, 255, 0.94); color: var(--ink); font-size: 20px; line-height: 1; cursor: pointer; }
.mapcard-body { padding: 14px 16px 16px; }
.mapcard-price-row { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.mapcard-price { margin: 0; font: 600 22px/1.1 var(--serif, Fraunces, Georgia, serif); color: var(--ink); }
.mapcard-mark img { height: 15px; width: auto; display: block; }
.mapcard-addr { margin: 6px 0 2px; font: 500 14.5px/1.35 var(--sans, Inter, sans-serif); color: var(--ink); }
.mapcard-meta { margin: 0 0 8px; font: 400 13px/1.4 var(--sans, Inter, sans-serif); color: var(--clay); }
.mapcard-courtesy { margin: 0 0 12px; font: 400 11.5px/1.45 var(--sans, Inter, sans-serif); color: var(--clay); }
.mapcard-go { display: flex; align-items: center; justify-content: center; min-height: 46px; border-radius: 12px;
              background: var(--pop, #8A1428); color: #fff; text-decoration: none;
              font: 600 14.5px/1 var(--sans, Inter, sans-serif); }
.mapcard-go:hover { background: var(--rose-deep, #C25E63); }

/* ── the Map pill on /homes ───────────────────────────────────────────── */
.map-pill { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 18px; margin-top: 12px;
            border-radius: 999px; background: var(--ink, #22252A); color: #fff; text-decoration: none;
            font: 600 14px/1 var(--sans, Inter, sans-serif); }
.map-pill:hover { background: var(--pop, #8A1428); }
@media (max-width: 899px) {
  .map-pill { position: fixed; z-index: 55; bottom: max(16px, env(safe-area-inset-bottom)); left: 50%;
              transform: translateX(-50%); margin: 0; box-shadow: 0 10px 30px rgba(34, 37, 42, 0.28); padding: 0 22px; min-height: 48px; }
}

/* the hub's words, carried onto the map, with the exit */
.maphubchips { position: absolute; top: 58px; left: 50%; transform: translateX(-50%); z-index: 4; }
.maphub-chip { display: inline-flex; align-items: center; gap: 10px; background: var(--ink, #22252A); color: #fff;
               border-radius: 999px; padding: 9px 10px 9px 16px; font: 600 13px/1 var(--sans, Inter, sans-serif);
               box-shadow: 0 6px 18px rgba(34, 37, 42, 0.16); white-space: nowrap; }
.maphub-x { display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%;
            background: rgba(255, 255, 255, 0.16); color: #fff; text-decoration: none; font-size: 15px; }
.maphub-x:hover { background: var(--pop, #8A1428); }
