/* ============================================================
   BURGER FINDER - フロントエンドスタイル
   assets/burger-map-style.css
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Bebas+Neue&family=Noto+Sans+JP:wght@400;500;700&display=swap');

/* ---------- 変数 ---------- */
:root {
  --c-bg:       #FFFBF4;
  --c-dark:     #1C1007;
  --c-brown:    #3D1F0C;
  --c-yellow:   #F5C518;
  --c-red:      #C8372B;
  --c-green:    #1A9E4A;
  --c-muted:    #7A5C3A;
  --c-border:   #E8D9C0;
  --c-panel:    #FFFDF8;
  --radius-lg:  18px;
  --radius-sm:  8px;
  --shadow:     0 10px 40px rgba(28,16,7,.14);
  --shadow-sm:  0 4px 16px rgba(28,16,7,.10);
  --font-disp:  'Bebas Neue', sans-serif;
  --font-body:  'Noto Sans JP', sans-serif;
  --panel-w:    380px;
  --header-h:   64px;
}

/* ---------- ベース ---------- */
#bf-root {
  font-family: var(--font-body);
  position: relative;       /* 通常フローに変更 */
  width: 100%;
  background: var(--c-dark);
}

/* ---------- ページ全体ラッパー ---------- */
#bf-page-wrap {
  width: 100%;
}

/* ---------- 上下コンテンツエリア ---------- */
.bf-page-content {
  max-width: 860px;
  margin: 0 auto;
  padding: 0px 24px;
  font-family: var(--font-body);
  color: #1C1007;
  line-height: 1.8;
}
.bf-page-content h1, .bf-page-content h2, .bf-page-content h3 {
  font-family: var(--font-disp);
  letter-spacing: .04em;
  margin-bottom: .5em;
}
.bf-page-content p { margin-bottom: 1em; }
.bf-page-content img { max-width: 100%; border-radius: 8px; }

/* ---------- 地図バー（地図上部に固定表示されるUI） ---------- */
#bf-map-bar {
  background: var(--c-dark);
  padding: 10px 20px;
  border-bottom: 3px solid var(--c-yellow);
}
#bf-map-bar-inner {
  display: flex;
  align-items: center;
  gap: 12px;
  max-width: 1200px;
  margin: 0 auto;
}
.bf-bar-logo { font-size: 1.8rem; line-height: 1; }
.bf-bar-text {
  display: flex;
  flex-direction: column;
  gap: 1px;
}
.bf-bar-title {
  font-family: var(--font-disp);
  font-size: 1.5rem;
  color: var(--c-yellow);
  letter-spacing: .06em;
  line-height: 1;
}
.bf-bar-subtitle {
  font-size: .65rem;
  color: #b89878;
  letter-spacing: .04em;
}

#bf-today-badge {
  margin-left: auto;
  background: rgba(245,197,24,.15);
  border: 1px solid rgba(245,197,24,.35);
  border-radius: 30px;
  padding: 4px 14px;
  font-size: .72rem;
  color: var(--c-yellow);
  white-space: nowrap;
}
#bf-today-label {
  margin-right: 4px;
  opacity: .75;
}
#bf-open-count {
  font-family: var(--font-disp);
  font-size: 1rem;
}

/* ---------- 地図コンテナ ---------- */
#bf-map-container {
  position: relative;
  width: 100%;
  height: 820px;   /* 地図の高さ。必要に応じて変更可 */
}

/* ---------- 地図本体 ---------- */
#bf-map {
  position: absolute;
  inset: 0;
  z-index: 0;
}

/* Leaflet ポップアップ の上書き */
.leaflet-popup-content-wrapper {
  border-radius: var(--radius-sm) !important;
  box-shadow: var(--shadow-sm) !important;
  font-family: var(--font-body) !important;
  font-size: 13px !important;
}
.leaflet-popup-content { margin: 10px 14px !important; }

/* ---------- 現在地ボタン ---------- */
#bf-locate-btn {
  position: absolute;
  bottom: 20px;
  left: 16px;
  z-index: 500;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: none;
  background: var(--c-dark);
  color: var(--c-yellow);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow);
  transition: transform .2s, background .2s;
}
#bf-locate-btn svg { width: 22px; height: 22px; }
#bf-locate-btn:hover { transform: scale(1.1); background: var(--c-brown); }

/* ---------- 店舗詳細パネル ---------- */
#bf-panel {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: var(--panel-w);
  max-width: 92vw;
  background: var(--c-panel);
  z-index: 600;
  overflow-y: auto;
  box-shadow: -6px 0 40px rgba(28,16,7,.18);
  transform: translateX(100%);
  transition: transform .35s cubic-bezier(.4,0,.2,1);
  display: flex;
  flex-direction: column;
}

#bf-panel.bf-panel-open { transform: translateX(0); }

#bf-panel-close {
  position: sticky;
  top: 12px;
  align-self: flex-start;
  margin: 12px 0 0 12px;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: none;
  background: var(--c-dark);
  color: #fff;
  font-size: .9rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 5;
  transition: background .2s;
  flex-shrink: 0;
}
#bf-panel-close:hover { background: var(--c-red); }

/* 店舗写真 */
#bf-panel-photo {
  width: 100%;
  height: 200px;
  background: #e8d9c0;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: -34px; /* closeボタンと重ねる */
  position: relative;
  z-index: 1;
}
#bf-panel-photo img { width: 100%; height: 100%; object-fit: cover; }
.bf-photo-placeholder { font-size: 4rem; }

/* パネル本文 */
#bf-panel-body {
  padding: 16px 22px 36px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

#bf-panel-name {
  font-family: var(--font-disp);
  font-size: 1.65rem;
  color: var(--c-dark);
  line-height: 1.2;
}

#bf-panel-description {
  font-size: .82rem;
  color: var(--c-muted);
  line-height: 1.7;
}

#bf-panel-type {
  background: #3D1F0C;
  color: #F5C518;
  font-size: .7rem;
  font-weight: 700;
  padding: 2px 10px;
  border-radius: 20px;
  letter-spacing: .05em;
}

/* 今日の営業状態 */
#bf-panel-today-hours {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  background: #f5ece0;
  border-radius: var(--radius-sm);
  font-size: .82rem;
}

.bf-open-badge {
  font-size: .72rem;
  font-weight: 700;
  padding: 2px 10px;
  border-radius: 20px;
  white-space: nowrap;
}
.bf-open-badge.open {
  background: rgba(26,158,74,.12);
  color: var(--c-green);
}
.bf-open-badge.closed {
  background: rgba(200,55,43,.12);
  color: var(--c-red);
}
.bf-open-badge.holiday {
  background: rgba(122,92,58,.1);
  color: var(--c-muted);
}

/* 情報行 */
.bf-info-row {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: .82rem;
  color: var(--c-dark);
  line-height: 1.6;
}
.bf-info-icon { flex-shrink: 0; font-size: 1rem; }

#bf-panel-phone a { color: var(--c-dark); text-decoration: none; }
#bf-panel-phone a:hover { text-decoration: underline; }

/* 営業時間アコーディオン */
.bf-hours-details {
  border: 1px solid var(--c-border);
  border-radius: var(--radius-sm);
  overflow: hidden;
  font-size: .8rem;
}
.bf-hours-details summary {
  padding: 9px 14px;
  cursor: pointer;
  color: var(--c-muted);
  background: #faf5ec;
  user-select: none;
  list-style: none;
}
.bf-hours-details summary::-webkit-details-marker { display: none; }
.bf-hours-details summary::before { content: '▶ '; font-size: .65rem; }
.bf-hours-details[open] summary::before { content: '▼ '; }

#bf-panel-hours-list { padding: 8px 14px; display: flex; flex-direction: column; gap: 4px; }

.bf-hours-row {
  display: flex;
  justify-content: space-between;
  padding: 4px 0;
  border-bottom: 1px solid rgba(28,16,7,.06);
  color: var(--c-dark);
}
.bf-hours-row:last-child { border-bottom: none; }
.bf-hours-row.bf-today {
  font-weight: 700;
  color: var(--c-brown);
  background: rgba(245,197,24,.18);
  padding: 4px 8px;
  border-radius: 4px;
  border: none;
}
.bf-hours-day { color: var(--c-muted); }
.bf-hours-row.bf-today .bf-hours-day { color: var(--c-brown); }
.bf-hours-closed { color: var(--c-muted); font-style: italic; }

/* ボタン */
#bf-panel-links {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 4px;
}
.bf-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 12px;
  border-radius: var(--radius-sm);
  font-size: .85rem;
  font-weight: 700;
  text-decoration: none;
  transition: transform .15s, box-shadow .15s;
}
.bf-btn:hover { transform: translateY(-2px); box-shadow: var(--shadow-sm); }
.bf-btn-primary { background: var(--c-dark); color: var(--c-yellow) !important; }
.bf-btn-instagram {
  background: linear-gradient(135deg, #f09433, #e6683c, #dc2743, #cc2366, #bc1888);
  color: #fff !important;
}

/* ---------- 店舗なし ---------- */
#bf-empty-state {
  position: absolute;
  bottom: 32px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 400;
  pointer-events: none;
}
.bf-empty-inner {
  background: var(--c-dark);
  color: #c9a87a;
  padding: 12px 24px;
  border-radius: 30px;
  font-size: .82rem;
  display: flex;
  gap: 8px;
  align-items: center;
  box-shadow: var(--shadow);
}

/* ---------- カスタムマーカー ---------- */
.bf-marker-icon {
  background: var(--c-yellow);
  border: 2.5px solid var(--c-dark);
  border-radius: 50% 50% 50% 0;
  transform: rotate(-45deg);
  box-shadow: 0 3px 10px rgba(28,16,7,.25);
  transition: transform .2s;
}
.bf-marker-icon:hover { transform: rotate(-45deg) scale(1.15); }
.bf-marker-icon.bf-closed { background: #aaa; }

/* ---------- レスポンシブ ---------- */
@media (max-width: 520px) {
  .bf-bar-title { font-size: 1.2rem; }
/*  #bf-today-badge { display: none; } */
  #bf-map-container { height: 480px; }
  #bf-panel { width: 100%; max-width: 100%; }
  #bf-locate-btn { bottom: 14px; left: 10px; }
  .bf-page-content { padding: 24px 16px; }
}
