/*
  道の駅TRIP 2.0 — 07 日本MAP（営業デモ専用Visual）
  ブランド世界観: 深いネイビー、サンライズオレンジ、上質な旅情メディア
*/

#v2ViewMap.active {
  display: block;
  width: 100%;
  height: 100dvh;
  height: 100vh;
  overflow: hidden;
}

.v2-map-national {
  position: relative;
  width: 100%;
  height: 100dvh;
  height: 100vh;
  display: flex;
  flex-direction: column;
  background: #0B2A6B;
  overflow: hidden;
}

/* ─────────────────────────────────────────────────────────────
   ヘッダー: 濃紺×白文字×サンライズオレンジの品格あるタイポグラフィ
   ───────────────────────────────────────────────────────────── */
.v2-map-national-header {
  position: relative;
  z-index: 5;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: calc(env(safe-area-inset-top, 0px) + 12px) 16px 12px;
  background: #0B2A6B;
  color: #fff;
  flex: 0 0 auto;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 4px 16px rgba(11, 42, 107, 0.25);
  box-sizing: border-box;
}

.v2-map-national-back {
  flex: 0 0 auto;
  width: 38px;
  height: 38px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: transform 0.12s ease, background 0.15s ease;
  -webkit-tap-highlight-color: transparent;
}

.v2-map-national-back:active {
  transform: scale(0.93);
  background: rgba(255, 255, 255, 0.22);
}

.v2-map-national-back svg {
  width: 20px;
  height: 20px;
}

.v2-map-national-title-wrap {
  flex: 1 1 auto;
  min-width: 0;
}

.v2-map-national-title {
  margin: 0;
  font-family: "Noto Sans JP", -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 17px;
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: -0.01em;
  color: #ffffff;
}

.v2-map-national-count {
  margin: 3px 0 0;
  font-family: "Montserrat", "Noto Sans JP", sans-serif;
  font-size: 11.5px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.85);
  letter-spacing: 0.02em;
}

/* ─────────────────────────────────────────────────────────────
   MAPキャンバス領域: 画面の大半をMAPが専有
   ───────────────────────────────────────────────────────────── */
.v2-map-national-canvas-wrap {
  position: relative;
  flex: 1 1 auto;
  min-height: 0;
  width: 100%;
  height: 100%;
}

#v2NationalMap {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.v2-map-national-loading,
.v2-map-national-error {
  position: absolute;
  inset: 0;
  z-index: 4;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  padding: 24px;
  text-align: center;
  background: rgba(11, 42, 107, 0.94);
  color: #fff;
  font-family: "Noto Sans JP", sans-serif;
  font-size: 13.5px;
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}

.v2-map-national-loading.is-hidden,
.v2-map-national-error.is-hidden {
  display: none;
}

.v2-map-national-error button {
  padding: 10px 24px;
  border-radius: 999px;
  border: none;
  background: #ffffff;
  color: #0B2A6B;
  font-family: "Noto Sans JP", sans-serif;
  font-weight: 700;
  font-size: 13px;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  transition: transform 0.1s ease;
}

.v2-map-national-error button:active {
  transform: scale(0.96);
}

/* ─────────────────────────────────────────────────────────────
   MapLibre GL Popup: ブランドUIカード化
   ───────────────────────────────────────────────────────────── */
.maplibregl-popup {
  z-index: 10;
}

.maplibregl-popup-content {
  background: #FFFFFF !important;
  border-radius: 14px !important;
  padding: 11px 14px 10px !important;
  box-shadow: 0 8px 24px rgba(11, 42, 107, 0.18), 0 2px 6px rgba(0, 0, 0, 0.04) !important;
  border: 1px solid rgba(11, 42, 107, 0.08) !important;
  box-sizing: border-box;
}

.maplibregl-popup-anchor-top .maplibregl-popup-tip {
  border-bottom-color: #FFFFFF !important;
}
.maplibregl-popup-anchor-bottom .maplibregl-popup-tip {
  border-top-color: #FFFFFF !important;
}
.maplibregl-popup-anchor-left .maplibregl-popup-tip {
  border-right-color: #FFFFFF !important;
}
.maplibregl-popup-anchor-right .maplibregl-popup-tip {
  border-left-color: #FFFFFF !important;
}

.maplibregl-popup-close-button {
  top: 7px !important;
  right: 7px !important;
  width: 22px !important;
  height: 22px !important;
  border-radius: 999px !important;
  color: #94A3B8 !important;
  font-size: 16px !important;
  line-height: 20px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  transition: background 0.12s ease, color 0.12s ease !important;
  border: none !important;
  outline: none !important;
}

.maplibregl-popup-close-button:hover,
.maplibregl-popup-close-button:active {
  background: #F1F5F9 !important;
  color: #334155 !important;
}

.v2-map-popup {
  font-family: "Noto Sans JP", -apple-system, BlinkMacSystemFont, sans-serif;
  padding-right: 12px;
}

.v2-map-popup-pref {
  font-size: 11px;
  font-weight: 600;
  color: #FF6B00;
  letter-spacing: 0.02em;
  margin-bottom: 2px;
  line-height: 1.2;
}

.v2-map-popup-name {
  font-size: 14.5px;
  font-weight: 700;
  color: #0E2548;
  line-height: 1.35;
  letter-spacing: -0.01em;
}

/* ─────────────────────────────────────────────────────────────
   レスポンシブ微調整 (375px / 390px / 430px)
   ───────────────────────────────────────────────────────────── */
@media (max-width: 380px) {
  .v2-map-national-header {
    padding: calc(env(safe-area-inset-top, 0px) + 10px) 14px 10px;
    gap: 10px;
  }
  .v2-map-national-back {
    width: 36px;
    height: 36px;
  }
  .v2-map-national-title {
    font-size: 16px;
  }
  .v2-map-national-count {
    font-size: 11px;
  }
  .v2-map-popup-name {
    font-size: 13.5px;
  }
}

@media (min-width: 420px) {
  .v2-map-national-header {
    padding: calc(env(safe-area-inset-top, 0px) + 14px) 18px 14px;
    gap: 14px;
  }
  .v2-map-national-title {
    font-size: 18px;
  }
  .v2-map-national-count {
    font-size: 12px;
  }
}
