/* ==========================================================================
   WAM Neighborhood Map
   File: assets/css/neighborhood-map.css

   Layout: horizontal split on desktop (list left, map right).
   On tablet/mobile: list stacks above the map, list collapses to 1–2 columns.
   ========================================================================== */


/* ── Outer wrapper ───────────────────────────────────────────────────────── */
.wam-neighborhood-map-wrap {
  display: grid;
  grid-template-columns: 1fr;  /* mobile: stacked */
  width: 100%;
  background: #F4F2F0;
  overflow: hidden;
}

@media (min-width: 1024px) {
  .wam-neighborhood-map-wrap {
    grid-template-columns: 42fr 58fr;
    min-height: 580px;
  }
}


/* ── Location list panel ──────────────────────────────────────────────────── */
.wam-map-locations {
  background: #F4F2F0;
  padding: 40px 36px;
  overflow-y: auto;
}

@media (min-width: 1024px) {
  .wam-map-locations {
    max-height: 620px;
  }
}

@media (max-width: 600px) {
  .wam-map-locations {
    padding: 28px 20px;
  }
}


/* ── Category grid ────────────────────────────────────────────────────────── */
.wam-map-locations__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);  /* 3 cols = Museums | Restaurants | Shops */
  gap: 32px 28px;
  align-items: start;
}

/* On narrower viewports (even inside desktop layout), allow wrap to 2 cols */
@media (max-width: 1280px) {
  .wam-map-locations__grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 600px) {
  .wam-map-locations__grid {
    grid-template-columns: 1fr;
    gap: 24px;
  }
}


/* ── Category header ──────────────────────────────────────────────────────── */
.wam-map-category__header {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  text-align: center;
  font-family: 'Rokkitt', serif;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #1B1C39;
  margin: 0 0 16px;
  padding-bottom: 14px;
  border-bottom: 2px solid rgba(27, 28, 57, 0.2);
}

.wam-map-category__header i {
  font-size: 30px;
  color: #1B1C39;
  display: block;
  opacity: 0.85;
}


/* ── Category location list ───────────────────────────────────────────────── */
.wam-map-category__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
}

.wam-map-category__list li {
  border-bottom: 1px solid #E5E3E0;
}

.wam-map-category__list li:last-child {
  border-bottom: none;
}


/* ── Location item button ─────────────────────────────────────────────────── */
.wam-map-location-item {
  display: flex;
  align-items: baseline;
  gap: 7px;
  width: 100%;
  text-align: left;
  background: none;
  border: none;
  padding: 10px 0;
  font-family: 'Bitter', serif;
  font-size: 13px;
  line-height: 1.45;
  color: #4A4A4A;
  cursor: pointer;
  transition: color 0.1s ease;
}

.wam-map-location-item__pin {
  font-size: 10px;
  color: #BDBDBD;
  flex-shrink: 0;
  transition: color 0.1s ease;
  position: relative;
  top: 1px;
}

/* Hover */
.wam-map-location-item:hover {
  color: #1B1C39;
}

.wam-map-location-item:hover .wam-map-location-item__pin {
  color: #FF6E00;
}

/* Active / selected */
.wam-map-location-item.is-active {
  color: #FF6E00;
  font-weight: 700;
}

.wam-map-location-item.is-active .wam-map-location-item__pin {
  color: #FF6E00;
}

/* Focus ring — keyboard navigation */
.wam-map-location-item:focus-visible {
  outline: 2px solid #FF6E00;
  outline-offset: 2px;
  border-radius: 2px;
}


/* ── Map canvas ───────────────────────────────────────────────────────────── */
.wam-map-canvas-wrap {
  position: relative;
}

/* Mobile: fixed height above the list */
.wam-map-canvas {
  width: 100%;
  height: 400px;
  display: block;
  background: #e5e2de;  /* placeholder color while map loads */
}

@media (min-width: 1024px) {
  /* Desktop: fill full height of the row, sticky so it stays in view */
  .wam-map-canvas {
    height: 620px;
    position: sticky;
    top: var(--wam-header-height);
  }
}

@media (max-width: 600px) {
  .wam-map-canvas {
    height: 300px;
  }
}


/* ── Google Maps Info Window custom styles ────────────────────────────────── */
/*
 * The .gm-style-iw-c container is the white bubble Google renders.
 * We can't fully re-skin it, but we can style our content inside it.
 */
.wam-map-info {
  font-family: 'Bitter', Georgia, serif;
  padding: 2px 4px 4px;
  max-width: 200px;
}

.wam-map-info__name {
  font-size: 14px;
  font-weight: 700;
  color: #1B1C39;
  margin: 0 0 5px;
  line-height: 1.3;
}

.wam-map-info__address {
  font-size: 12px;
  color: #777777;
  margin: 0;
  line-height: 1.45;
  font-family: 'Bitter', Georgia, serif;
}
