
/* ===== MAP ページ固有スタイル ===== */
:root { --teal: #38B2AC; }

/* 全体レイアウト：ヘッダー下を地図＋サイドで占有 */
html, body { height: 100%; overflow: hidden; }
body.pg-map { display: flex; flex-direction: column; }

.map-layout {
  display: flex;
  flex: 1;
  overflow: hidden;
  height: calc(100vh - 64px);
}

/* ── サイドパネル ── */
.side-panel {
  width: 320px;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  background: #fff;
  border-right: 1px solid var(--gray2);
  overflow-y: auto;
  z-index: 10;
}

.filter-area { padding: 16px 16px 8px; border-bottom: 1px solid var(--gray1); }
.filter-title { font-size: 12px; font-weight: 700; color: var(--gray3); margin-bottom: 10px; letter-spacing: .05em; text-transform: uppercase; }
.cat-filters  { display: flex; flex-wrap: wrap; gap: 6px; }
.cat-btn {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 4px 10px; border-radius: 50px;
  border: 1.5px solid var(--gray2);
  background: #fff; font-size: 12px; font-weight: 500;
  cursor: pointer; transition: all .15s;
}
.cat-btn:hover { border-color: var(--teal); color: var(--teal); }
.dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }

.search-area { padding: 10px 16px; border-bottom: 1px solid var(--gray1); }
.search-box {
  display: flex; align-items: center; gap: 8px;
  background: var(--gray1); border-radius: 8px; padding: 8px 12px;
}
.search-box input {
  border: none; background: transparent; outline: none;
  font-size: 13px; width: 100%; font-family: inherit;
}

.spot-list { flex: 1; overflow-y: auto; padding-bottom: 8px; }
.spot-count { padding: 10px 16px; font-size: 12px; color: var(--gray3); border-bottom: 1px solid var(--gray1); }
.spot-count strong { color: var(--text); }

.spot-item {
  display: flex; align-items: flex-start; gap: 10px;
  padding: 12px 16px; cursor: pointer; transition: background .15s;
  border-bottom: 1px solid var(--gray1);
}
.spot-item:hover { background: var(--gray1); }
.spot-item.active { background: #EBF8FF; }
.spot-icon {
  width: 36px; height: 36px; border-radius: 10px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center; font-size: 18px;
}
.spot-info { flex: 1; min-width: 0; }
.spot-name { font-size: 13px; font-weight: 700; margin-bottom: 3px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.spot-cat  { display: inline-block; color: #fff; font-size: 10px; font-weight: 700; padding: 1px 6px; border-radius: 50px; margin-right: 3px; }
.spot-addr { font-size: 11px; color: var(--gray3); margin-top: 3px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.spot-badges { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 5px; }
.spot-badge { font-size: 10px; padding: 1px 6px; border-radius: 50px; background: var(--gray1); color: var(--text2); }
.spot-badge.free { background: #C6F6D5; color: #276749; font-weight: 700; }
.spot-badge.pr   { background: #FFD166; color: #2D3748; font-weight: 700; }

.sponsor-box { padding: 12px 16px; border-top: 1px solid var(--gray2); background: #FFFBEB; flex-shrink: 0; }
.sponsor-inner { text-align: center; }
.sponsor-label { font-size: 10px; color: var(--gray3); margin-bottom: 4px; }
.sponsor-name  { font-size: 14px; font-weight: 700; color: var(--text); }
.sponsor-desc  { font-size: 11px; color: var(--text2); margin-top: 2px; }

/* ── 地図エリア ── */
#map { flex: 1; z-index: 1; border-radius: 100px 100px 0; margin: 30px;}
.leaflet-top { top: 20px !important;}
.leaflet-left { left: 20px !important;}

/* ── 地図内の凡例 ── */
.map-info-bar {
  position: absolute; top: 12px; right: 12px; z-index: 100;
  background: rgba(255,255,255,.92); border-radius: 10px;
  padding: 10px 12px; box-shadow: 0 2px 12px rgba(0,0,0,.12);
  backdrop-filter: blur(4px);
}
.map-info-row { display: flex; align-items: center; gap: 6px; font-size: 11px; color: var(--text); margin-top: 3px; }
.map-info-dot { width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0; }

/* ── Leaflet ポップアップ ── */
.leaflet-popup-content-wrapper { border-radius: 12px !important; padding: 0 !important; overflow: hidden; box-shadow: 0 4px 20px rgba(0,0,0,.18) !important; }
.leaflet-popup-content { margin: 0 !important; width: 260px !important; }
.popup-inner  { padding: 14px 16px 10px; }
.popup-header { display: flex; align-items: flex-start; gap: 8px; margin-bottom: 8px; }
.popup-icon   { font-size: 22px; flex-shrink: 0; }
.popup-title  { font-size: 14px; font-weight: 700; margin-bottom: 3px; }
.popup-cat    { display: inline-block; color: #fff; font-size: 10px; font-weight: 700; padding: 1px 6px; border-radius: 50px; margin-right: 3px; }
.popup-desc   { font-size: 12px; color: var(--text2); margin-bottom: 8px; line-height: 1.6; }
.popup-meta   { margin-bottom: 8px; }
.popup-meta-row { display: flex; align-items: baseline; gap: 5px; font-size: 11px; color: var(--text2); margin-bottom: 3px; }
.popup-meta-icon { flex-shrink: 0; }
.popup-tags   { display: flex; flex-wrap: wrap; gap: 4px; }
.popup-tag    { font-size: 10px; padding: 2px 7px; border-radius: 50px; background: var(--gray1); color: var(--text2); }
.popup-footer { border-top: 1px solid var(--gray1); padding: 0; }
.popup-btn    {
  display: block; text-align: center; padding: 10px;
  font-size: 12px; font-weight: 700; color: #3182CE; cursor: pointer;
  background: #EBF8FF; transition: background .15s;
}
.popup-btn:hover { background: #BEE3F8; }

/* ── モバイル ── */
@media (max-width: 768px) {
  html, body { overflow: auto; }
  .map-layout { flex-direction: column; height: auto; overflow: visible; }
  /* スポット検索結果の表示エリアを十分な高さで確保 */
  .side-panel { width: 100%; height: auto; max-height: none; min-height: 200px; border-right: none; border-bottom: 1px solid var(--gray2); }
  .spot-list { max-height: 280px; overflow-y: auto; }
  /* マップが下で切れないよう min-height を確保 */
  #map { height: 60vw; min-height: 300px; flex: none; border-radius: 0; margin: 0; }
  .leaflet-top { top: 10px !important; }
  .leaflet-left { left: 10px !important; }
  .map-info-bar { display: none; }
}
