/* ==========================================================================
   New York 420 Week — dispensary map (/map)
   ========================================================================== */

.map-hero .page-lede { max-width: 60ch; }

.map-section { padding-block: clamp(28px, 4vw, 52px); }

.map-app { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 16px; align-items: start; }

.map-stage { position: relative; }
#nymap {
  height: clamp(440px, 68vh, 720px);
  border: 1px solid rgba(255, 255, 255, .14);
  border-radius: var(--radius);
  background: #040822;
  overflow: hidden;
}
#nymap.leaflet-container { font-family: var(--sans); }
.map-loading { display: grid; place-items: center; height: 100%; margin: 0; color: #9AA0C8; font-size: 13px; letter-spacing: .1em; text-transform: uppercase; }

/* ---------- rail ---------- */
.map-rail { display: flex; flex-direction: column; gap: 12px; }
.map-box { background: rgba(255, 255, 255, .045); border: 1px solid rgba(255, 255, 255, .12); border-radius: 14px; padding: 14px 15px; }
.map-box-h { font: 500 11px/1 var(--mono); letter-spacing: .16em; text-transform: uppercase; color: #9AA0C8; margin: 0 0 11px; }

.map-input {
  width: 100%; background: rgba(4, 8, 34, .75); color: #fff;
  border: 1px solid rgba(255, 255, 255, .16); border-radius: 9px;
  font: 400 14px/1.3 var(--sans); padding: 9px 11px;
}
.map-input::placeholder { color: #767CA6; }
select.map-input { appearance: none; background-image: linear-gradient(45deg, transparent 50%, #9AA0C8 50%), linear-gradient(135deg, #9AA0C8 50%, transparent 50%); background-position: right 15px top 18px, right 10px top 18px; background-size: 5px 5px, 5px 5px; background-repeat: no-repeat; padding-right: 30px; }
.map-hint { margin: 9px 0 0; font-size: 11px; letter-spacing: .04em; color: #767CA6; }

.map-lay { display: flex; align-items: center; gap: 10px; padding: 6px 0; font-size: 13.5px; color: #fff; cursor: pointer; }
.map-lay input { accent-color: var(--yellow); width: 16px; height: 16px; margin: 0; cursor: pointer; flex: none; }
.map-lay b { margin-left: auto; font-size: 11px; font-weight: 500; color: #767CA6; }
.map-lay .key { width: 12px; height: 12px; border-radius: 50%; flex: none; }
.key.sell { background: var(--yellow); }
.key.pipe { border: 1.7px solid #6F8ACB; }
.key.none { border: 1.7px dashed #5A5F85; }
.key.chain { background: #FF7A45; }

.map-scale { display: flex; align-items: center; gap: 8px; margin-top: 10px; }
.map-scale i { display: block; border-radius: 50%; background: var(--yellow); opacity: .85; flex: none; }
.map-scale span { font: 500 10px/1.3 var(--mono); letter-spacing: .08em; text-transform: uppercase; color: #767CA6; }

/* ---------- selected store card ---------- */
.map-card .name { font: 600 17px/1.2 var(--sans); color: #fff; margin-bottom: 4px; }
.map-card .where { font-size: 12.5px; color: #9AA0C8; }
.map-card .tags { margin-top: 9px; display: flex; flex-wrap: wrap; gap: 6px; }
.map-card .tag { font: 500 10px/1.6 var(--mono); letter-spacing: .1em; text-transform: uppercase; padding: 2px 7px; border-radius: 99px; }
.map-card .tag.chain { background: rgba(255, 122, 69, .18); color: #FFA983; }
.map-card .tag.ind { background: rgba(111, 138, 203, .18); color: #A9B6E6; }
.map-card .tag.med { background: rgba(255, 242, 0, .16); color: var(--yellow); }
.map-card dl { display: grid; grid-template-columns: auto 1fr; gap: 6px 14px; margin: 13px 0 0; font-size: 12.5px; }
.map-card dt { color: #9AA0C8; }
.map-card dd { margin: 0; text-align: right; font: 500 12.5px/1.4 var(--mono); color: #fff; font-variant-numeric: tabular-nums; }

/* ---------- leaflet skin ---------- */
.leaflet-container { background: #040822; }
.leaflet-bar a, .leaflet-bar a:hover { background: #0A1244; color: #fff; border-color: rgba(255, 255, 255, .16); }
.leaflet-control-attribution { background: rgba(4, 8, 34, .8); color: #767CA6; font-size: 10px; }
.leaflet-control-attribution a { color: #9AA0C8; }
.leaflet-tooltip { background: #0A1244; border: 1px solid rgba(255, 255, 255, .16); color: #fff; font: 500 12px/1.3 var(--sans); box-shadow: 0 8px 26px rgba(0, 0, 0, .5); }
.leaflet-tooltip-top::before { border-top-color: rgba(255, 255, 255, .16); }

/* ---------- tables ---------- */
.map-tables .section-head { margin-bottom: 18px; }
.map-tabs { display: flex; flex-wrap: wrap; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 4px; }
.map-tabs button { background: none; border: 0; border-bottom: 2px solid transparent; padding: 10px 14px; cursor: pointer; font: 500 12px/1 var(--mono); letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.map-tabs button[aria-selected="true"] { color: var(--ink); border-bottom-color: var(--navy); }
.map-tblwrap { overflow-x: auto; }
.map-tbl { border-collapse: collapse; width: 100%; min-width: 560px; font-size: 14px; }
.map-tbl th, .map-tbl td { padding: 9px 14px 9px 0; text-align: right; border-bottom: 1px solid var(--line); white-space: nowrap; }
.map-tbl th { font: 500 10px/1.4 var(--mono); letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.map-tbl th:first-child, .map-tbl td:first-child { text-align: left; padding-left: 0; }
.map-tbl td.n { font: 500 13.5px/1.4 var(--mono); font-variant-numeric: tabular-nums; }
.map-tbl tbody tr:hover { background: rgba(11, 16, 51, .05); }
.map-tbl .bar { display: inline-block; height: 7px; border-radius: 2px; background: var(--navy); vertical-align: middle; margin-left: 8px; min-width: 1px; }
.map-note { margin-top: 22px; color: var(--muted); line-height: 1.7; max-width: 92ch; }

@media (max-width: 900px) {
  .map-app { grid-template-columns: minmax(0, 1fr); }
  #nymap { height: 62vh; }
}
@media (prefers-reduced-motion: reduce) {
  .leaflet-fade-anim .leaflet-tile, .leaflet-zoom-anim .leaflet-zoom-animated { transition: none !important; }
}

/* ---------- hero actions ---------- */
.map-hero-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 16px; margin-top: 26px; }
.map-hero-note { font: 500 11px/1 var(--mono); letter-spacing: .12em; text-transform: uppercase; color: #9AA0C8; }

/* ---------- Data hub promo ---------- */
.map-promo {
  display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); gap: clamp(20px, 4vw, 48px);
  align-items: center; padding: clamp(22px, 3vw, 34px); border: 1px solid var(--line); border-radius: var(--radius);
  background: var(--navy); color: #fff; text-decoration: none;
  transition: transform .35s var(--ease), box-shadow .35s var(--ease);
}
.map-promo:hover { transform: translateY(-3px); box-shadow: 0 18px 44px rgba(5, 10, 48, .28); }
.map-promo .eyebrow { color: var(--yellow); }
.map-promo h2 { font-size: clamp(25px, 3vw, 38px); margin: 10px 0 12px; max-width: 20ch; text-wrap: balance; }
.map-promo p { color: #C3C7E6; margin: 0 0 16px; max-width: 54ch; }
.map-promo .link-arrow { display: inline-flex; align-items: center; gap: 8px; color: var(--yellow); font-weight: 600; }
.map-promo-stats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1px; background: rgba(255, 255, 255, .12); border: 1px solid rgba(255, 255, 255, .12); border-radius: 12px; overflow: hidden; }
.map-promo-stats div { background: var(--navy); padding: 16px 18px; }
.map-promo-stats b { display: block; font-size: clamp(26px, 3vw, 34px); color: var(--yellow); }
.map-promo-stats span { display: block; font: 500 10px/1.4 var(--mono); letter-spacing: .12em; text-transform: uppercase; color: #9AA0C8; margin-top: 5px; }
@media (max-width: 860px) {
  .map-promo { grid-template-columns: minmax(0, 1fr); }
}
