/* =========================================================
   HOTLINE DEALER MAP — dealer.css
   ========================================================= */
.dealer-app {
  position: fixed; inset: 64px 0 0 0;
  display: grid; grid-template-columns: 400px 1fr;
}

/* --------------------------- side panel */
.dealer-panel {
  background: var(--bg-2); border-right: 1px solid var(--line);
  display: flex; flex-direction: column; overflow: hidden; z-index: 20;
}
.dp-head { padding: 22px 22px 12px; border-bottom: 1px solid var(--line); }
.dp-head h1 { font-family: var(--font-en); font-weight: 800; font-size: 1.6rem; margin-top: 8px; }
.dp-count { color: var(--muted); font-size: 0.82rem; margin-top: 6px; }
.dp-count b { color: var(--accent); font-family: var(--font-en); }

.dp-controls { padding: 16px 22px 10px; display: flex; flex-direction: column; gap: 10px; }
.dp-search { position: relative; display: flex; align-items: center; }
.dp-search svg { position: absolute; left: 14px; width: 18px; height: 18px; color: var(--muted-2); }
.dp-search input {
  width: 100%; background: var(--panel); border: 1px solid var(--line-2); color: var(--text);
  font-family: var(--font-jp); font-size: 0.9rem; padding: 13px 14px 13px 42px; border-radius: 12px;
}
.dp-search input::placeholder { color: var(--muted-2); }
.dp-search input:focus { border-color: var(--accent); outline: none; }
.dp-locate {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  font-family: var(--font-en); font-weight: 700; font-size: 0.82rem; letter-spacing: 0.04em;
  padding: 13px; border-radius: 12px; background: var(--accent); color: #04121a; transition: .25s;
}
.dp-locate:hover { background: #4ad3ff; }
.dp-locate.loading { opacity: .6; pointer-events: none; }
.dp-locate svg { width: 17px; height: 17px; }

.dp-regions { display: flex; gap: 7px; overflow-x: auto; padding: 8px 22px 14px; scrollbar-width: none; border-bottom: 1px solid var(--line); }
.dp-regions::-webkit-scrollbar { display: none; }
.dp-region {
  flex: 0 0 auto; font-family: var(--font-en); font-size: 0.76rem; font-weight: 600;
  padding: 8px 14px; border-radius: 999px; border: 1px solid var(--line-2); color: var(--muted); transition: .2s;
}
.dp-region:hover { color: var(--text); border-color: var(--accent); }
.dp-region.active { background: var(--accent); border-color: var(--accent); color: #04121a; }

/* --------------------------- list */
.dp-list { list-style: none; overflow-y: auto; flex: 1; -webkit-overflow-scrolling: touch; }
.dp-item {
  padding: 15px 22px; border-bottom: 1px solid var(--line); cursor: pointer;
  transition: background .2s; display: flex; gap: 12px; align-items: flex-start;
}
.dp-item:hover, .dp-item.active { background: var(--panel); }
.dp-item.active { box-shadow: inset 3px 0 0 var(--accent); }
.dp-pin {
  flex: 0 0 auto; width: 30px; height: 30px; border-radius: 50%;
  background: rgba(0,194,255,.12); border: 1px solid rgba(0,194,255,.4);
  display: flex; align-items: center; justify-content: center; color: var(--accent);
  font-family: var(--font-en); font-weight: 700; font-size: 0.7rem; margin-top: 2px;
}
.dp-body { flex: 1; min-width: 0; }
.dp-name { font-weight: 700; font-size: 0.96rem; }
.dp-meta { color: var(--muted); font-size: 0.78rem; margin-top: 3px; }
.dp-adr { color: var(--muted-2); font-size: 0.76rem; margin-top: 4px; line-height: 1.5; }
.dp-dist { color: var(--accent); font-family: var(--font-en); font-size: 0.72rem; font-weight: 600; margin-top: 5px; }
.dp-actions { display: flex; gap: 8px; margin-top: 10px; }
.dp-actions a {
  font-family: var(--font-en); font-size: 0.68rem; font-weight: 600; letter-spacing: 0.04em;
  padding: 7px 11px; border-radius: 8px; border: 1px solid var(--line-2); color: var(--muted);
  display: inline-flex; align-items: center; gap: 5px; transition: .2s;
}
.dp-actions a:hover { border-color: var(--accent); color: var(--accent); }
.dp-actions svg { width: 13px; height: 13px; }
.dp-empty { padding: 40px 22px; color: var(--muted); text-align: center; font-size: 0.88rem; }

.dp-chains { padding: 14px 22px 20px; border-top: 1px solid var(--line); background: var(--panel); }
.dp-chains h4 { font-family: var(--font-en); font-size: 0.68rem; letter-spacing: 0.16em; color: var(--muted-2); margin-bottom: 8px; }
.dp-chains p { color: var(--muted); font-size: 0.8rem; line-height: 1.8; }

/* --------------------------- map */
.dealer-map { position: relative; z-index: 10; background: #0a0e15; }
.leaflet-container { background: #0a0e15; font-family: var(--font-jp); }
/* OSM標準(ライト)タイルを反転してダークマップ化。マーカーは別ペインなので影響なし */
.dealer-map .leaflet-tile-pane { filter: invert(1) hue-rotate(180deg) brightness(0.92) contrast(0.9) saturate(0.8); }
.leaflet-control-attribution { background: rgba(6,8,12,.7) !important; color: var(--muted-2) !important; }
.leaflet-control-attribution a { color: var(--muted) !important; }
.leaflet-popup-content-wrapper { background: var(--panel-2); color: var(--text); border-radius: 14px; border: 1px solid var(--line-2); box-shadow: var(--shadow); }
.leaflet-popup-tip { background: var(--panel-2); border: 1px solid var(--line-2); }
.leaflet-popup-content { margin: 16px 18px; font-family: var(--font-jp); }
.leaflet-popup-close-button { color: var(--muted) !important; padding: 8px 8px 0 0 !important; }
.pop-name { font-family: var(--font-en); font-weight: 700; font-size: 1rem; margin-bottom: 2px; }
.pop-pref { color: var(--accent); font-size: 0.74rem; }
.pop-adr { color: var(--muted); font-size: 0.78rem; margin: 8px 0; line-height: 1.5; }
.pop-tel { color: var(--text); font-size: 0.82rem; }
.pop-btns { display: flex; gap: 8px; margin-top: 12px; }
.pop-btns a {
  font-family: var(--font-en); font-size: 0.7rem; font-weight: 700; padding: 8px 12px; border-radius: 8px;
  display: inline-flex; align-items: center; gap: 5px;
}
.pop-btns .route { background: var(--accent); color: #04121a; }
.pop-btns .tel { border: 1px solid var(--line-2); color: var(--text); }
.pop-btns svg { width: 13px; height: 13px; }

/* custom marker */
.hl-marker {
  width: 26px; height: 26px; border-radius: 50% 50% 50% 0; transform: rotate(-45deg);
  background: var(--accent); border: 2px solid #eaffff; box-shadow: 0 3px 10px rgba(0,0,0,.5);
}
.hl-marker.active { background: var(--accent-warm); z-index: 1000; }
.hl-me {
  width: 18px; height: 18px; border-radius: 50%; background: #4ad3ff;
  border: 3px solid #fff; box-shadow: 0 0 0 6px rgba(0,194,255,.25), 0 2px 8px rgba(0,0,0,.5);
}

/* mobile */
.dp-mobile-toggle { display: none; }
@media (max-width: 860px) {
  .dealer-app { grid-template-columns: 1fr; }
  .dealer-panel {
    position: absolute; inset: 0; border-right: none;
    transform: translateY(0); transition: transform .4s var(--ease);
  }
  .dealer-map { position: absolute; inset: 0; }
  body.map-view .dealer-panel { transform: translateY(101%); }
  .dp-mobile-toggle {
    display: block; position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%);
    z-index: 50; background: var(--accent); color: #04121a; font-family: var(--font-en); font-weight: 800;
    letter-spacing: 0.05em; padding: 13px 28px; border-radius: 999px; box-shadow: var(--shadow); font-size: 0.85rem;
  }
  .dp-mobile-toggle .to-map { display: none; }
  body.map-view .dp-mobile-toggle .to-list { display: none; }
  body.map-view .dp-mobile-toggle .to-map { display: inline; }
}
