/* Royal Stay Plot Finder — map.css v12
   Theme: WHITE + BLACK + RED (AKIC logo, Saym, voice call Nov 29, 2026) —
   the WHOLE site rebranded to AK. This SUPERSEDES the dark-green + gold
   v7 theme (Nov 29). Red sampled from public/akic-logo.png (dominant
   bright red #CC2B30, dark red #9C1F23 — do not guess a red).
   STRICTLY THREE COLOURS on this page: white, black, red. Pale fills are
   the same red at low alpha; muted text is the same black at low alpha —
   no green, no gold, no WhatsApp green, no other hue anywhere (not even
   in an error box or a pin). The WhatsApp action is red-on-white, not
   WhatsApp green, per the same rule.
   v12 EXCEPTION (Saym, Nov 29 — reference master-plan style): the PLOT
   RECTANGLE fills use the reference legend's own colours — 4 Kanal light
   blue #A7D2F5, 5 Kanal tan #F5BA56, 10 Kanal yellow #F3BE05 (sampled off
   the Advice Associates master plan Saym sent), other sizes neutral
   grey #E9E9E9. These are DATA colours (which size a plot is), not page
   chrome — the header, footer, buttons, pins and popups stay strictly
   white/black/red. Do not extend the legend colours to any chrome.
   Asset paths on this page are root-relative (/logo.png etc.) because
   Firebase rewrites serve index.html for every path. */
:root {
  --red:#CC2B30; --red-dark:#9C1F23;
  --red-pale:rgba(204,43,48,.07); --red-line:rgba(204,43,48,.45); --red-halo:rgba(204,43,48,.55);
  --ink:#000000; --muted:rgba(0,0,0,.62); --line:rgba(0,0,0,.16); --line-strong:rgba(0,0,0,.28);
  --bg:#ffffff; --card:#ffffff;
}
* { box-sizing:border-box; }
::selection { background:var(--red); color:#fff; }
body { margin:0; font-family:system-ui,-apple-system,"Segoe UI",Roboto,Arial,sans-serif; background:var(--bg); color:var(--ink); }
a { color:var(--red); }
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible { outline:2px solid var(--red); outline-offset:2px; }

/* Header — black with a red rule; both logos ringed in red. */
header { background:#000; color:#fff; position:sticky; top:0; z-index:1000; box-shadow:0 2px 10px rgba(0,0,0,.35); border-bottom:3px solid var(--red); }
.head-inner { max-width:1100px; margin:0 auto; padding:10px 16px; display:flex; align-items:center; gap:14px; flex-wrap:wrap; }
.brand { display:flex; align-items:center; gap:12px; flex:1; min-width:220px; }
.brand img { width:56px; height:56px; border-radius:50%; background:#000; border:2px solid var(--red); object-fit:cover; }
.akic-logo { width:56px; height:56px; border-radius:50%; background:#000; border:2px solid var(--red); object-fit:cover; }
.brand h1 { font-size:20px; margin:0; letter-spacing:.5px; color:#fff; text-transform:uppercase; /* header name renders all-caps even when settings hold the mixed-case name (admin-control, Nov 29) */ }
.brand p { margin:2px 0 0; font-size:12.5px; color:rgba(255,255,255,.78); }
nav { display:flex; gap:6px; align-items:center; flex-wrap:wrap; }
nav a { color:#fff; text-decoration:none; font-size:14px; padding:8px 10px; border-radius:8px; }
nav a:hover { background:rgba(204,43,48,.28); color:#fff; }

main { max-width:1100px; margin:0 auto; padding:18px 16px 40px; }
main > h2 { color:#000; border-bottom:3px solid var(--red); padding-bottom:10px; }
.card { background:var(--card); border:1px solid var(--line); border-radius:14px; padding:18px; margin:16px 0; box-shadow:0 2px 8px rgba(0,0,0,.08); }
.card h2 { color:#000; }
h2 { margin:0 0 8px; color:#000; }
.muted { color:var(--muted); font-size:14px; }

/* Primary button — red with white text; secondary is white with a red border. */
.btn { border:0; border-radius:10px; padding:10px 16px; font-size:14px; cursor:pointer; background:var(--red); color:#fff; font-weight:700; box-shadow:0 2px 6px rgba(204,43,48,.28); }
.btn:hover { background:var(--red-dark); }
.btn.secondary { background:#fff; color:#000; border:1.5px solid var(--red); box-shadow:none; }
.btn.secondary:hover { background:var(--red-pale); }
.hidden { display:none !important; }

/* Status boxes — pale red / black / red alert. All in palette. */
.notice { background:var(--red-pale); border:1px solid var(--red-line); border-radius:10px; padding:12px; font-size:14px; margin:10px 0; color:#000; }
.ok { background:#000; border:1.5px solid #000; border-radius:10px; padding:12px; font-size:14px; margin:10px 0; color:#fff; }
.err { background:var(--red); border:1.5px solid var(--red-dark); border-radius:10px; padding:12px; font-size:14px; margin:10px 0; color:#fff; font-weight:600; }

.field { margin:10px 0; }
.field label { display:block; font-size:13.5px; font-weight:700; margin-bottom:5px; color:#000; }
.field .hint { font-size:12.5px; color:var(--muted); font-weight:400; }
.field input, .field select { width:100%; padding:10px; border:1.5px solid var(--line-strong); border-radius:10px; font-size:15px; background:#fff; color:#000; }
.field input:focus, .field select:focus { border-color:var(--red); outline:none; box-shadow:0 0 0 3px rgba(204,43,48,.30); }
.row2 { display:grid; grid-template-columns:1fr 1fr; gap:12px; }

/* Society tabs — white/red idle, red + white active. */
.tabs { display:flex; gap:8px; flex-wrap:wrap; margin:10px 0; }
.tabs button { border:1.5px solid var(--red); background:#fff; color:#000; border-radius:20px; padding:8px 14px; cursor:pointer; font-weight:700; }
.tabs button:hover { background:var(--red-pale); }
.tabs button.on { background:var(--red); color:#fff; border-color:var(--red-dark); }

/* Ad slots — red dashed frame, pale-red fill, red "Advertisement" tag.
   The frame stays visible (Saym, Nov 28) so the ad space is seen before
   Google approves the site; a real creative replaces the placeholder. */
.ad-slot { border:1.5px dashed var(--red); border-radius:12px; background:var(--red-pale); color:#000; text-align:center; padding:14px 10px; margin:16px 0; font-size:13.5px; }
.ad-slot:empty, .ad-slot.hidden { display:none; }
.ad-slot .tag { font-size:11px; letter-spacing:2px; text-transform:uppercase; color:var(--red); font-weight:700; }

/* Map — red frame on the white page. */
#map { height:560px; border-radius:14px; border:2px solid var(--red); box-shadow:0 4px 16px rgba(0,0,0,.15); z-index:1; }
@media (max-width:640px){ #map { height:420px; } .row2{grid-template-columns:1fr;} .brand h1{font-size:17px;} }
/* Mobile only (<=480px): pull the AKIC logo closer to the header text (Saym, Nov 28 — on phones it looked far from "Real Estate"). Scoped to 480px so the laptop layout (553px CSS, verified good) is untouched.
   Mobile header compact (Nov 29): 48px logo + tighter nav, so the sticky header stays short on phones (the front-page header was ~380px tall at 746px — the map header must not be). Popup side margins shrink so a clamped popup fits a ~360px phone. */
@media (max-width:480px){ .brand h1{font-size:15px;} .brand p{font-size:11px;} .brand img.akic-inline{margin-left:0;} .brand img{width:48px;height:48px;} .brand{gap:10px;} nav a{padding:6px 8px;font-size:13px;} .leaflet-popup-content{margin:12px 14px;} }

/* Leaflet chrome in theme: black zoom buttons, red dividers, pale attribution. */
.leaflet-bar a { background:#fff; color:#000; border-bottom:1px solid var(--line); }
.leaflet-bar a:hover { background:var(--red-pale); color:var(--red); }
.leaflet-control-attribution { background:rgba(255,255,255,.88); color:var(--muted); font-size:10px; }
.leaflet-control-attribution a { color:var(--red); }
.leaflet-popup-content-wrapper { border-radius:12px; border-top:4px solid var(--red); box-shadow:0 6px 20px rgba(0,0,0,.30); }
.leaflet-popup-tip { background:#fff; box-shadow:0 2px 6px rgba(0,0,0,.20); }
.leaflet-popup-close-button { color:#000 !important; }
.leaflet-popup-close-button:hover { color:var(--red) !important; }

/* Leaflet divIcon pins (no external marker images — the default Leaflet
   marker PNGs are not shipped with the CDN CSS).
   On-load pins: black disc, red ring, white number.
   Approximate pins: red disc, black ring, white number.
   The searched pin: red disc + black ring + red halo, so it stands out
   from the on-load pins at a glance. */
.plot-pin { background:#000; color:#fff; border:2px solid var(--red); border-radius:50%; width:30px; height:30px; display:flex; align-items:center; justify-content:center; font-size:12px; font-weight:800; box-shadow:0 2px 6px rgba(0,0,0,.35); transition:transform .15s ease; }
.plot-pin:hover { transform:scale(1.18); }
.plot-pin.approx { background:var(--red); color:#fff; border-color:#000; }
.plot-pin.search { background:var(--red); color:#fff; border:2px solid #000; box-shadow:0 0 0 3px var(--red-halo), 0 2px 8px rgba(0,0,0,.40); }
.listing-pin { background:var(--red); color:#fff; border:2px solid #000; border-radius:50%; width:30px; height:30px; display:flex; align-items:center; justify-content:center; font-size:13px; font-weight:800; box-shadow:0 2px 6px rgba(0,0,0,.35); }

/* Popup — black title, black/ red actions (no WhatsApp green anywhere). */
.map-popup h3 { margin:0 0 6px; color:#000; font-size:16px; }
.map-popup p { margin:4px 0; font-size:14px; }
.map-popup .status { font-size:12.5px; font-weight:700; }
.map-popup .status.lop { color:var(--red); }
.map-popup .status.approx { color:#000; }
.map-popup .p-actions { display:flex; gap:8px; margin-top:10px; }
.map-popup .p-actions a { flex:1; text-align:center; text-decoration:none; font-weight:700; border-radius:10px; padding:9px 6px; font-size:13.5px; }
.map-popup .p-dir { background:#000; color:#fff; }
.map-popup .p-dir:hover { filter:brightness(1.6); }
.map-popup .p-wa { background:var(--red); color:#fff; }
.map-popup .p-wa:hover { background:var(--red-dark); }

/* Search results (duplicate plot numbers — same number in two size series) */
.result-list { list-style:none; margin:10px 0 0; padding:0; }
.result-list li { border:1px solid var(--line); border-radius:10px; padding:10px 12px; margin:8px 0; display:flex; justify-content:space-between; gap:10px; align-items:center; flex-wrap:wrap; background:#fff; }
.result-list li:hover { background:var(--red-pale); }
.result-list .r-meta { font-size:14px; }
.result-list .r-meta b { color:#000; }

/* Footer — black with a red rule, white links. */
footer { background:#000; color:rgba(255,255,255,.78); padding:26px 16px; border-top:3px solid var(--red); }
footer .fin { max-width:1100px; margin:0 auto; display:flex; gap:18px; align-items:center; flex-wrap:wrap; }
footer img { width:64px; height:64px; border-radius:50%; background:#000; border:2px solid var(--red); }
footer img.akic-logo { width:64px; height:64px; } /* footer logo keeps the 64px footer size (header .akic-logo is 56px) */
footer strong { color:#fff; text-transform:uppercase; } /* footer name renders all-caps even when settings hold the mixed-case name */
footer a { color:#fff; }
footer .fine { font-size:13px; line-height:1.6; }
/* Customer Support (Saym, Nov 29 ~09:26 PT): red button; the email panel
   stays hidden until the click — only then does the email appear. */
footer .support-btn { background:var(--red); color:#fff; border:0; border-radius:20px; padding:8px 16px; font-weight:700; font-size:13.5px; cursor:pointer; margin-top:10px; }
footer .support-btn:hover { background:var(--red-dark); }
footer #support-email { display:block; margin-top:8px; font-size:13px; line-height:1.6; }
footer #support-email a { background:var(--red); color:#fff; border-radius:20px; padding:6px 14px; font-weight:700; text-decoration:none; display:inline-block; margin-left:4px; }

/* AKIC logo inline at the end of the header tagline (same line as "Real Estate") + PWA install button (bottom-right corner). */
.brand img.akic-inline { width:56px; height:56px; border-radius:50%; background:#000; border:2px solid var(--red); object-fit:cover; flex:none; margin-left:6px; }
#btn-install-app { position:fixed; right:16px; bottom:16px; z-index:90; background:var(--red); color:#fff; border:0; border-radius:24px; padding:12px 18px; font-weight:700; font-size:14px; cursor:pointer; box-shadow:0 4px 14px rgba(0,0,0,.35); }
#install-help { position:fixed; right:16px; bottom:72px; z-index:91; background:#fff; color:#000; border:1.5px solid var(--red); border-radius:12px; padding:14px 16px; max-width:300px; font-size:13.5px; line-height:1.55; box-shadow:0 4px 14px rgba(0,0,0,.25); }
.hidden { display:none !important; }
/* Map page only: the fixed install button covers the map's bottom-right
   corner (and the Leaflet attribution) at any width — hide it here.
   The button stays on the homepage; install the app from there. */
#btn-install-app, #install-help { display:none !important; }

/* ---- v12: reference-style plot rectangles (Saym, Nov 29) ----
   Each placed plot is drawn as its rectangle (Leaflet polygon, colours
   set in map.js from the reference legend). The number sits inside the
   rectangle, rotated to the plot's long axis; numbers show from zoom 15
   (below that the rectangles are too small to hold a number). The big
   block letter marks the block at low zoom (hidden once numbers appear).
   The searched plot gets a big red finger marker + pulsing halo. */
.plot-rect { cursor:pointer; }
.plot-num { width:40px; height:20px; display:flex; align-items:center; justify-content:center; pointer-events:none; }
.plot-num span { display:inline-block; font-size:11px; font-weight:800; color:#000; white-space:nowrap; line-height:1;
  text-shadow:0 0 3px #fff, 0 0 3px #fff, 1px 0 0 #fff, -1px 0 0 #fff, 0 1px 0 #fff, 0 -1px 0 #fff; }
.block-letter { font-family:Georgia, 'Times New Roman', serif; font-size:84px; font-weight:800; line-height:1;
  color:#9C1F23; opacity:.85; white-space:nowrap; pointer-events:none;
  transform:translate(-50%,-50%); text-shadow:0 0 8px #fff, 0 2px 10px rgba(0,0,0,.25); }
@media (max-width:640px){ .block-letter { font-size:56px; } }
/* Big finger marker for the searched plot (gulbergmap-style): a red pin
   head with the white plot number + a point, on a pulsing red halo that
   rings the plot centre. The whole marker is ~64x72px — unmistakable
   next to the old 30px disc. */
.search-marker { position:relative; width:64px; height:72px; pointer-events:none; }
.search-halo { position:absolute; left:50%; bottom:-15px; width:30px; height:30px; margin-left:-15px;
  border:3px solid var(--red); border-radius:50%; pointer-events:none;
  animation:searchPulse 1.6s ease-out infinite; }
@keyframes searchPulse { 0% { transform:scale(.6); opacity:.95; } 100% { transform:scale(2.3); opacity:0; } }
.search-pin { position:relative; }
.search-pin-head { width:56px; height:56px; margin:0 auto; background:var(--red); border:3px solid #000;
  border-radius:50%; display:flex; align-items:center; justify-content:center;
  box-shadow:0 4px 12px rgba(0,0,0,.45); }
.search-pin-head span { color:#fff; font-size:18px; font-weight:800; letter-spacing:-.5px; white-space:nowrap; }
.search-pin-tip { width:20px; height:20px; background:var(--red); border-right:3px solid #000; border-bottom:3px solid #000;
  transform:rotate(45deg); margin:-8px auto 0; }
