/* =============================================================
   City Foodsters map system
   Shared look for every interactive map on the site: homepage
   check-ins, /restaurants/, the Everest journey, and the Japan
   story maps. Requires Leaflet 1.9 CSS to be loaded first.
   ============================================================= */

.cf-map {
  position: relative;
  background: #EFEAE1;
  border: 1px solid rgba(139, 115, 85, 0.28);
  border-radius: 2px;
  overflow: hidden;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.6) inset, 0 24px 48px -32px rgba(28, 25, 21, 0.35);
}
.cf-map__canvas {
  width: 100%;
  height: 560px;
  background: #EFEAE1;
  z-index: 1;
}
.cf-map__canvas:focus { outline: none; }
.cf-map::after {
  /* soft vignette so the map sits in the page like a plate, not a widget */
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 2;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.35), inset 0 0 80px rgba(28, 25, 21, 0.10);
}
.cf-map.is-fullscreen {
  position: fixed;
  inset: 0;
  z-index: 6000;
  border: none;
  border-radius: 0;
  box-shadow: none;
}
.cf-map.is-fullscreen .cf-map__canvas { height: 100% !important; }
body.cf-map-fullscreen { overflow: hidden; }

/* ---------- Leaflet chrome ---------- */
.cf-map .leaflet-container {
  font-family: 'Switzer', -apple-system, BlinkMacSystemFont, sans-serif;
  background: #EFEAE1;
}
.cf-map .leaflet-control-container .leaflet-top,
.cf-map .leaflet-control-container .leaflet-bottom { z-index: 1000; }
.cf-map .leaflet-bar {
  border: 1px solid rgba(139, 115, 85, 0.35);
  border-radius: 2px;
  box-shadow: 0 8px 22px -6px rgba(28, 25, 21, 0.3);
  overflow: hidden;
}
.cf-map .leaflet-bar a,
.cf-map .cf-map__btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  line-height: 1;
  background: rgba(245, 241, 234, 0.96);
  color: #1C1915;
  border: none;
  border-bottom: 1px solid rgba(139, 115, 85, 0.22);
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 22px;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease;
}
.cf-map .leaflet-bar a:last-child,
.cf-map .cf-map__btn:last-child { border-bottom: none; }
.cf-map .leaflet-bar a:hover,
.cf-map .cf-map__btn:hover { background: #1C1915; color: #F5F1EA; }
.cf-map .leaflet-bar a.leaflet-disabled { color: rgba(28, 25, 21, 0.3); background: rgba(245, 241, 234, 0.96); }
.cf-map .cf-map__btn svg { width: 15px; height: 15px; stroke: currentColor; fill: none; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.cf-map .leaflet-control { margin: 14px; }
.cf-map .leaflet-top .leaflet-control + .leaflet-control { margin-top: 0; }

/* ---------- markers ---------- */
.cf-dot {
  width: 10px; height: 10px;
  border-radius: 50%;
  background: #B85C38;
  border: 1.5px solid #F5F1EA;
  box-shadow: 0 0 0 1px rgba(184, 92, 56, 0.45), 0 2px 6px rgba(28, 25, 21, 0.25);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.cf-dot:hover { transform: scale(1.5); box-shadow: 0 0 0 2px rgba(184, 92, 56, 0.35), 0 4px 10px rgba(28, 25, 21, 0.3); }
.cf-dot--approx { background: #C4A97D; box-shadow: 0 0 0 1px rgba(196, 169, 125, 0.5), 0 2px 6px rgba(28, 25, 21, 0.2); }

.cf-cluster { background: none; }
.cf-cluster > div {
  width: 100%; height: 100%;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: rgba(28, 25, 21, 0.9);
  color: #F5F1EA;
  border: 1px solid rgba(196, 169, 125, 0.95);
  box-shadow: 0 0 0 5px rgba(196, 169, 125, 0.16), 0 8px 18px -4px rgba(28, 25, 21, 0.45);
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-weight: 500;
  font-variant-numeric: lining-nums;
  letter-spacing: 0.02em;
  transition: transform 0.2s ease, background 0.2s ease;
}
.cf-cluster:hover > div { transform: scale(1.08); background: #B85C38; border-color: #F5F1EA; }
.cf-cluster--small > div { font-size: 15px; }
.cf-cluster--medium > div { font-size: 17px; }
.cf-cluster--large > div { font-size: 19px; }

.cf-num {
  width: 30px; height: 30px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: #B85C38;
  color: #F5F1EA;
  border: 2px solid #F5F1EA;
  box-shadow: 0 0 0 1px rgba(184, 92, 56, 0.55), 0 6px 14px -4px rgba(28, 25, 21, 0.5);
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-weight: 600;
  font-size: 15px;
  line-height: 1;
  cursor: pointer;
  transition: transform 0.2s ease, background 0.2s ease;
}
.cf-num:hover, .cf-num.is-active { background: #1C1915; transform: scale(1.12); }

.cf-photo {
  width: 42px; height: 42px;
  border-radius: 50%;
  background-size: cover;
  background-position: center;
  background-color: #3D3429;
  border: 2px solid #F5F1EA;
  box-shadow: 0 0 0 1px rgba(196, 169, 125, 0.9), 0 6px 14px -2px rgba(0, 0, 0, 0.55);
  cursor: pointer;
  position: relative;
  transition: transform 0.2s ease;
}
.cf-photo:hover { transform: scale(1.15); z-index: 10; }
.cf-photo--video::after {
  content: '';
  position: absolute;
  left: 50%; top: 50%;
  width: 0; height: 0;
  transform: translate(-40%, -50%);
  border-left: 10px solid #F5F1EA;
  border-top: 6px solid transparent;
  border-bottom: 6px solid transparent;
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.6));
}
.cf-photo-cluster { background: none; }
.cf-photo-cluster > div {
  width: 100%; height: 100%;
  border-radius: 50%;
  background-size: cover;
  background-position: center;
  border: 2px solid #F5F1EA;
  box-shadow: 0 0 0 1px rgba(196, 169, 125, 0.9), 0 6px 14px -2px rgba(0, 0, 0, 0.55);
  position: relative;
  cursor: pointer;
  transition: transform 0.2s ease;
}
.cf-photo-cluster:hover > div { transform: scale(1.08); }
.cf-photo-cluster > div > span {
  position: absolute;
  right: -6px; top: -6px;
  min-width: 22px; height: 22px;
  padding: 0 6px;
  border-radius: 11px;
  background: #B85C38;
  color: #F5F1EA;
  border: 1.5px solid #F5F1EA;
  font-family: 'Switzer', sans-serif;
  font-size: 11px;
  font-weight: 500;
  display: flex; align-items: center; justify-content: center;
}

.cf-camp { background: none; }
.cf-camp__dot {
  position: absolute;
  left: 50%; top: 50%;
  width: 9px; height: 9px;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background: #F5F1EA;
  border: 2px solid #1C1915;
  box-shadow: 0 0 0 2px rgba(245, 241, 234, 0.55);
}
.cf-camp__label {
  position: absolute;
  left: 50%; top: 50%;
  transform: translate(-50%, calc(-100% - 10px));
  white-space: nowrap;
  padding: 4px 8px;
  background: rgba(28, 25, 21, 0.86);
  color: #F5F1EA;
  border: 1px solid rgba(196, 169, 125, 0.6);
  font-family: 'Switzer', sans-serif;
  font-size: 10px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  pointer-events: none;
}
.cf-camp--summit .cf-camp__dot { background: #B85C38; border-color: #F5F1EA; width: 12px; height: 12px; }
.cf-camp--summit .cf-camp__label { background: #B85C38; border-color: #F5F1EA; }

/* ---------- popups & tooltips ---------- */
.cf-popup .leaflet-popup-content-wrapper {
  background: #F5F1EA;
  color: #3D3429;
  border-radius: 2px;
  border: 1px solid rgba(139, 115, 85, 0.32);
  box-shadow: 0 18px 40px -12px rgba(28, 25, 21, 0.4);
  padding: 0;
}
.cf-popup .leaflet-popup-content {
  margin: 16px 18px 14px;
  line-height: 1.5;
  font-family: 'Switzer', sans-serif;
  font-size: 13px;
  min-width: 200px;
}
.cf-popup .leaflet-popup-tip-container { margin-top: -1px; }
.cf-popup .leaflet-popup-tip {
  background: #F5F1EA;
  border: 1px solid rgba(139, 115, 85, 0.32);
  border-top: none; border-left: none;
  box-shadow: none;
}
.cf-popup .leaflet-popup-close-button {
  color: #8B7355;
  font-size: 20px;
  font-weight: 300;
  top: 6px; right: 8px;
  width: 22px; height: 22px;
}
.cf-popup .leaflet-popup-close-button:hover { color: #B85C38; background: none; }
.cf-popup__eyebrow {
  font-size: 10px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: #B85C38;
  margin-bottom: 4px;
}
.cf-popup__title {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-weight: 500;
  font-size: 20px;
  line-height: 1.15;
  color: #1C1915;
  margin: 0 0 4px;
}
.cf-popup__meta {
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #8B7355;
  line-height: 1.6;
}
.cf-popup__rule { width: 28px; height: 1px; background: #C4A97D; margin: 10px 0; }
.cf-popup__chips { display: flex; flex-wrap: wrap; gap: 6px; }
.cf-popup__chips a {
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #B85C38;
  border: 1px solid rgba(184, 92, 56, 0.4);
  padding: 4px 9px;
  text-decoration: none;
  transition: background 0.2s ease, color 0.2s ease;
}
.cf-popup__chips a:hover { background: #B85C38; color: #F5F1EA; }
.cf-popup__link {
  display: inline-block;
  margin-top: 10px;
  font-size: 10px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: #1C1915;
  text-decoration: none;
  border-bottom: 1px solid rgba(139, 115, 85, 0.5);
  padding-bottom: 2px;
  cursor: pointer;
}
.cf-popup__link:hover { color: #B85C38; border-color: #B85C38; }
.cf-popup__note { font-size: 11px; color: #8B7355; font-style: italic; margin-top: 8px; }

.cf-tip.leaflet-tooltip {
  background: rgba(28, 25, 21, 0.92);
  color: #F5F1EA;
  border: 1px solid rgba(196, 169, 125, 0.5);
  border-radius: 2px;
  padding: 6px 10px;
  font-family: 'Switzer', sans-serif;
  font-size: 12px;
  letter-spacing: 0.02em;
  box-shadow: 0 8px 20px -6px rgba(28, 25, 21, 0.5);
}
.cf-tip.leaflet-tooltip::before { border-top-color: rgba(28, 25, 21, 0.92); border-bottom-color: rgba(28, 25, 21, 0.92); }
.cf-tip.leaflet-tooltip-left::before { border-left-color: rgba(28, 25, 21, 0.92); }
.cf-tip.leaflet-tooltip-right::before { border-right-color: rgba(28, 25, 21, 0.92); }
.cf-tip strong { font-family: 'Cormorant Garamond', Georgia, serif; font-weight: 500; font-size: 15px; display: block; }
.cf-tip span { font-size: 10px; letter-spacing: 0.14em; text-transform: uppercase; color: #C4A97D; }

/* ---------- touch guard ---------- */
.cf-map__guard {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(28, 25, 21, 0.0);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.cf-map__guard span {
  font-family: 'Switzer', sans-serif;
  font-size: 11px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: #F5F1EA;
  background: rgba(28, 25, 21, 0.78);
  border: 1px solid rgba(196, 169, 125, 0.6);
  padding: 10px 16px;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}
.cf-map__guard.is-hidden { display: none; }

/* ---------- bar of chips above / below a map ---------- */
.cf-map__bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin: 0 0 14px;
}
.cf-chip {
  font-family: 'Switzer', sans-serif;
  font-weight: 400;
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #3D3429;
  background: transparent;
  border: 1px solid rgba(139, 115, 85, 0.32);
  padding: 8px 14px;
  cursor: pointer;
  transition: all 0.2s ease;
}
.cf-chip:hover, .cf-chip.is-active { color: #F5F1EA; background: #1C1915; border-color: #1C1915; }
.cf-map__hint {
  text-align: center;
  font-family: 'Switzer', sans-serif;
  font-weight: 300;
  font-size: 12px;
  letter-spacing: 0.04em;
  color: #8B7355;
  margin-top: 12px;
}

/* ---------- dark variant (Everest) ---------- */
.cf-map--dark { background: #14120F; border-color: rgba(196, 169, 125, 0.3); }
.cf-map--dark .cf-map__canvas, .cf-map--dark .leaflet-container { background: #14120F; }
.cf-map--dark::after { box-shadow: inset 0 0 0 1px rgba(196, 169, 125, 0.12), inset 0 0 90px rgba(0, 0, 0, 0.45); }
.cf-map--dark .leaflet-bar { border-color: rgba(196, 169, 125, 0.4); }
.cf-map--dark .leaflet-bar a, .cf-map--dark .cf-map__btn { background: rgba(28, 25, 21, 0.9); color: #F5F1EA; border-bottom-color: rgba(196, 169, 125, 0.2); }
.cf-map--dark .leaflet-bar a:hover, .cf-map--dark .cf-map__btn:hover { background: #C4A97D; color: #1C1915; }
.cf-map--dark .leaflet-bar a.leaflet-disabled { color: rgba(245, 241, 234, 0.3); background: rgba(28, 25, 21, 0.9); }
.cf-map--dark .cf-map__guard span { background: rgba(28, 25, 21, 0.85); }

@media (max-width: 768px) {
  .cf-map__canvas { height: 440px; }
  .cf-map .leaflet-control { margin: 10px; }
  .cf-chip { padding: 7px 11px; font-size: 10px; }
}

/* ---------- story maps (blog posts) ---------- */
.post-map { max-width: 1000px; margin: 8px auto 0; padding: 0 24px; }
.post-map__head { text-align: center; margin: 0 0 22px; }
.post-map__label {
  display: block;
  font-family: 'Switzer', sans-serif;
  font-weight: 400;
  font-size: 10px;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: #8B7355;
  margin-bottom: 12px;
}
.post-map__title {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-weight: 500;
  font-size: clamp(26px, 3vw, 34px);
  line-height: 1.15;
  color: #1C1915;
  margin: 0 0 10px;
}
.post-map__intro {
  font-family: 'Switzer', sans-serif;
  font-weight: 300;
  font-size: 14px;
  line-height: 1.7;
  color: #8B7355;
  max-width: 540px;
  margin: 0 auto;
}
.post-map .cf-map__canvas { height: 560px; }
.cf-popup__ext {
  display: block;
  margin-top: 10px;
  font-size: 11px;
  color: #8B7355;
  text-decoration: none;
  border-bottom: 1px dotted rgba(139, 115, 85, 0.5);
  width: max-content;
}
.cf-popup__ext:hover { color: #B85C38; }
@media (max-width: 768px) {
  .post-map { padding: 0 16px; }
  .post-map .cf-map__canvas { height: 430px; }
}
