/* ============================================================
   ICR Author Map
   Uses ICR Enchanted's colors/fonts when active; matching
   fallbacks otherwise.
   ============================================================ */

.icr-map-wrap {
  --_accent:   var(--icr-accent, #c8703a);
  --_accent-d: var(--icr-accent-dark, #9e4e1f);
  --_card:     var(--icr-bg-alt, #f2ebe0);
  --_text:     var(--icr-text, #2a1f14);
  --_muted:    var(--icr-text-muted, #6b5844);
  --_border:   var(--icr-border, #ddd0bb);
  --_head:     var(--icr-font-heading, 'Playfair Display', Georgia, serif);
  --_accentf:  var(--icr-font-accent, 'Special Elite', 'Courier New', monospace);
  --_body:     var(--icr-font-body, Georgia, serif);
  margin: 1.5rem 0 2.5rem;
}

.icr-map {
  width: 100%;
  min-height: 240px;
  border: 1px solid var(--_border);
  border-bottom: 3px solid var(--_accent);
  border-radius: 3px;
  box-shadow: 0 4px 20px rgba(42, 31, 20, 0.18);
  background: var(--_card);
  position: relative;
  z-index: 0;            /* keep the map's layers beneath site menus */
}

/* ---------- Pins ---------- */
.icr-pin { background: none !important; border: 0 !important; }

.icr-pin__dot {
  display: block;
  position: relative;
  width: 30px;
  height: 30px;
  margin-top: 4px;
  background: var(--_accent);
  border: 3px solid #fff;
  border-radius: 50% 50% 50% 0;
  transform: rotate(-45deg);
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.45);
  transition: filter 0.2s ease;
}
.icr-pin__dot::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 10px;
  height: 10px;
  margin: -5px 0 0 -5px;
  border-radius: 50%;
  background: #2a1f14;
}
.icr-pin:hover .icr-pin__dot,
.icr-pin:focus .icr-pin__dot { filter: brightness(0.85); }
.icr-pin:focus { outline: none; }
.icr-pin:focus-visible .icr-pin__dot { box-shadow: 0 0 0 3px rgba(200, 112, 58, 0.55), 0 3px 8px rgba(0, 0, 0, 0.45); }

/* ---------- Popups ---------- */
.icr-map .leaflet-popup-content-wrapper {
  background: #faf6ef;
  color: #2a1f14;
  border-radius: 3px;
  border-left: 4px solid var(--_accent);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}
.icr-map .leaflet-popup-tip { background: #faf6ef; }
.icr-map .leaflet-popup-content { margin: 0.85rem 1rem; font-family: var(--_body); }

.icr-pop__title {
  font-family: var(--_head) !important;
  font-style: italic;
  font-size: 1.05rem !important;
  line-height: 1.25 !important;
  margin: 0 !important;
  color: #2a1f14 !important;
}
.icr-pop__list {
  list-style: none !important;
  margin: 0.5rem 0 0 !important;
  padding: 0.5rem 0 0 !important;
  border-top: 1px dotted #ddd0bb;
}
.icr-pop__list li {
  margin: 0 !important;
  padding: 0.15rem 0 !important;
  font-size: 0.88rem;
  line-height: 1.4;
  color: #6b5844;
}

.icr-map .leaflet-container a { color: var(--_accent-d); }

/* ---------- Count + place buttons ---------- */
.icr-map-count {
  margin: 1.1rem 0 0.6rem !important;
  font-family: var(--_accentf);
  font-size: 0.78rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--_muted);
}

.icr-map-list {
  list-style: none !important;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 0 !important;
  padding: 0 !important;
}
.icr-map-list li { margin: 0 !important; padding: 0 !important; }

.icr-map-chip {
  cursor: pointer;
  background: var(--_card);
  color: var(--_text);
  border: 1px solid var(--_border);
  border-radius: 999px;
  padding: 0.35em 0.95em;
  font-family: var(--_body);
  font-size: 0.9rem;
  line-height: 1.4;
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}
.icr-map-chip::before {
  content: '\25CF';
  color: var(--_accent);
  font-size: 0.6rem;
  margin-right: 0.5em;
  vertical-align: 0.12em;
}
.icr-map-chip:hover,
.icr-map-chip:focus-visible {
  background: var(--_accent);
  color: #fff;
  border-color: var(--_accent);
  transform: translateY(-1px);
  outline: none;
}
.icr-map-chip:hover::before,
.icr-map-chip:focus-visible::before { color: #fff; }

.icr-map-empty,
.icr-map-noscript {
  font-style: italic;
  color: var(--_muted);
  margin-top: 0.9rem;
}

@media (prefers-reduced-motion: reduce) {
  .icr-map-chip, .icr-pin__dot { transition: none; }
  .icr-map-chip:hover { transform: none; }
}
