/* ============================================================
   Craft Boys — Areas interactive map (cb-areas-map).
   Real Leaflet map (self-hosted) + left list of areas.
   Markup: templates/sections/cb-areas-map.php
   ============================================================ */

.cb-amap__head { max-width: 720px; margin: 0 auto; text-align: center; }
.cb-amap__intro { margin-top: 14px; }

.cb-amap__layout {
  display: grid;
  grid-template-columns: minmax(0, 0.82fr) minmax(0, 1.18fr);
  gap: clamp(20px, 3vw, 40px);
  align-items: stretch;
  margin-top: clamp(26px, 3.5vw, 44px);
}

/* Left — area list (2-column pill grid, grouped) */
.cb-amap__list { align-self: center; }
.cb-amap__group-label {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-ui);
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: #a89d88;
  margin: 20px 0 10px;
}
.cb-amap__group-label:first-child { margin-top: 0; }
.cb-amap__group-label::after { content: ''; flex: 1; height: 1px; background: rgba(20, 20, 20, .09); }
.cb-amap__grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(158px, 1fr));
  gap: 8px;
}
.cb-amap__row {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 10px 12px;
  border: 1px solid rgba(20, 20, 20, .1);
  border-radius: 10px;
  background: #fff;
  font-family: var(--font-ui);
  font-size: 14.5px;
  font-weight: 500;
  color: var(--cb-ink);
  transition: border-color .14s ease, background .14s ease, box-shadow .14s ease;
}
.cb-amap__row:hover {
  border-color: var(--cb-yellow, #FAB700);
  background: #fffdf3;
  box-shadow: 0 8px 18px -12px rgba(20, 20, 20, .35);
}
.cb-amap__row-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--cb-yellow, #FAB700);
  border: 1.5px solid var(--cb-ink, #141414);
  flex: 0 0 auto;
}
.cb-amap__row-name { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cb-amap__row-arrow {
  flex: 0 0 auto;
  color: #c4bdad;
  transform: translateX(-3px);
  opacity: 0;
  transition: opacity .14s ease, transform .14s ease, color .14s ease;
}
.cb-amap__row:hover .cb-amap__row-arrow { opacity: 1; transform: translateX(0); color: var(--cb-yellow-2, #E7A800); }
.cb-amap__more { display: flex; flex-wrap: wrap; gap: 7px 8px; margin-top: 4px; }
.cb-amap__more a {
  padding: 6px 12px;
  border: 1px solid rgba(20, 20, 20, .14);
  border-radius: 999px;
  font-family: var(--font-ui);
  font-size: 13px;
  color: var(--cb-steel, #494847);
  transition: border-color .15s ease, color .15s ease;
}
.cb-amap__more a:hover { border-color: var(--cb-yellow, #FAB700); color: var(--cb-ink, #141414); }

/* Right — Leaflet map, Figma dark theme (node 1:9311: #1C272E, luminosity blend) */
.cb-amap__mapcol { min-height: 470px; }
.cb-amap__map {
  height: 100%;
  min-height: 470px;
  width: 100%;
  border-radius: 16px;                       /* Figma: 16px */
  border: 1px solid rgba(255, 255, 255, .08);
  box-shadow: 0 30px 70px -46px rgba(15, 22, 27, .8);
  overflow: hidden;
  position: relative;
  z-index: 0;                 /* contain Leaflet's internal z-indexes below the sticky header */
  background: #1C272E;        /* Figma map fill — also the luminosity blend base */
}
/* Beat Leaflet's own `.leaflet-container{background:#ddd}` (equal specificity, but
   leaflet.css loads after this file) so the blend base stays the Figma slate. */
.cb-amap__map.leaflet-container { background: #1C272E; }
/* Gentle blue-slate tint over Esri's neutral grey to land on the Figma #1C272E
   hue, WITHOUT flattening the land/water contrast (mix-blend `color` keeps the
   tiles' luminosity, only nudges hue). Markers are in a higher pane → unaffected. */
.cb-amap__map .leaflet-tile-pane { filter: saturate(1.05) brightness(1.02); }
.cb-amap__map::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 250;                 /* above tiles (200), below markers (600) */
  background: #1E3A4A;
  opacity: .16;
  mix-blend-mode: color;
  pointer-events: none;
}

/* Dark Leaflet chrome */
.cb-amap__map .leaflet-control-zoom a {
  background: #23343C;
  color: #fff;
  border-color: rgba(255, 255, 255, .12);
}
.cb-amap__map .leaflet-control-zoom a:hover { background: #2C414C; }
.cb-amap__map .leaflet-bar { border: 0; box-shadow: 0 6px 18px -8px rgba(0, 0, 0, .6); }
.cb-amap__map .leaflet-control-attribution {
  background: rgba(28, 39, 46, .68);
  color: rgba(255, 255, 255, .55);
}
.cb-amap__map .leaflet-control-attribution a { color: rgba(255, 255, 255, .78); }

/* Yellow "spotlight" teardrop pins (Leaflet divIcon → inline SVG) */
.cb-amap__pin {
  display: block;
  width: 27px; height: 43px;
  transform-origin: 50% 100%;                /* grow up from the tip */
  transition: transform .16s ease;
  filter: drop-shadow(0 3px 4px rgba(0, 0, 0, .38));
  will-change: transform;
}
.cb-amap__pinwrap:hover .cb-amap__pin,
.cb-amap__pinwrap.is-hi .cb-amap__pin { transform: scale(1.16); }

/* Popup = the card */
.cb-amap__popup .leaflet-popup-content-wrapper {
  border-radius: 13px;
  border: 1px solid rgba(20, 20, 20, .1);
  box-shadow: 0 18px 44px -22px rgba(20, 20, 20, .55);
  padding: 2px;
}
.cb-amap__popup .leaflet-popup-content { margin: 13px 15px; }
.cb-amap__card-name {
  font-family: var(--font-display, 'Oswald', sans-serif);
  font-size: 18px; font-weight: 600;
  color: var(--cb-ink, #141414);
  margin-bottom: 4px;
}
.cb-amap__card-text {
  font-family: var(--font-ui, 'Roboto', sans-serif);
  font-size: 13px; line-height: 1.5;
  color: var(--cb-steel, #494847);
  margin-bottom: 12px;
}
.cb-amap__card-btn {
  display: inline-flex; align-items: center; gap: 6px;
  background: var(--cb-yellow, #FAB700);
  color: var(--cb-ink, #141414);
  font-family: var(--font-ui, 'Roboto', sans-serif);
  font-size: 13px; font-weight: 500;
  padding: 8px 15px;
  border-radius: 6px;
  text-decoration: none;
  transition: background .16s ease;
}
.cb-amap__card-btn:hover { background: var(--cb-yellow-2, #E7A800); }
.cb-amap__popup .leaflet-popup-content a.cb-amap__card-btn { color: var(--cb-ink, #141414); }

.cb-amap__cta { margin-top: clamp(26px, 3.5vw, 40px); text-align: center; }

@media (max-width: 900px) {
  .cb-amap__layout { grid-template-columns: 1fr; gap: 22px; }
  .cb-amap__mapcol { order: -1; min-height: 380px; }
  .cb-amap__map { min-height: 380px; }
  .cb-amap__list { align-self: start; }
}
