/**
 * 対応エリアページ専用: Leaflet 地図のレイアウト・凡例。
 * site.css のユーティリティと競合しないようクラスは deliver-area-map-* プレフィックスを付与。
 */

/* アスペクト比付きフレーム内で地図を全面に敷く */
.deliver-area-map-frame {
  position: relative;
}

/* Leaflet のルート要素。親の aspect-* ボックスいっぱいに広げる */
#deliver-area-osm-map {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  border-radius: 2px;
}

#deliver-area-osm-map.leaflet-container {
  font-family: inherit;
  /* 淡色地図のベースに近いグレー（タイル読込前のチラつき軽減） */
  background: #f5f3ef;
}

/* タイル読み込み前の下地とトーンを揃える */
#deliver-area-osm-map .leaflet-tile-container img {
  border-radius: 0;
}

/* 著作権表示を読みやすくコンパクトに（必須表示は維持） */
#deliver-area-osm-map .leaflet-control-attribution {
  font-size: 10px;
  line-height: 1.35;
  max-width: min(100%, 280px);
  white-space: normal;
  background: rgba(255, 255, 255, 0.88);
  border-radius: 4px 0 0 0;
  padding: 4px 8px;
  box-shadow: 0 0 4px rgba(0, 0, 0, 0.08);
}

#deliver-area-osm-map .leaflet-control-attribution a {
  color: #0b3d91;
}

/* ズームボタンをサイトトーンに近づける */
#deliver-area-osm-map .leaflet-bar a {
  color: #0b3d91;
}

#deliver-area-osm-map .leaflet-bar a:hover {
  background: #f0f4fa;
}

/* カスタム凡例（L.Control で注入） */
.deliver-area-map-legend {
  padding: 10px 12px;
  background: rgba(255, 255, 255, 0.94);
  border-radius: 8px;
  box-shadow: 0 4px 20px rgba(11, 61, 145, 0.12), 0 0 0 1px rgba(11, 61, 145, 0.08);
  font-size: 11px;
  line-height: 1.45;
  color: #333;
  min-width: 168px;
}

.deliver-area-map-legend__title {
  font-weight: 700;
  font-size: 11px;
  letter-spacing: 0.06em;
  color: #0b3d91;
  margin-bottom: 8px;
}

.deliver-area-map-legend__row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 6px;
}

.deliver-area-map-legend__row:first-of-type {
  margin-top: 0;
}

.deliver-area-map-legend__swatch {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  flex-shrink: 0;
  border: 2px solid rgba(255, 255, 255, 0.95);
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.12);
}

.deliver-area-map-legend__note {
  margin-top: 8px;
  font-size: 9px;
  color: #64748b;
  line-height: 1.4;
}

/* 右上ズームコントロールと凡例の間隔（Leaflet の既定マージンに上乗せ） */
#deliver-area-osm-map .leaflet-top.leaflet-right .deliver-area-map-legend {
  margin-top: 52px;
}
