/* India Theatre Map page (build_comingsoon.py renders /india-map-view-insight/).
   Uses the site theme variables from style.css; map library CSS loads separately. */
.map-stats-row{display:flex;gap:10px;flex-wrap:wrap;margin:6px 0 14px}
.map-stat{background:var(--card);border:1px solid var(--line);border-radius:14px;padding:10px 16px;min-width:120px}
.map-stat b{display:block;font-size:22px;font-weight:800;letter-spacing:-.02em;font-variant-numeric:tabular-nums}
.map-stat span{font-size:12px;color:var(--mut);text-transform:uppercase;letter-spacing:.08em}
.map-app{margin:10px 0 18px}
.map-tools{display:flex;flex-wrap:wrap;gap:12px;align-items:end;margin:0 0 12px}
.map-search{flex:1 1 260px}
.map-search input{width:100%;padding:11px 14px;border-radius:12px;border:1px solid var(--line);background:transparent;color:var(--tx);font:inherit;font-size:15px}
.map-side .map-tools .map-search input{display:block;width:100%;max-width:none;box-sizing:border-box}
.map-side .map-tools .map-search .q-wrap{display:block;width:100%}
.map-side .map-tools .map-search .q-wrap input{width:100%}
.map-filters{display:flex;flex-wrap:wrap;gap:10px;align-items:end}
.map-filters label{display:flex;flex-direction:column;gap:4px;font-size:12px;color:var(--mut);font-weight:600}
.map-filters select{font:inherit;font-size:14px;font-weight:600;color:var(--tx);background:transparent;border:1px solid var(--line);border-radius:10px;padding:8px 10px;max-width:190px}
.map-chk{flex-direction:row !important;align-items:center;gap:7px !important;font-size:13px !important;color:var(--tx) !important;padding-bottom:9px}
.map-chk input{width:17px;height:17px;accent-color:var(--red)}
.map-views{display:flex;border:1px solid var(--line);border-radius:99px;overflow:hidden;width:100%}
.map-views button{flex:1 1 0}
.map-views button{font:inherit;font-size:13px;font-weight:700;padding:9px 15px;background:transparent;color:var(--mut);border:0;cursor:pointer}
.map-views button.on{background:var(--tx);color:var(--bg)}
.map-count{width:100%;margin:0;padding:2px 2px 0;line-height:1.45;font-size:13px;color:var(--mut);font-variant-numeric:tabular-nums}
.map-stage{display:grid;gap:14px}
@media(min-width:1000px){
.map-stage{grid-template-columns:minmax(0,65fr) minmax(0,35fr);align-items:stretch;height:calc(100vh - 168px);min-height:640px;width:min(1680px,97.5vw);position:relative;left:50%;transform:translateX(-50%)}
.imap{height:100%}
.map-side{overflow-y:auto;height:100%;padding-right:4px;scrollbar-width:thin;align-content:start}
.map-tools{flex-direction:column;align-items:stretch;gap:10px}
.map-filters label{flex:1 1 44%}
.map-filters select{max-width:none;width:100%}
}
.imap{height:68vh;min-height:460px;border-radius:var(--r);border:1px solid var(--line);overflow:hidden;background:var(--bg2);box-shadow:0 12px 32px rgba(2,6,23,.10)}
.map-side{display:grid;gap:12px}
.map-side .card{margin:0}
.map-lb h2{font-size:16px}
.map-top .map-vp{border-top:1px solid var(--line);margin-top:12px;padding-top:10px}
.map-vp h2{font-size:11px;text-transform:uppercase;letter-spacing:.09em;color:var(--mut);margin:0 0 6px;font-weight:700}
.map-vp .vp-grid{display:grid;grid-template-columns:1fr 1fr;gap:4px 12px;margin-top:0}
.map-vp p.note{margin-top:5px !important;font-size:11.5px}
.map-vp .vp-grid div b{display:block;font-size:19px;font-variant-numeric:tabular-nums}
.map-vp .vp-grid div span{font-size:11px;color:var(--mut);text-transform:uppercase;letter-spacing:.07em}
.map-tools #mapResults{max-height:430px;overflow:auto}
.map-r{display:block;width:100%;text-align:left;background:transparent;border:0;border-bottom:1px solid var(--line);color:var(--tx);font:inherit;padding:9px 2px;cursor:pointer}
.map-r:last-child{border-bottom:0}
.map-r b{display:block;font-size:14px;line-height:1.3}
.map-r span{font-size:12px;color:var(--mut)}
.map-r:hover b{color:var(--gold)}
.card.map-tcard h2{font-size:19px;line-height:1.25;margin:0 46px 4px 0;white-space:normal;overflow:visible;text-overflow:clip;overflow-wrap:break-word}
.map-tcard .tc-sub{color:var(--mut);font-size:13px;margin:0 0 10px}
.map-tcard .tc-chips{display:flex;flex-wrap:wrap;gap:6px;margin:0 0 10px}
.map-tcard .tc-chip{font-size:11px;font-weight:700;padding:3px 9px;border-radius:99px;border:1px solid var(--line);color:var(--tx)}
.map-tcard .tc-chip.hot{border-color:var(--red);color:var(--red)}
.map-tcard table{font-size:13px}
.map-tcard .tc-meta{font-size:12px;color:var(--mut);margin:10px 0 0;line-height:1.6}
.map-tcard{position:relative}
.map-tcard .tc-x{position:absolute;top:12px;right:12px;width:30px;height:30px;border-radius:9px;border:1px solid var(--line);background:transparent;color:var(--mut);cursor:pointer;display:grid;place-items:center}
.map-note{font-size:12px;color:var(--mut);margin:10px 2px 0}
.map-tbl td.num,.map-tbl th.num{text-align:right;font-variant-numeric:tabular-nums}
.map-lb-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:14px}
.map-lb h2{font-size:16px;margin-bottom:6px}
.lb-row{display:grid;grid-template-columns:24px 1fr auto;align-items:center;gap:10px;padding:7px 0;border-bottom:1px solid var(--line)}
.lb-row:last-child{border-bottom:0}
.lb-rank{font-size:12px;font-weight:800;color:var(--mut);text-align:center;font-variant-numeric:tabular-nums}
.lb-rank.top{color:var(--red)}
.lb-name{font-size:13.5px;font-weight:600;line-height:1.25;min-width:0}
.lb-bar{display:block;height:4px;border-radius:99px;background:var(--bg2);margin-top:5px;overflow:hidden}
.lb-bar i{display:block;height:100%;border-radius:99px;background:linear-gradient(90deg,var(--gold),var(--red))}
.lb-w4{width:4%}.lb-w8{width:8%}.lb-w12{width:12%}.lb-w16{width:16%}.lb-w20{width:20%}.lb-w24{width:24%}.lb-w28{width:28%}.lb-w32{width:32%}.lb-w36{width:36%}.lb-w40{width:40%}.lb-w44{width:44%}.lb-w48{width:48%}.lb-w52{width:52%}.lb-w56{width:56%}.lb-w60{width:60%}.lb-w64{width:64%}.lb-w68{width:68%}.lb-w72{width:72%}.lb-w76{width:76%}.lb-w80{width:80%}.lb-w84{width:84%}.lb-w88{width:88%}.lb-w92{width:92%}.lb-w96{width:96%}.lb-w100{width:100%}
.lb-n{font-size:13.5px;font-variant-numeric:tabular-nums}
.map-howto{display:grid;grid-template-columns:repeat(3,1fr);gap:14px;margin-top:14px}
.howto h3{font-size:15px;margin:9px 0 4px}
.howto p{font-size:13px;color:var(--mut);margin:0;line-height:1.55}
.howto-ic{display:inline-grid;place-items:center;width:34px;height:34px;border-radius:10px;background:transparent;border:1px solid var(--line);color:var(--red)}
@media(max-width:1000px){.map-lb-grid,.map-howto{grid-template-columns:1fr}}
.map-fallback{padding:22px;color:var(--mut);font-size:14px;line-height:1.6}
.map-reset-btn{display:flex;align-items:center;justify-content:center;width:32px;height:32px;padding:0;border:0;background:transparent;color:#333;cursor:pointer}
.map-reset-btn:hover{color:var(--red)}
.map-legend-wrap{background:transparent;box-shadow:none}
.map-legend{display:flex;align-items:center;flex-wrap:wrap;row-gap:4px;gap:12px;max-width:min(480px,calc(100vw - 96px));background:var(--card);border:1px solid var(--line);border-radius:16px;padding:7px 13px;font-size:11.5px;font-weight:600;color:var(--tx);box-shadow:0 4px 14px rgba(2,6,16,.25)}
.map-legend>span{white-space:nowrap}
.map-legend .lg-item{display:inline-flex;align-items:center;gap:6px;white-space:nowrap}
.map-legend .lg-dot{width:13px;height:13px;border-radius:50%;display:inline-block;border:1.5px solid rgba(255,255,255,.92);box-shadow:0 0 0 1.5px rgba(15,23,42,.55);flex:none}
.map-legend .lg-dot.mx{background:#4287f5}
.map-legend .lg-dot.sg{background:#4287f5}
:root[data-theme=dark] .map-legend .lg-dot.mx{background:#60a5fa}
:root[data-theme=dark] .map-legend .lg-dot.sg{background:#4287f5}
.map-legend .lg-cluster{display:inline-grid;place-items:center;width:21px;height:21px;border-radius:50%;color:#fff;font-size:10px;font-style:normal;font-weight:800;flex:none;border:2px solid rgba(255,255,255,.92);box-shadow:0 0 0 1.5px rgba(15,23,42,.55)}
.map-legend .lg-cluster.cl{background:#818cf8}
:root[data-theme=dark] .map-legend .lg-cluster.cl{background:#a78bfa}
.map-legend.heat{gap:8px}
/* Heat legend on ONE line (Avi, 2026-11-21): the "Very few theatres"
   swatch used to wrap to a second row and cover a slice of the map.
   Smaller type, tighter gaps and a shorter gradient keep the whole
   row - Fewer theatres, gradient, More theatres, swatch - on one
   line at phone width, and the legend box is one line tall. */
.map-legend.heat{flex-wrap:nowrap;gap:7px}
.map-legend.heat>span{white-space:nowrap}
.map-legend.heat .lg-grad{width:76px}
.map-legend.heat .lg-pres{flex-basis:auto;gap:5px}
.map-legend .lg-grad{display:inline-block;width:90px;height:8px;border-radius:99px;background:linear-gradient(90deg,#fee0b2,#fdac5c,#f97316,#dc2626,#991b1b);box-shadow:inset 0 0 0 1px var(--line)}
/* Presence swatch (mirrors the live map's legend): the faint
   warm tint the grid paints where theatres stand but the count
   is at the low end (#fff0d2, the canvas wash at full strength). */
.map-legend .lg-pres{display:inline-flex;align-items:center;gap:6px;flex-basis:100%;white-space:nowrap}
.map-legend .lg-pres i{width:12px;height:12px;border-radius:3px;background:#fff0d2;box-shadow:inset 0 0 0 1px var(--line);flex:none}
@media(max-width:560px){.map-legend{gap:8px;font-size:10.5px;padding:6px 10px}.map-legend .lg-grad{width:56px}.map-legend.heat{gap:5px;font-size:10px;padding:6px 9px}.map-legend.heat .lg-grad{width:42px}.map-legend.heat .lg-pres i{width:10px;height:10px}}
.maplibregl-popup-content{background:var(--card);color:var(--tx);border:1px solid var(--line);border-radius:12px;padding:9px 12px;font:600 13px/1.4 system-ui,sans-serif;box-shadow:0 10px 28px rgba(0,0,0,.3)}
.maplibregl-popup-tip{display:none}
.maplibregl-ctrl-attrib{background:rgba(127,127,160,.18);color:var(--mut);font-size:10px}
.maplibregl-ctrl-attrib a{color:var(--mut)}
@media(max-width:560px){.imap{height:58vh;min-height:380px}.map-stat{min-width:100px;padding:8px 12px}.map-stat b{font-size:18px}}

/* Full-page app layout (Avi, 2026-11-15): the map section is exactly one screen tall,
   full-bleed width, the right panel fits inside it, and a full screen mode is offered. */
@media(min-width:1000px){
.map-app{margin:0 0 18px}
.map-stage{grid-template-columns:minmax(0,65fr) minmax(0,35fr);align-items:stretch;height:calc(100dvh - 162px);min-height:480px;width:calc(100vw - 28px);margin-left:calc(50% - 50vw + 14px);left:auto;transform:none}
.imap{height:100%;min-width:0}
.map-side{display:flex;flex-direction:column;gap:10px;height:100%;overflow:hidden;padding:12px 14px 12px 2px;align-content:initial;min-width:0}
.map-side .card{flex:0 0 auto;margin:0;padding:14px 16px}
.map-side .map-tcard{flex:0 1 auto;min-height:110px}
.map-side .map-tools{overflow:hidden}
.map-tools{flex-wrap:nowrap;gap:8px}
.map-tools .map-search{flex:0 0 auto}
.map-tools-row{display:flex;justify-content:space-between;align-items:center;gap:10px}
.map-tools-row .map-chk{padding-bottom:0}
.map-intro .note{font-size:14px;line-height:1.45}
.map-intro .map-stat span{white-space:nowrap;font-size:8px;letter-spacing:.01em;display:block;overflow:hidden;text-overflow:ellipsis}
.map-vp .vp-grid div b{font-size:15px}
.map-vp .vp-grid div span{font-size:8.5px}
.map-side .map-tools{flex:1 1 auto;min-height:0}
.map-side .map-tools>*{flex:none}
.map-side .map-tools>#mapResults{flex:1 1 auto;min-height:0;overflow:auto;max-height:none}
.map-tcard{overflow:auto;max-height:48%}
.map-intro h1{font-size:25px;margin:2px 0 4px;line-height:1.15}
.map-intro .map-stats-row{margin:8px 0 0;gap:6px;flex-wrap:nowrap}
.map-intro .map-stat{flex:1 1 0;min-width:0;padding:7px 9px;border-radius:10px}
.map-intro .map-stat b{font-size:16px}
.map-intro .map-stat span{font-size:9.5px;letter-spacing:.05em;white-space:normal;overflow:visible;text-overflow:clip;line-height:1.25}
.map-vp .vp-grid{grid-template-columns:repeat(4,1fr)}
.map-stage:fullscreen{height:100%;width:100%;margin-left:0;background:var(--bg)}
.map-stage:fullscreen .map-side{padding:12px 14px}
}

/* compact right panel (Avi 2026-11-15): everything above the list shrinks so the list gets the room */
@media(min-width:1000px){
.map-side{gap:8px}
.map-side .card{padding:10px 14px}
.map-intro .eyebrow{margin-bottom:2px}
.map-intro h1{font-size:22px;line-height:1.12}
.map-intro .note{font-size:14px;margin:2px 0 0}
.map-stats-row{gap:6px;margin-top:8px}
.map-stat{padding:5px 8px;border-radius:10px}
.map-stat b{font-size:15px}
.map-top .map-vp{margin-top:8px;padding-top:8px}
.map-vp .vp-grid div b{font-size:14px}
.map-vp p.note{font-size:11px}
.map-tools{gap:7px}
.map-views button{padding:7px 10px;font-size:12.5px}
.map-filters{gap:8px}
.map-filters label{font-size:10.5px;gap:3px}
.map-filters select{padding:7px 9px;font-size:13px}
.map-search input{padding:8px 12px;font-size:13.5px}
.map-count{font-size:12px}
.map-r{padding:7px 2px}
.map-r b{font-size:13px}
.map-r span{font-size:11.5px}
}
@media(min-width:1000px){
.map-stats-row .map-stat{min-width:0;padding:4px 6px}
.map-stats-row .map-stat b{font-size:14px}
.map-filters label{font-size:10px;gap:2px}
.map-filters select{padding:5px 8px;font-size:12.5px}
.map-views button{padding:6px 10px}
.map-search input{padding:7px 12px}
.map-tools{gap:6px}
.map-side .card{padding:9px 14px}
}
@media(min-width:1000px){
.map-filters label{flex:1 1 21%}
.map-filters select{padding:5px 6px;font-size:11.5px}
.map-vp .vp-head{display:flex;justify-content:space-between;align-items:baseline;gap:10px;margin-bottom:5px}
.map-vp .vp-head h2{margin:0}
.map-vp .vp-head .note{margin:0 !important;font-size:11px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;min-width:0}
.map-r{padding:5px 2px}
.map-r b{font-size:12.5px}
.map-r span{font-size:11px}
}

/* Fullscreen (all viewports): the stage fills the whole screen and the map canvas
   resizes with it (JS also calls map.resize() on fullscreenchange). On phones the
   side panel sits below the map with its own scroll, never overlapping anything. */
.map-stage:fullscreen{width:100%;height:100%;margin-left:0;background:var(--bg);gap:0}
.map-stage:fullscreen .imap{height:100%;min-height:0;border-radius:0;border:0;box-shadow:none}
@media(max-width:999px){
.map-stage:fullscreen{display:flex;flex-direction:column}
.map-stage:fullscreen .imap{flex:1 1 auto;height:auto}
.map-stage:fullscreen .map-side{flex:0 1 auto;max-height:36%;overflow-y:auto;padding:10px 12px;align-content:start}
}

/* Detail card on narrow screens: bigger close target, title keeps clear of it */
@media(max-width:999px){
.map-tcard .tc-x{width:36px;height:36px}
.card.map-tcard h2{margin-right:52px}
}

/* Narrow desktop (1000-1250px): the panel is ~390px, four filter selects in a
   row clip their values ("All chain", "Any form") - wrap them 2x2 instead */
@media(min-width:1000px) and (max-width:1250px){
.map-filters label{flex:1 1 44%}
}
