/* India Incident Map, 1.0.171 redesign (owner-approved 16 Oct 2026): big map, one compact
   row of icon filters, summary cards beside the map (desktop) or below it (mobile). */
.hts-imap-v2{--im-bg:#f4f6f8;--im-card:#fff;--im-line:#e3e7eb;--im-text:#122238;--im-muted:#66717c;--im-orange:#f36b21;--im-navy:#0b1f33;background:var(--im-bg);color:var(--im-text);padding:0 0 28px;font-family:inherit}
.hts-imap-v2 *{box-sizing:border-box}
.hts-imap-sr{position:absolute!important;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap}
/* Theme sets every svg to 16x16; size our icons and Leaflet's layer explicitly. */
.hts-imap-v2 svg.hts-imap-ico{width:18px!important;height:18px!important;flex:0 0 18px;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round;stroke-linejoin:round;display:inline-block;vertical-align:middle}
.hts-imap-map svg{width:auto!important;height:auto!important;display:block;vertical-align:baseline}

/* Title */
.hts-imap-head{display:flex;align-items:baseline;gap:18px;flex-wrap:wrap;padding:18px 24px 8px}
.hts-imap-head h1{margin:0;font-size:30px;line-height:1.15;font-weight:800;letter-spacing:-.01em;color:var(--im-navy)}
.hts-imap-sub{margin:0;font-size:14px;color:var(--im-muted)}

/* Filter row: icon chips, scrolls sideways when it does not fit */
.hts-imap-bar{display:flex;align-items:center;gap:8px;padding:6px 24px 12px;overflow-x:auto;scrollbar-width:thin;-webkit-overflow-scrolling:touch}
.hts-imap-typebar{display:flex;gap:8px;flex:0 0 auto}
.hts-imap-chip,.hts-imap-typebar button{flex:0 0 auto;display:inline-flex;align-items:center;gap:7px;height:40px;padding:0 14px;border:1px solid var(--im-line);border-radius:999px;background:#fff;color:var(--im-text);font:inherit;font-size:14px;font-weight:700;white-space:nowrap;cursor:pointer;box-shadow:0 1px 2px rgba(11,31,51,.05)}
.hts-imap-typebar button:hover,.hts-imap-chip:hover{border-color:#c5ccd3}
.hts-imap-typebar button.is-active{background:var(--im-orange);border-color:var(--im-orange);color:#fff}
.hts-imap-typebar button.is-active svg{stroke:#fff!important}
.hts-imap-typebar button:disabled{cursor:default}
.hts-imap-select{position:relative;padding-right:8px}
.hts-imap-select select{border:0;background:transparent;font:inherit;font-weight:700;color:var(--im-text);padding:0 4px;height:38px;max-width:190px;cursor:pointer;-webkit-appearance:auto;appearance:auto}
.hts-imap-select select:focus{outline:none}
.hts-imap-select:focus-within{border-color:var(--im-orange);box-shadow:0 0 0 3px rgba(243,107,33,.18)}
.hts-imap-near{color:var(--im-orange);border-color:#f7c4a6}
.hts-imap-alerttoggle{color:#b3261e;border-color:#efc2bd}
.hts-imap-alerttoggle.is-on{background:#b3261e;border-color:#b3261e;color:#fff}

/* Layout */
.hts-imap-layout{display:grid;grid-template-columns:minmax(0,1fr) 360px;gap:16px;padding:0 24px;align-items:start}
.hts-imap-mapwrap{position:relative;border-radius:14px;overflow:hidden;border:1px solid var(--im-line);background:#e9eef1;box-shadow:0 4px 16px rgba(11,31,51,.06)}
.hts-imap-map{height:calc(100vh - 210px);min-height:560px;max-height:900px;z-index:1;background:#e9eef1}
/* Lighter, calmer base map so the pins stand out */
.hts-imap-map .leaflet-tile-pane{filter:grayscale(.35) brightness(1.03) contrast(.95)}
.hts-imap-map .leaflet-control-zoom{border:0!important;box-shadow:0 2px 8px rgba(11,31,51,.18)!important;border-radius:10px!important;overflow:hidden}
.hts-imap-map .leaflet-control-zoom a{width:38px!important;height:38px!important;line-height:38px!important;font-size:20px!important;color:var(--im-text)!important}

/* Legend and area switch, inside the map */
.hts-imap-legend{background:rgba(255,255,255,.96);margin:0 0 8px 10px!important;border-radius:10px;padding:7px 10px;box-shadow:0 2px 10px rgba(11,31,51,.15);font-size:12px;font-weight:600;display:flex;flex-wrap:wrap;gap:4px 12px;max-width:520px}
.hts-imap-legend > span{display:inline-flex;align-items:center;white-space:nowrap}
.hts-imap-legend i{display:inline-block;width:11px;height:11px;border-radius:50%;margin-right:5px;border:2px solid #fff;box-shadow:0 0 0 1px rgba(0,0,0,.2)}
.hts-imap-legend .hts-imap-legend-rings{display:none;flex-basis:100%;flex-wrap:wrap;gap:3px 10px;padding-top:5px;border-top:1px solid var(--im-line)}
.hts-imap-legend.has-alerts .hts-imap-legend-rings{display:flex}
.hts-imap-legend .hts-imap-legend-rings b{flex-basis:100%;font-size:11px;color:var(--im-muted)}
.hts-imap-legend .hts-imap-legend-rings span{display:inline-flex;align-items:center}
.hts-imap-legend .hts-imap-legend-rings i{background:transparent!important;border:3px solid;box-shadow:none;width:10px;height:10px;margin-right:4px}
.hts-imap-legend .hts-imap-legend-warn em{display:inline-block;width:9px;height:9px;transform:rotate(45deg);background:#e8590c;margin:0 6px 0 2px}
.hts-imap-scope{display:inline-flex;margin:0 0 12px 10px!important;background:#fff;border-radius:10px;padding:3px;box-shadow:0 2px 10px rgba(11,31,51,.15)}
.hts-imap-scope button{border:0;background:transparent;padding:7px 16px;border-radius:8px;font:inherit;font-size:14px;font-weight:800;color:var(--im-text);cursor:pointer}
.hts-imap-scope button.is-active{background:var(--im-orange);color:#fff}

/* Desktop popup: picture on the left */
.hts-imap-map .leaflet-popup-content-wrapper{border-radius:12px;box-shadow:0 8px 28px rgba(11,31,51,.22)}
.hts-imap-map .leaflet-popup-content{margin:12px}
.hts-imap-pop{display:grid;grid-template-columns:130px minmax(0,1fr);gap:12px;width:360px;font-family:inherit;align-items:start}
.hts-imap-pop.no-img{grid-template-columns:1fr;width:250px}
.hts-imap-pop img{width:130px;height:96px;object-fit:cover;border-radius:8px;display:block}
.hts-imap-kicker{display:block;font-size:11px;font-weight:800;text-transform:uppercase;letter-spacing:.05em;margin-bottom:3px}
.hts-imap-pop b{display:block;font-size:15px;line-height:1.3;font-weight:800;color:var(--im-navy);margin-bottom:4px}
.hts-imap-pop small{display:block;color:var(--im-muted);margin-bottom:5px;font-size:12px;line-height:1.45}
.hts-imap-toll{font-weight:800;color:#b3261e;margin-bottom:8px;font-size:13px}
a.hts-imap-btn{display:inline-flex;align-items:center;gap:6px;background:var(--im-orange);color:#fff!important;text-decoration:none;font-weight:800;padding:8px 14px;border-radius:8px;font-size:13px}
.hts-imap-alertpop{display:block;width:260px}
.hts-imap-alertpop .hts-imap-level{font-weight:800;font-size:13px;margin:2px 0 6px;color:var(--im-text)}
.hts-imap-alertpop .hts-imap-level i{display:inline-block;width:9px;height:9px;border-radius:50%;border:3px solid;margin-right:6px;vertical-align:-1px}
.hts-imap-alertpop .hts-imap-est{font-style:italic}

/* Mobile bottom card (shown instead of a popup on small screens) */
.hts-imap-sheet{position:absolute;left:8px;right:8px;bottom:8px;z-index:1000;background:#fff;border-radius:16px;box-shadow:0 -4px 24px rgba(11,31,51,.22);padding:14px;display:grid;grid-template-columns:116px minmax(0,1fr);gap:12px;align-items:start}
.hts-imap-sheet[hidden]{display:none}
.hts-imap-sheet.no-img{grid-template-columns:1fr}
.hts-imap-sheet img{width:116px;height:96px;object-fit:cover;border-radius:10px;display:block}
.hts-imap-sheet .hts-imap-tags{display:flex;flex-wrap:wrap;gap:6px;margin-bottom:6px}
.hts-imap-sheet .hts-imap-tag{display:inline-flex;align-items:center;gap:4px;font-size:11px;font-weight:800;padding:3px 8px;border-radius:999px;background:#f1f3f5;color:var(--im-text)}
.hts-imap-sheet b{display:block;font-size:16px;line-height:1.25;font-weight:800;color:var(--im-navy);margin-bottom:4px}
.hts-imap-sheet small{display:block;color:var(--im-muted);font-size:12px;margin-bottom:8px}
.hts-imap-sheet a.hts-imap-btn{display:flex;justify-content:center;width:100%}
.hts-imap-sheet-close{position:absolute;top:6px;right:8px;border:0;background:transparent;font-size:22px;line-height:1;color:var(--im-muted);cursor:pointer;padding:4px 6px}

/* Side cards */
.hts-imap-side{display:grid;gap:12px}
.hts-imap-card{background:var(--im-card);border:1px solid var(--im-line);border-radius:14px;padding:14px 16px;box-shadow:0 2px 8px rgba(11,31,51,.04)}
.hts-imap-card h2{margin:0 0 10px;font-size:17px;font-weight:800;color:var(--im-navy)}
.hts-imap-stats{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:4px;text-align:center;padding:12px 8px}
.hts-imap-stats div{padding:2px 4px;border-right:1px solid var(--im-line)}
.hts-imap-stats div:last-child{border-right:0}
.hts-imap-stats b{display:block;font-size:22px;line-height:1.2;font-weight:800;color:var(--im-navy)}
.hts-imap-stats div:last-child b{font-size:14px;line-height:1.9}
.hts-imap-stats span{display:block;font-size:11px;color:var(--im-muted);margin-top:2px}
.hts-imap-bytype{list-style:none;margin:0;padding:0;display:grid;gap:6px}
.hts-imap-bytype button{width:100%;display:grid;grid-template-columns:104px minmax(0,1fr) 34px;align-items:center;gap:8px;border:0;background:transparent;padding:3px 0;font:inherit;font-size:13px;font-weight:700;color:var(--im-text);cursor:pointer;text-align:left}
.hts-imap-bytype button span{display:inline-flex;align-items:center;gap:6px}
.hts-imap-bytype button svg.hts-imap-ico{width:15px!important;height:15px!important;flex-basis:15px}
.hts-imap-bytype .hts-imap-track{height:9px;border-radius:9px;background:#eef1f4;overflow:hidden}
.hts-imap-bytype .hts-imap-fill{display:block;height:100%;border-radius:9px}
.hts-imap-bytype em{font-style:normal;text-align:right;color:var(--im-muted)}
.hts-imap-bytype button.is-active{color:var(--im-orange)}
.hts-imap-bytype button:disabled{opacity:.4;cursor:default}
.hts-imap-tabs{display:flex;gap:16px;border-bottom:1px solid var(--im-line);margin:-2px 0 4px}
.hts-imap-tabs button{background:none;border:0;border-bottom:3px solid transparent;padding:0 0 8px;margin-bottom:-1px;font:inherit;font-size:16px;font-weight:800;color:var(--im-muted);cursor:pointer;display:inline-flex;align-items:center;gap:6px}
.hts-imap-tabs button.is-active{color:var(--im-navy);border-bottom-color:var(--im-orange)}
.hts-imap-badge{display:inline-block;min-width:22px;padding:1px 6px;border-radius:999px;background:#fbe3e1;color:#b3261e;font-size:11px;text-align:center}
.hts-imap-list{list-style:none;margin:0;padding:0;max-height:440px;overflow:auto}
.hts-imap-list[hidden]{display:none}
.hts-imap-list li{display:grid;grid-template-columns:14px minmax(0,1fr) auto;gap:10px;align-items:start;padding:9px 0;border-bottom:1px solid var(--im-line);cursor:pointer}
.hts-imap-list li:last-child{border-bottom:0}
.hts-imap-list li.hts-imap-empty{display:block;cursor:default;color:var(--im-muted);font-size:13px}
.hts-imap-list li:hover b{color:var(--im-orange)}
.hts-imap-list .hts-imap-dot{width:12px;height:12px;border-radius:50%;margin-top:3px}
.hts-imap-list b{display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;font-size:14px;line-height:1.3;font-weight:700;color:var(--im-text)}
.hts-imap-list small{display:block;color:var(--im-muted);font-size:12px;margin-top:2px}
.hts-imap-list time{font-size:12px;color:var(--im-muted);white-space:nowrap;padding-top:2px}
.hts-imap-ringdot{display:inline-block;width:12px;height:12px;border-radius:50%;border:3px solid;margin-top:3px}
.hts-imap-warndot{display:inline-block;width:10px;height:10px;transform:rotate(45deg);margin:4px 0 0 1px;background:#e8590c}
.hts-imap-warndot.hts-imap-warn-red{background:#b3261e}.hts-imap-warndot.hts-imap-warn-yellow{background:#d4a106}
.hts-imap-about summary{cursor:pointer;font-weight:800;font-size:14px;color:var(--im-navy)}
.hts-imap-note{font-size:12px;line-height:1.55;color:var(--im-muted);margin:10px 0 0}

/* Live alert rings and India warning diamonds */
.hts-imap-map path.hts-imap-ring.is-pulse{animation:hts-imap-pulse 1.8s ease-in-out infinite}
@keyframes hts-imap-pulse{0%,100%{stroke-opacity:1;stroke-width:3}50%{stroke-opacity:.35;stroke-width:7}}
.hts-imap-map .hts-imap-warn{background:none;border:0}
.hts-imap-map .hts-imap-warn i{display:block;width:12px;height:12px;margin:2px;background:#e8590c;border:2px solid #fff;transform:rotate(45deg);border-radius:2px;box-shadow:0 0 0 1px rgba(0,0,0,.35);box-sizing:border-box;animation:hts-imap-warnpulse 1.8s ease-in-out infinite}
.hts-imap-map .hts-imap-warn-red i{background:#b3261e}.hts-imap-map .hts-imap-warn-yellow i{background:#d4a106}
@keyframes hts-imap-warnpulse{0%,100%{box-shadow:0 0 0 1px rgba(0,0,0,.35)}50%{box-shadow:0 0 0 6px rgba(232,89,12,.25)}}
@media (prefers-reduced-motion:reduce){.hts-imap-map path.hts-imap-ring.is-pulse,.hts-imap-map .hts-imap-warn i{animation:none}}

/* Tablet and mobile: map first and large, cards below */
@media(max-width:1100px){.hts-imap-layout{grid-template-columns:1fr}.hts-imap-side{grid-template-columns:repeat(2,minmax(0,1fr))}.hts-imap-stats,.hts-imap-about{grid-column:1/-1}}
@media(max-width:760px){
  .hts-imap-head{padding:12px 16px 4px}
  .hts-imap-head h1{font-size:24px}
  .hts-imap-sub{display:none}
  .hts-imap-bar{padding:6px 16px 10px;gap:6px}
  .hts-imap-typebar{gap:6px}
  .hts-imap-chip,.hts-imap-typebar button{height:38px;padding:0 12px;font-size:13px}
  .hts-imap-select select{max-width:130px}
  .hts-imap-layout{padding:0;gap:12px}
  .hts-imap-mapwrap{border-radius:0;border-left:0;border-right:0}
  .hts-imap-map{height:calc(100svh - 190px);min-height:420px;max-height:none}
  .hts-imap-side{grid-template-columns:1fr;padding:0 12px}
  .hts-imap-legend{max-width:calc(100vw - 90px);font-size:11px;gap:2px 8px;padding:5px 8px;margin:0 0 6px 8px!important}
  .hts-imap-legend i{width:9px;height:9px;margin-right:4px}
  .hts-imap-scope{margin:0 0 10px 8px!important}
  .hts-imap-scope button{padding:6px 12px;font-size:13px}
  .hts-imap-stats b{font-size:19px}
  .hts-imap-list{max-height:460px}
}
.hts-imap-hint{position:absolute;top:10px;left:50%;transform:translateX(-50%);z-index:900;background:rgba(11,31,51,.85);color:#fff;font-size:12px;font-weight:700;padding:6px 12px;border-radius:999px;pointer-events:none;transition:opacity .6s}
.hts-imap-hint.is-gone{opacity:0}
/* 1.0.172 City Safety Guide links */
a.hts-imap-citylink{display:inline-block;margin:8px 0 0 10px;font-size:13px;font-weight:800;color:var(--im-orange)!important;text-decoration:none}
.hts-imap-sheet a.hts-imap-citylink{display:block;margin:8px 0 0;text-align:center}
.hts-imap-cityguides{position:absolute;top:10px;left:10px;z-index:800;background:#fff;border-radius:999px;padding:7px 14px;box-shadow:0 2px 10px rgba(11,31,51,.18);font-size:13px;font-weight:700;max-width:calc(100% - 20px)}
.hts-imap-cityguides[hidden]{display:none}
.hts-imap-cityguides span{color:var(--im-muted)}
.hts-imap-cityguides a{color:var(--im-orange);text-decoration:none;font-weight:800;margin-left:6px}
