/* ==========================================================================
   Ramen Shop Japan - Search Tool Component Styles
   (Completely aligned with custom.css: #ffe6e6 bg, #cc0000 navbar, #330000 text)
   ========================================================================== */

/* ツール上部 検索バー & フィルターピルコンテナ */
.tool-filter-section {
  background: #ffffff;
  border-bottom: 2px solid #ffcccc;
  padding: 1rem 1.5rem;
  box-shadow: 0 2px 8px rgba(204, 0, 0, 0.06);
  position: sticky;
  top: 72px; /* 既存ナビバーの下に固定 */
  z-index: 1000;
}

.tool-controls-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  max-width: 1440px;
  margin: 0 auto 0.75rem;
}

.tool-search-box {
  flex: 1;
  min-width: 280px;
  max-width: 500px;
  position: relative;
}

.tool-search-input {
  width: 100%;
  padding: 0.6rem 1rem 0.6rem 2.4rem;
  background: #ffffff;
  border: 2px solid #cc0000;
  border-radius: 30px;
  color: #330000;
  font-size: 0.95rem;
  font-weight: 500;
  outline: none;
  transition: all 0.2s;
  box-shadow: 0 2px 6px rgba(204, 0, 0, 0.08);
}

.tool-search-input:focus {
  border-color: #ac1616;
  box-shadow: 0 0 0 3px rgba(204, 0, 0, 0.2);
}

.tool-search-icon {
  position: absolute;
  left: 0.85rem;
  top: 50%;
  transform: translateY(-50%);
  color: #cc0000;
  font-size: 1rem;
  pointer-events: none;
}

.tool-area-select {
  background: #ffffff;
  color: #330000;
  border: 2px solid #cc0000;
  border-radius: 30px;
  padding: 0.55rem 1rem;
  font-size: 0.9rem;
  font-weight: 600;
  outline: none;
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(204, 0, 0, 0.08);
}

/* フィルターピルバー */
.tool-pills-bar {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  overflow-x: auto;
  max-width: 1440px;
  margin: 0 auto;
  padding-bottom: 0.25rem;
  scrollbar-width: none;
}
.tool-pills-bar::-webkit-scrollbar {
  display: none;
}

.tool-pill {
  padding: 0.4rem 1rem;
  border-radius: 30px;
  border: 1.5px solid #cc0000;
  background: #ffffff;
  color: #cc0000;
  font-size: 0.85rem;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.15s ease-in-out;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  user-select: none;
  box-shadow: 0 1px 3px rgba(204, 0, 0, 0.08);
}

.tool-pill:hover {
  background: #fff5f5;
  border-color: #ac1616;
  color: #ac1616;
}

.tool-pill.active {
  background: #cc0000 !important;
  color: #ffffff !important;
  border-color: #cc0000 !important;
  box-shadow: 0 2px 8px rgba(204, 0, 0, 0.3) !important;
}

/* スプリットビュー（左: リスト、右: 地図） */
.tool-split-container {
  display: flex;
  max-width: 1440px;
  margin: 0 auto;
  height: calc(100vh - 185px);
  overflow: hidden;
  background: #ffe6e6; /* 既存サイトの背景色 */
}

/* 左ペイン: 店舗一覧 */
.tool-list-pane {
  flex: 1;
  overflow-y: auto;
  padding: 1.25rem;
  border-right: 2px solid #ffcccc;
  min-width: 360px;
}

.tool-stats-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
  font-size: 0.9rem;
  color: #663333;
  font-weight: 600;
}

.tool-stats-count {
  font-size: 1.3rem;
  font-weight: 800;
  color: #cc0000;
}

.tool-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1rem;
}

/* 店舗カード */
.tool-shop-card {
  background: #ffffff;
  border: 1.5px solid #ffcccc;
  border-radius: 12px;
  padding: 0.9rem;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  text-decoration: none;
  color: #330000;
  transition: all 0.2s ease-in-out;
  box-shadow: 0 2px 6px rgba(204, 0, 0, 0.05);
  position: relative;
}

.tool-shop-card:hover {
  background: #ffffff;
  border-color: #cc0000;
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(204, 0, 0, 0.15);
  color: #330000;
  text-decoration: none;
}

.tool-thumb-box {
  width: 100%;
  aspect-ratio: 16/9;
  background: #f6ead3; /* 丼イラスト背景色規格 */
  border-radius: 8px;
  overflow: hidden;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid #ebd8bd;
}

.tool-thumb-box img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.25s;
}

.tool-shop-card:hover .tool-thumb-box img {
  transform: scale(1.04);
}

.tool-badge-overlay {
  position: absolute;
  top: 8px;
  left: 8px;
  display: flex;
  gap: 4px;
}

.tool-badge-item {
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
  font-size: 0.72rem;
  font-weight: 700;
  color: #ffffff;
  box-shadow: 0 1px 3px rgba(0,0,0,0.25);
}

.tool-badge-morning {
  background: #cc0000;
}

.tool-badge-parking {
  background: #2e7d32;
}

.tool-card-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: #cc0000;
  margin: 0;
  line-height: 1.35;
}

.tool-card-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.8rem;
  color: #663333;
}

.tool-star-badge {
  color: #b45309;
  background: #fef3c7;
  padding: 0.15rem 0.45rem;
  border-radius: 4px;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 0.2rem;
  border: 1px solid #fde68a;
}

.tool-card-row {
  font-size: 0.8rem;
  color: #663333;
  display: flex;
  align-items: center;
  gap: 0.35rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* 右ペイン: マップエリア */
.tool-map-pane {
  flex: 1.1;
  height: 100%;
  position: relative;
  background: #f8fafc;
}

#map {
  width: 100%;
  height: 100%;
}

/* レスポンシブ */
@media (max-width: 900px) {
  .tool-split-container {
    flex-direction: column;
    height: auto;
  }
  .tool-list-pane {
    border-right: none;
    border-bottom: 2px solid #ffcccc;
    max-height: 50vh;
  }
  .tool-map-pane {
    height: 45vh;
  }
}
