/* /rera - RERA projects: list + Google map (Views/Rera/Index.cshtml, wwwroot/js/zr-rera-map.js).
   Uses the tokens of zr-rera.css (.zrp). Desktop: list and map side by side, filling the window under the filters (the
   list scrolls on its own, the whole map is always in view); phones: the list, with a "Map" button that opens the map
   full screen under the site header. */

.zrm { --zrm-top: var(--zr-header-h, 64px); --zrm-green: #0b7a3e; --zrm-amber: #b45309; padding-bottom: 0; }
.zrm .zrm-sr { position: absolute !important; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

/* ---------- head: title + filters ---------- */
.zrm .zrm-head { background: #fff; border-bottom: 1px solid var(--zp-line); }
.zrm .zrm-headin { max-width: 1680px; margin: 0 auto; padding: 12px 20px 14px; }
.zrm .zrp-crumbs { margin: 0 0 8px; }
.zrm .zrm-title { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 16px; margin: 0 0 12px; }
.zrm .zrm-title h1 { font-size: clamp(21px, 2.2vw, 26px); font-weight: 600; line-height: 1.25; }
.zrm .zrm-sub { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 14px; margin: 0; font-size: 13.5px; color: var(--zp-muted); }
.zrm .zrm-sub b { font-weight: 600; color: var(--zp-ink); }
.zrm .zrm-sub__seal { display: inline-flex; align-items: center; gap: 4px; color: var(--zrm-green); font-weight: 500; }
.zrm .zrm-sub__seal .material-icons { font-size: 16px; color: inherit !important; }
.zrm .zrm-filters { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.zrm .zrm-q { position: relative; flex: 1 1 320px; min-width: 0; margin: 0; }
.zrm .zrm-q .material-icons { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); font-size: 20px; color: var(--zp-faint) !important; pointer-events: none; }
.zrm .zrm-q input[type=search] { box-sizing: border-box; width: 100%; height: 42px !important; margin: 0 !important; padding: 0 12px 0 40px !important; border: 1px solid var(--zp-line-strong) !important;
                                 border-radius: 10px !important; background: #fff !important; box-shadow: none !important; font-size: 14.5px; color: var(--zp-ink); }
.zrm .zrm-q input[type=search]:focus { border-color: var(--zp-brand) !important; box-shadow: 0 0 0 3px rgba(207, 0, 63, .12) !important; outline: none; }
.zrm .zrm-sel { flex: 0 1 auto; margin: 0; }
.zrm .zrm-sel select { display: block; height: 42px; min-width: 150px; max-width: 240px; margin: 0; padding: 0 30px 0 12px; border: 1px solid var(--zp-line-strong); border-radius: 10px; background-color: #fff;
                       font-size: 14px; color: var(--zp-ink); cursor: pointer; -webkit-appearance: none; appearance: none;
                       background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24'%3E%3Cpath fill='%236b7280' d='M7 10l5 5 5-5z'/%3E%3C/svg%3E");
                       background-repeat: no-repeat; background-position: right 10px center; }
.zrm .zrm-sel select:focus { border-color: var(--zp-brand); outline: none; box-shadow: 0 0 0 3px rgba(207, 0, 63, .12); }
.zrm .zrm-go { height: 42px; margin: 0; padding: 0 18px; border: 0; border-radius: 10px; background: var(--zp-brand); color: #fff; font: inherit; font-size: 14.5px; font-weight: 500; cursor: pointer; }
.zrm .zrm-go:hover { background: var(--zp-brand-dark); }
.zrm.is-live .zrm-go { display: none; }                 /* filters apply as you type / choose */

/* ---------- body: list | map ---------- */
.zrm .zrm-body { max-width: 1680px; margin: 0 auto; }
.zrm .zrm-list { min-width: 0; padding: 14px 20px 28px; }
.zrm .zrm-listhead { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px 12px; margin: 0 0 10px; min-height: 30px; }
.zrm .zrm-count { font-size: 15.5px; font-weight: 600; color: var(--zp-ink); }
.zrm .zrm-only { display: inline-flex; align-items: center; gap: 6px; margin: 0; font-size: 13.5px; color: var(--zp-slate); cursor: pointer; user-select: none; }
.zrm .zrm-only input { position: static !important; opacity: 1 !important; pointer-events: auto !important; width: 16px; height: 16px; margin: 0; accent-color: var(--zp-brand); }
.zrm .zrm-only__t { font-weight: 400; }
.zrm .zrm-only[hidden] { display: none !important; }

.zrm .zrm-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 12px; margin: 0; padding: 0; list-style: none; }
.zrm .zrm-card { position: relative; display: flex; flex-direction: column; gap: 5px; min-width: 0; margin: 0; padding: 12px 14px; list-style: none; border: 1px solid var(--zp-line); border-radius: 12px;
                 background: #fff; box-shadow: 0 1px 2px rgba(16, 24, 40, .04); transition: border-color .15s, box-shadow .15s; scroll-margin: calc(var(--zrm-top) + 12px) 0 16px; }
.zrm .zrm-card:hover, .zrm .zrm-card.is-hover { border-color: #c9ced6; box-shadow: 0 8px 20px -14px rgba(16, 24, 40, .45); }
.zrm .zrm-card.is-sel { border-color: var(--zp-brand); box-shadow: 0 0 0 1px var(--zp-brand), 0 10px 22px -16px rgba(207, 0, 63, .55); }
.zrm .zrm-card__top { display: flex; align-items: center; gap: 8px; min-width: 0; }
.zrm .zrm-card__name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 15px; font-weight: 600; line-height: 1.35; color: var(--zp-ink); text-decoration: none; }
.zrm .zrm-card__name::after { content: ""; position: absolute; inset: 0; border-radius: 12px; }           /* the whole card opens the RERA page */
.zrm .zrm-card__name:hover { color: var(--zp-brand); }
.zrm .zrm-card__name:focus-visible { outline: none; }
.zrm .zrm-card:has(:focus-visible) { border-color: var(--zp-brand); }
.zrm .zrm-card__cat { flex: none; padding: 1px 8px; border-radius: 999px; background: #f2f4f7; color: var(--zp-slate); font-size: 11.5px; line-height: 18px; white-space: nowrap; }
.zrm .zrm-card__locate { position: relative; z-index: 1; flex: none; display: inline-flex; align-items: center; justify-content: center; width: 30px; height: 30px; margin: -4px -6px -4px 0; padding: 0;
                         border: 0; border-radius: 8px; background: transparent; cursor: pointer; }
.zrm .zrm-card__locate:focus { background: transparent; }
.zrm .zrm-card__locate .material-icons { font-size: 19px; }
.zrm .zrm-card__locate--exact .material-icons { color: var(--zrm-green) !important; }
.zrm .zrm-card__locate--approx .material-icons { color: var(--zrm-amber) !important; }
.zrm .zrm-card__locate--none { cursor: default; }
.zrm .zrm-card__locate--none .material-icons { color: #c0c5cc !important; }
.zrm .zrm-card__locate:not([disabled]):hover { background: var(--zp-soft); }
.zrm .zrm-card__locate:focus-visible { outline: 2px solid var(--zp-brand); outline-offset: 1px; }
.zrm.zrm--nomap .zrm-card__locate { display: none; }
.zrm .zrm-card__meta { margin: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12.5px; line-height: 1.45; color: var(--zp-muted); }
.zrm .zrm-card__reg { display: flex; align-items: center; gap: 8px; min-width: 0; }
.zrm .zrm-card__reg code { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; padding: 2px 8px; border-radius: 6px; background: #eef8f2; border: 1px solid #cfe9d9; color: var(--zrm-green);
                           font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 12px; font-weight: 600; line-height: 18px; }
.zrm .zrm-card__reg span { margin-left: auto; flex: none; font-size: 12px; color: var(--zp-muted); white-space: nowrap; }
.zrm .zrm-card__foot { display: flex; align-items: center; gap: 8px; min-width: 0; margin-top: auto; }
.zrm .zrm-card__facts { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12.5px; color: var(--zp-slate); }
.zrm .zrm-card__facts b { font-weight: 500; color: var(--zp-ink); }
.zrm .zrm-card__proj { position: relative; z-index: 1; display: inline-flex !important; align-items: center; gap: 2px; margin-left: auto; flex: none; font-size: 12.5px; font-weight: 500; line-height: 1.3;
                       color: var(--zp-brand); text-decoration: none; white-space: nowrap; }
.zrm .zrm-card__proj:hover { text-decoration: underline; text-underline-offset: 3px; }
.zrm .zrm-card__proj .material-icons { font-size: 15px; color: inherit !important; }

.zrm .zrm-empty { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 36px 16px; border: 1px dashed var(--zp-line-strong); border-radius: 14px; background: #fff; text-align: center; color: var(--zp-muted); }
.zrm .zrm-empty .material-icons { font-size: 34px; color: var(--zp-faint) !important; }
.zrm .zrm-empty p { margin: 0; font-size: 15px; color: var(--zp-ink); }
.zrm .zrm-reset { color: var(--zp-brand); font-size: 14px; font-weight: 500; }
.zrm .zrm-nopin { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; margin: 14px 0 0; padding: 10px 12px; border-radius: 10px; background: var(--zp-amber-tint); color: #7c2d12; font-size: 13px; }
.zrm .zrm-nopin button { margin: 0; padding: 0; border: 0; background: none; color: var(--zp-brand); font: inherit; font-weight: 500; text-decoration: underline; text-underline-offset: 2px; cursor: pointer; }
.zrm .zrm-more { display: block; width: 100%; height: 44px; margin: 14px 0 0; border: 1px solid var(--zp-line-strong); border-radius: 10px; background: #fff; color: var(--zp-ink); font: inherit; font-size: 14.5px; font-weight: 500; cursor: pointer; }
.zrm .zrm-more:hover { border-color: var(--zp-ink); }
.zrm .zrm-more:focus { background: #fff; }
.zrm .zrm-pages { display: flex; align-items: center; justify-content: center; gap: 18px; margin: 18px 0 0; font-size: 14px; color: var(--zp-muted); }
.zrm .zrm-pages a { display: inline-flex !important; align-items: center; color: var(--zp-brand); font-weight: 500; text-decoration: none; }
.zrm.is-live .zrm-pages { display: none; }

/* ---------- map ---------- */
.zrm .zrm-mapcol { position: relative; min-width: 0; background: #e8eaed; }
.zrm .zrm-map { position: absolute; inset: 0; z-index: 0; }   /* own layer: pins never cover the project card / buttons */
.zrm .zrm-mapmsg { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); display: inline-flex; align-items: center; gap: 10px; max-width: calc(100% - 32px); padding: 10px 16px;
                   border-radius: 999px; background: #fff; box-shadow: 0 6px 18px -8px rgba(16, 24, 40, .35); font-size: 14px; color: var(--zp-slate); text-align: center; }
.zrm .zrm-mapmsg[hidden] { display: none !important; }
.zrm .zrm-spin { width: 16px; height: 16px; border-radius: 50%; border: 2px solid #e5e7eb; border-top-color: var(--zp-brand); animation: zrmSpin .8s linear infinite; }
@keyframes zrmSpin { to { transform: rotate(360deg); } }
.zrm .zrm-area { position: absolute; z-index: 2; left: 50%; top: 14px; transform: translateX(-50%); display: inline-flex; align-items: center; gap: 6px; height: 40px; margin: 0; padding: 0 16px;
                 border: 0; border-radius: 999px; background: #fff; color: var(--zp-ink); box-shadow: 0 6px 18px -6px rgba(16, 24, 40, .4); font: inherit; font-size: 14px; font-weight: 600; cursor: pointer; white-space: nowrap; }
.zrm .zrm-area:focus { background: #fff; }
.zrm .zrm-area[hidden] { display: none !important; }
.zrm .zrm-area .material-icons { font-size: 18px; color: var(--zp-brand) !important; }
.zrm .zrm-area:hover { background: #f9fafb; }
.zrm .zrm-legend { position: absolute; z-index: 1; left: 10px; bottom: 26px; display: flex; gap: 10px; padding: 5px 10px; border-radius: 8px; background: rgba(255, 255, 255, .92);
                   box-shadow: 0 1px 4px rgba(16, 24, 40, .18); font-size: 11.5px; color: var(--zp-slate); pointer-events: none; }
.zrm .zrm-legend span { display: inline-flex; align-items: center; gap: 5px; }
.zrm .zrm-dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; background: var(--zp-brand); border: 2px solid #fff; box-shadow: 0 0 0 1px var(--zp-brand); }
.zrm .zrm-dot--approx { background: #fff; box-shadow: 0 0 0 1px var(--zrm-amber); border-style: dashed; border-color: var(--zrm-amber); }
.zrm.is-nomap-loaded .zrm-legend { display: none; }

/* pins (content of google.maps.marker.AdvancedMarkerElement) */
.zrm-pin { position: relative; display: inline-flex; align-items: center; gap: 6px; max-width: 170px; height: 28px; padding: 0 10px 0 7px; border-radius: 999px; background: #fff; border: 1.5px solid #fff;
           box-shadow: 0 2px 6px rgba(16, 24, 40, .28); color: #111827; font: 600 12px/1 Roboto, "Segoe UI", Arial, sans-serif; white-space: nowrap; cursor: pointer;
           transform-origin: 50% 100%; transition: transform .12s, background-color .12s, color .12s; }
.zrm-pin::after { content: ""; position: absolute; left: 50%; bottom: -6px; transform: translateX(-50%); border: 6px solid transparent; border-bottom: 0; border-top-color: #fff;
                  filter: drop-shadow(0 2px 1px rgba(16, 24, 40, .18)); }
.zrm-pin__dot { flex: none; width: 10px; height: 10px; border-radius: 50%; background: #cf003f; box-shadow: 0 0 0 2px #fde7ee; }
.zrm-pin__label { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.zrm-pin--approx { border: 1.5px dashed #b45309; }
.zrm-pin--approx .zrm-pin__dot { background: #fff; box-shadow: 0 0 0 2px #b45309; }
.zrm-pin.is-hover, .zrm-pin.is-sel { background: #cf003f; border-color: #cf003f; color: #fff; transform: scale(1.08); }
.zrm-pin.is-hover::after, .zrm-pin.is-sel::after { border-top-color: #cf003f; }
.zrm-pin.is-hover .zrm-pin__dot, .zrm-pin.is-sel .zrm-pin__dot { background: #fff; box-shadow: 0 0 0 2px rgba(255, 255, 255, .45); }
/* zoomed out (city level): pins are dots, the name shows on hover / when chosen */
.zrm-far .zrm-pin { height: 18px; padding: 0 4px; gap: 0; }
.zrm-far .zrm-pin::after { bottom: -5px; border-width: 5px 5px 0; }
.zrm-far .zrm-pin .zrm-pin__label { display: none; }
.zrm-far .zrm-pin.is-hover, .zrm-far .zrm-pin.is-sel { height: 28px; padding: 0 10px 0 7px; gap: 6px; }
.zrm-far .zrm-pin.is-hover .zrm-pin__label, .zrm-far .zrm-pin.is-sel .zrm-pin__label { display: block; }
.zrm-cluster { display: flex; align-items: center; justify-content: center; width: var(--s, 38px); height: var(--s, 38px); border-radius: 50%; background: #cf003f; color: #fff;
               box-shadow: 0 0 0 5px rgba(207, 0, 63, .22), 0 3px 8px rgba(16, 24, 40, .3); font: 700 13px/1 Roboto, "Segoe UI", Arial, sans-serif; cursor: pointer; transition: transform .12s; }
.zrm-cluster:hover, .zrm-cluster.is-hover { transform: scale(1.08); }

/* selected project over the map */
.zrm .zrm-pop { position: absolute; z-index: 3; left: 16px; bottom: 16px; width: min(400px, calc(100% - 32px)); padding: 14px 16px; border-radius: 14px; background: #fff;
                box-shadow: 0 18px 40px -16px rgba(16, 24, 40, .5), 0 2px 6px rgba(16, 24, 40, .12); animation: zrmUp .16s ease-out; }
@keyframes zrmUp { from { transform: translateY(8px); opacity: 0; } to { transform: none; opacity: 1; } }
.zrm .zrm-pop__close { position: absolute; right: 8px; top: 8px; display: inline-flex; align-items: center; justify-content: center; width: 30px; height: 30px; margin: 0; padding: 0; border: 0; border-radius: 50%;
                       background: #f2f4f7; color: var(--zp-slate); cursor: pointer; }
.zrm .zrm-pop__close:focus { background: #f2f4f7; }
.zrm .zrm-pop__close .material-icons { font-size: 18px; color: inherit !important; }
.zrm .zrm-pop h3 { margin: 0 34px 2px 0; font-size: 16.5px; font-weight: 600; line-height: 1.3; }
.zrm .zrm-pop h3 a { color: var(--zp-ink); text-decoration: none; }
.zrm .zrm-pop h3 a:hover { color: var(--zp-brand); }
.zrm .zrm-pop__meta { margin: 0 0 8px; font-size: 13px; color: var(--zp-muted); }
.zrm .zrm-pop__approx { display: inline-flex; align-items: center; gap: 4px; margin: 0 0 8px; padding: 2px 8px; border-radius: 6px; background: var(--zp-amber-tint); color: #92400e; font-size: 12px; }
.zrm .zrm-pop__approx .material-icons { font-size: 14px; color: inherit !important; }
.zrm .zrm-pop .zrm-card__reg { margin: 0 0 6px; }
.zrm .zrm-pop .zrm-card__facts { display: block; margin: 0 0 12px; white-space: normal; }
.zrm .zrm-pop__btns { display: flex; gap: 8px; }
.zrm .zrm-pop__btns a { flex: 1 1 0; display: inline-flex !important; align-items: center; justify-content: center; gap: 4px; height: 40px; border-radius: 10px; font-size: 14px; font-weight: 500;
                        text-decoration: none; white-space: nowrap; }
.zrm .zrm-pop__btns .zrm-btn-main { background: var(--zp-brand); color: #fff !important; }
.zrm .zrm-pop__btns .zrm-btn-main:hover { background: var(--zp-brand-dark); }
.zrm .zrm-pop__btns .zrm-btn-alt { border: 1px solid var(--zp-line-strong); background: #fff; color: var(--zp-ink) !important; }
.zrm .zrm-pop__btns .zrm-btn-alt:hover { border-color: var(--zp-ink); }

/* phone switch button */
.zrm .zrm-switch { display: none; }

/* ---------- desktop: list | map side by side ---------- */
@media (min-width: 992px) {
    /* --zrm-fit: window height below the filters (zr-rera-map.js measures it; 100vh - 260px without JavaScript) */
    .zrm .zrm-body { display: grid; grid-template-columns: minmax(400px, 46%) minmax(0, 1fr); max-width: none; height: var(--zrm-fit, calc(100vh - 260px)); min-height: 480px; }
    .zrm.zrm--nomap .zrm-body { display: block; max-width: 1240px; height: auto; min-height: 0; }
    .zrm .zrm-headin { max-width: none; padding-left: 24px; padding-right: 24px; }
    .zrm.zrm--nomap .zrm-headin { max-width: 1240px; padding-left: 20px; padding-right: 20px; }
    .zrm .zrm-list { padding: 16px 20px 32px 24px; overflow-y: auto; scrollbar-width: thin; scrollbar-color: #c9ced6 transparent; }
    .zrm.zrm--nomap .zrm-list { overflow: visible; }
    .zrm .zrm-list::-webkit-scrollbar { width: 8px; }
    .zrm .zrm-list::-webkit-scrollbar-thumb { background: #c9ced6; border-radius: 8px; }
    .zrm .zrm-mapcol { position: relative; height: 100%; border-left: 1px solid var(--zp-line); }
    .zrm .zrm-card { scroll-margin: 12px 0; }
}
@media (min-width: 1500px) {
    .zrm .zrm-body { grid-template-columns: minmax(400px, 52%) minmax(0, 1fr); }
}

/* ---------- phones / tablets: list, "Map" opens the map ---------- */
@media (max-width: 991px) {
    .zrm .zrm-headin, .zrm .zrm-list { padding-left: 16px; padding-right: 16px; }
    .zrm .zrm-q { flex-basis: 100%; }
    .zrm .zrm-sel { flex: 1 1 140px; }
    .zrm .zrm-sel select { width: 100%; min-width: 0; max-width: none; }
    .zrm .zrm-mapcol { display: none; }
    .zrm.is-map .zrm-mapcol { display: block; position: fixed; z-index: 970; left: 0; right: 0; top: var(--zrm-top); bottom: 0; }
    /* --zrm-bar: the site's Call / WhatsApp bar at the bottom of phones (measured by zr-rera-map.js) - the button sits above it */
    .zrm .zrm-switch { position: fixed; z-index: 975; left: 50%; bottom: calc(14px + var(--zrm-bar, 0px) + env(safe-area-inset-bottom, 0px)); transform: translateX(-50%); display: inline-flex; align-items: center; gap: 8px;
                       height: 46px; margin: 0; padding: 0 20px; border: 0; border-radius: 999px; background: #111827; color: #fff; box-shadow: 0 10px 24px -8px rgba(16, 24, 40, .6);
                       font: inherit; font-size: 15px; font-weight: 600; cursor: pointer; }
    .zrm .zrm-switch:focus { background: #111827; }
    .zrm .zrm-switch .material-icons { font-size: 20px; color: inherit !important; }
    .zrm.zrm--nomap .zrm-switch { display: none; }
    .zrm .zrm-list { padding-bottom: calc(84px + var(--zrm-bar, 0px)); }
    .zrm.is-map .zrm-switch { bottom: calc(18px + env(safe-area-inset-bottom, 0px)); }      /* the map covers the site's bar */
    .zrm .zrm-pop { left: 12px; right: 12px; width: auto; bottom: calc(76px + env(safe-area-inset-bottom, 0px)); }
    .zrm .zrm-legend { bottom: auto; top: 64px; }
    .zrm .zrm-cards { grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
}
@media (prefers-reduced-motion: reduce) {
    .zrm .zrm-pop, .zrm-pin, .zrm-cluster, .zrm .zrm-spin { animation: none; transition: none; }
}
