@charset "utf-8";

/* ここからWPは削除　---1
        * { margin: 0; padding: 0; box-sizing: border-box; }
        body {
            font-family: YuGothic, '游ゴシック', 'Noto Sans JP', 'Meiryo', 'メイリオ', 'ＭＳ Ｐゴシック', sans-serif;
            background: #ffffff;
            min-height: 100vh;
            padding: 20px;
            letter-spacing: 0.05em;
        }
        .container { max-width: 1400px; margin: 0 auto; background: #ffffff; border-radius: 10px;
            box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1); overflow: hidden; }
        .header { background: #e5ab47; padding: 16px 4px 2px 39px; text-align: center; color: #ffffff; text-align: left;}
        .header h1 { font-size: 1.5rem; margin-bottom: 10px; text-shadow: 0 2px 10px rgba(0, 0, 0, 0.2); }
        .header p { font-size: 1.2rem; opacity: 0.9; }


        ここまでWPは削除　*/

.filter-area {
  padding: 12px 19px 12px 25px;
  display: flex;
  gap: 20px;
  background: #f8f9fa;
  border-bottom: 1px solid #e0e0e0;
  align-items: flex-end;
}

.filter-section {
  display: flex;
  flex-direction: column;
  position: relative;
}

.filter-section.regions {
  flex: 1;
}

/*.filter-title { font-size: 0.85rem; font-weight: 700; color: #333; margin-bottom: 8px; padding-bottom: 4px; border-bottom: 1px solid #e5ab47; }*/

.filter-title {
  font-size: 14px;
  /*font-size: 0.85rem;*/
  font-weight: 700;
  color: #333;
  margin-bottom: 8px;
  padding-bottom: 4px;
  border-bottom: 1px solid #e5ab47;
}

.filter-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.filter-button {
  display: flex;
  align-items: center;
  padding: 8px 12px;
  border-radius: 8px;
  border: 2px solid #e0e0e0;
  background: white;
  cursor: pointer;
  transition: all 0.3s ease;
  font-size: 14px;
  font-weight: 400;
  color: #7e7e7e;
  line-height: 1.5;
}

.filter-button.selected {
  background: #f6dcaf;
  border-color: #b67506;
  color: #000000;
  box-shadow: 0 4px 15px rgba(237, 198, 131, 0.5);
}

.filter-button:hover {
  border-color: #e5ab47;
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(229, 171, 71, 0.2);
}

.filter-button .icon {
  margin-right: 6px;
}

.main-content {
  display: grid;
  grid-template-columns: 1fr 367px;
  height: 740px;
}

.map-container {
  position: relative;
  background: #f0f0f0;
}

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

.loading {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: rgba(255, 255, 255, 0.95);
  padding: 30px;
  border-radius: 15px;
  text-align: center;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
  z-index: 1000;
}

.spinner {
  width: 50px;
  height: 50px;
  border: 4px solid #f3f3f3;
  border-top: 4px solid #e5ab47;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin: 0 auto 20px;
}

@keyframes spin {
  0% {
    transform: rotate(0deg);
  }

  100% {
    transform: rotate(360deg);
  }
}

.sidebar {
  background: #efede8;
  padding: 17px 3px;
  overflow-y: auto;
  border-left: 1px solid #e0e0e0;
  display: flex;
  flex-direction: column;
}

.upload-btn {
  background: #404040;
  color: white;
  border: none;
  padding: 8px 12px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  white-space: nowrap;
  line-height: 1.5;
}

.upload-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(64, 64, 64, 0.4);
}

.list-header {
  background: transparent;
  padding: 0;
  margin-bottom: 7px;
  box-shadow: none;
  padding-left: 13px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.list-header h3 {
  color: #333;
  font-size: 15px;
  margin-bottom: 0;
  font-weight: 700;
}

.school-list {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.school-items {
  flex: 1;
  overflow-y: auto;
  padding-right: 5px;
}

.school-item {
  background: #ffffff;
  border-radius: 6px;
  padding: 11px 14px 8px;
  margin-bottom: 1px;
  transition: all 0.3s ease;
  border-left: 4px solid transparent;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  cursor: pointer;
  display: flex;
  flex-direction: column;
  line-height: 1.5;
}

.school-item:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
  border-left-color: #e5ab47;
}

.school-item.selected {
  border-left-color: #4a4a4a;
  background: #f2f2f2;
}

.school-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0px;
}

.school-row-last {
  display: flex;
  align-items: center;
  gap: 8px;
}

.school-row-last .route-btn {
  margin-left: auto;
}

.school-name {
  font-size: 15px;
  font-weight: 700;
  color: #333;
  line-height: 1.3;
  margin-right: 10px;
}

.school-type-mini {
  background: #cd5c5c;
  color: white;
  padding: 3px 8px;
  border-radius: 12px;
  font-size: 10px;
  font-weight: 600;
  white-space: nowrap;
}

.school-type-mini.private {
  background: #37a0cf;
}

.school-region {
  font-size: 12px;
  color: #666;
  font-weight: 400;
}

.school-actions {
  display: flex;
  gap: 8px;
  align-items: center;
  margin-top: 4px;
}

.school-station {
  font-size: 12px;
  color: #749fc5;
  font-weight: 400;
  flex: 1;
}

.school-distance {
  font-size: 15px;
  color: #cd5c5c;
  font-weight: 600;
  white-space: nowrap;
}

.route-btn {
  background: #daf1fd;
  color: #014f5a;
  border: none;
  padding: 5px 16px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  white-space: nowrap;
}

.route-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 3px 8px rgba(116, 159, 197, 0.4);
}

.school-count {
  background: transparent;
  color: #cd5c5c;
  padding: 0;
  border-radius: 0;
  text-align: right;
  font-weight: 600;
  font-size: 12px;
  display: block;
  padding-right: 13px;
}

.status-message {
  text-align: center;
  color: #666;
  padding: 30px 20px;
  font-style: italic;
}

.error-message {
  background: #ffe6e6;
  color: #d63031;
  padding: 15px;
  border-radius: 8px;
  margin: 10px 0;
  border-left: 4px solid #d63031;
}

.search-container-wrapper {
  position: relative;
  flex: 2;
}

#searchInput {
  width: 100%;
  padding: 10px 15px;
  border: 2px solid #ddd;
  border-radius: 8px;
  font-size: 16px;
  outline: none;
  transition: border-color 0.3s ease;
  line-height: 1.0;
  font-size: 15px;
  background: #fff;
}

#searchInput:focus {
  border-color: #e5ab47;
}

#suggestions {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: #ffffda;
  border: 1px solid #e0e0e0;
  border-top: none;
  z-index: 999;
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1);
  max-height: 200px;
  overflow-y: auto;
  border-radius: 0 0 8px 8px;
  display: none;
}

.suggestion-item {
  padding: 10px 15px;
  cursor: pointer;
  transition: background-color 0.2s ease;
  font-size: 15px;
  color: #333;
  font-weight: 600;
}

.suggestion-item:hover,
.suggestion-item.active {
  background: #fef2ae;
}

@media (max-width: 768px) {
  .main-content {
    grid-template-columns: 1fr;
    grid-template-rows: 400px 1fr;
    height: 850px;
  }

  .header h1 {
    font-size: 2rem;
  }

  .sidebar {
    border-left: none;
    border-top: 1px solid #e0e0e0;
  }

  .filter-buttons {
    justify-content: center;
  }
}

/* サイドバーやリスト内を独立スクロール（ページ本体にスクロールを伝播させない） */
.sidebar,
.school-items {
  overscroll-behavior: contain;
}

/* PC表示時：検索ボックス＆フィルタセクションの幅を .container の1/4相当に調整 */
@media (min-width: 1024px) {
  .container {
    container-type: inline-size;
  }

  #searchInput {
    box-sizing: border-box;
    width: clamp(260px, 25cqw, 560px);
  }

  .filter-section:has(#searchInput) {
    flex: 0 0 clamp(260px, 25cqw, 560px) !important;
    width: clamp(260px, 25cqw, 560px);
  }

  .filter-section:has(#searchInput) .search-container-wrapper {
    width: 100%;
  }
}

/* GoogleマップのInfoWindowデフォルトの×ボタンを非表示にする */
.gm-ui-hover-effect {
  display: none !important;
}

.gm-style-iw,
.gm-style-iw-c {
  padding-right: 0 !important;
  overflow: visible !important;
}

/* ==== InfoWindow のカードデザイン（旧来スタイル・インライン指定なし） ==== */
.iw-wrap {
  position: relative;
  overflow: visible;
}

.iw-card {
  max-width: 520px;
  background: #fff;
  border-radius: 8px;
  padding: 12px;
  box-sizing: border-box;
}

.iw-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 8px;
}

.iw-title {
  margin: 0;
  font-size: 16px;
  font-weight: 700;
  color: #333;
  line-height: 1.3;
}

.iw-badge {
  background: #4a5568;
  color: #fff;
  padding: 4px 8px;
  border-radius: 12px;
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
}

.iw-body {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.iw-meta {
  flex: 1 1 auto;
  font-size: 12px;
  color: #333;
  line-height: 1.5;
}

.iw-line {
  margin-bottom: 6px;
}

.iw-img {
  flex: 0 0 auto;
}

.iw-img img {
  max-width: 160px;
  height: auto;
  object-fit: cover;
  border-radius: 6px;
  display: block;
}

.iw-actions {
  display: flex;
  gap: 8px;
  justify-content: center;
  margin-top: 12px;
}

.iw-btn {
  cursor: pointer;
  padding: 8px 12px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 600;
  flex: 1;
}

.iw-btn-outline {
  background: #fff;
  color: #333;
  border: 1px solid #ddd;
}

.iw-btn-primary {
  background: #1a73e8;
  color: #fff;
  border: none;
}

/* ホバー時に出る吹き出しラベル */
.hover-label {
  position: absolute;
  transform: translate(-50%, -100%);
  background: #a97c08;
  color: #fff;
  padding: 6px 10px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
  text-align: center;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
  pointer-events: none;
  z-index: 2147483647;
  display: none;
}

/* === 右上からスライド表示される詳細パネル（縦レイアウト） === */
.detail-box {
  position: absolute;
  top: 20px;
  right: 4px;
  width: 280px;
  height: auto;
  max-height: calc(100% - 5px);
  overflow-y: auto;
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, .25);
  z-index: 6;
  transform: translateX(100%);
  opacity: 0;
  transition: transform .35s ease, opacity .35s ease;
}

.detail-box.show {
  transform: translateX(0);
  opacity: 1;
}

.detail-box.hidden {
  display: none;
}

.detail-box .db-header {
  position: absolute;
  top: 8px;
  right: 8px;
  z-index: 2;
  display: flex;
  justify-content: flex-end;
  padding: 0;
  background: transparent;
  backdrop-filter: none;
}

.detail-box .db-close {
  border: 0;
  background: #111;
  width: 32px;
  height: 32px;
  border-radius: 9999px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, .18);
  cursor: pointer;
  font-size: 18px;
  line-height: 1;
  color: #fff;
}

.db-photo {
  width: 100%;
  height: 220px;
  object-fit: cover;
  display: block;
  margin: 0;
}

/*}*/
h3 .db-title {
  margin: 10px 0 6px;
  font-size: 16px;
  font-weight: 800;
  color: #333;
  line-height: 1.35;
}

.db-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 10px;
  font-size: 12px;
  color: #333;
  margin-bottom: 10px;
}

.db-chip {
  background: #f3f4f6;
  border: 1px solid #e5e7eb;
  border-radius: 999px;
  padding: 3px 11px;
  font-weight: 700;
  font-size: 11px;
}

.db-line {
  font-size: 13px;
  color: #333;
  line-height: 1.6;
  margin: 3px 0;
  word-break: break-word;
}

/* 下側の余白を少し詰めたグリッド配置 */
.db-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 14px;
  margin-bottom: 0;
}

.db-btn {
  cursor: pointer;
  padding: 10px 12px;
  border-radius: 5px;
  font-size: 13px;
  font-weight: 700;
  background: #f6dcaf;
  color: #674811;
  text-align: center;
  line-height: 1.5;
}

.db-btn.primary {
  background: #daf1fd;
  color: #014f5a;
  border: none;
}

.db-link {
  /*display: inline-block;*/
  margin-top: 6px;
  font-size: 14px;
  font-weight: 700;
  color: #1a73e8;
  text-decoration: none;
  display: inline-flex;
  align-items: center; /* ← これで上下中央に揃う */
  gap: 1px;
}

.db-link:hover {
  text-decoration: underline;
}

/* 検索範囲を再指定するボタンのラッパー */
.search-area-wrapper {
  position: absolute;
  top: 12px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 6;
}

/* 検索範囲を再指定するボタン */
.search-area-btn {
  display: none;
  background: #404040;
  border: 1px solid #dadce0;
  border-radius: 24px;
  padding: 10px 14px;
  box-shadow: 0 1px 4px rgba(0, 0, 0, .2);
  font-weight: 600;
  cursor: pointer;
  color: #fff;
  font-size: 13px;
  line-height: 1.5;
}

.search-area-btn.show {
  display: inline-block;
}

/* 詳細パネル本体のテキスト周りの余白調整 */
.detail-box .db-body {
  padding: 9px 16px 12px 16px;
}

/* --- ルート検索ボタン（リスト・詳細）のリンク下線をすべて消す --- */
a.route-btn,
a.route-btn:visited,
a.route-btn:hover,
a.route-btn:focus,
a.route-btn:active,
a.db-btn,
a.db-btn:visited,
a.db-btn:hover,
a.db-btn:focus,
a.db-btn:active {
  text-decoration: none;
}

/* 詳細パネル内の「ルート検索」ボタンのテキストのみ中央寄せ */
#detail-box a.db-btn.primary {
  text-align: center;
}

/* 詳細パネルの種別チップ色をリストと合わせる */
.db-chip.type-national {
  background: #cd5c5c;
  color: #fff;
  border: none;
}

.db-chip.type-private {
  background: #37a0cf;
  color: #fff;
  border: none;
}

.db-meta .db-meta-text {
  display: inline-block;
  font-weight: 700;
}

/* 詳細パネル内で種別チップとテキストを上下中央揃えにする */
.db-meta {
  align-items: center;
}

/* 詳細パネルのタイトルサイズと余白調整 */
h3.db-title {
  font-size: 16px;
  margin: 10px 0 5px;
  font-weight: 700;
  line-height: 1.3;
}

/* Googleアイコン（Material Symbols）の調整 */
.material-symbols-outlined {
  font-variation-settings:
    'FILL' 0,
    'wght' 400,
    'GRAD' 0,
    'opsz' 20;
}

.db-link .material-symbols-outlined {
  text-decoration: none !important;
  display: inline-block;
  line-height: 1; /* 若干のズレ防止 */
}

/* 現在地用 OverlayView の見た目 */
.user-location-overlay {
  position: absolute;
  transform: translate(-50%, -50%);
  pointer-events: none; /* 地図操作の邪魔をしない */
  z-index: 999999;
}

.user-location-pulse {
  position: relative;
  width: 80px;
  height: 80px;
}

.user-location-pulse::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: rgba(66, 133, 244, 0.75); /* #4285F4 */
  transform: translate(-50%, -50%);
  animation: user-location-pulse 1.6s ease-out infinite;
}

.user-location-pulse-inner {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #4285F4;
  box-shadow: 0 0 0 2px #fff;
  transform: translate(-50%, -50%);
}

/* パルスアニメーション */
@keyframes user-location-pulse {
  0% {
    transform: translate(-50%, -50%) scale(0.3);
    opacity: 0.9;
  }

  70% {
    transform: translate(-50%, -50%) scale(1);
    opacity: 0;
  }

  100% {
    transform: translate(-50%, -50%) scale(1.05);
    opacity: 0;
  }
}

/* ===================================== モバイル時：フィルター類を縦並び＆コンパクトな余白に調整 =============================================== */
@media (max-width: 768px) {
  body {
    padding: 2px;
    letter-spacing: 0.05em;
  }

  .filter-area {
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
    padding: 12px;
  }

  .filter-section {
    width: 100%;
  }

  .filter-title {
    font-size: 12px;
    margin-bottom: 6px;
    padding-bottom: 2px;
  }

  .filter-buttons {
    gap: 8px;
  }

  .filter-button {
    padding: 6px 10px;
    font-size: 13px;
    line-height: 1.2;
  }

  .filter-section.regions .filter-buttons {
    display: flex;
    flex-wrap: wrap;
  }

  .search-container-wrapper {
    width: 100%;
  }

  /*#searchInput {
    width: 100%;
    height: 42px;
    font-size: 16px; 
  }*/

  #suggestions {
    max-height: 200px;
  }
}

/* === 検索クリア（×）ボタン === */
.search-container-wrapper {
  position: relative;
}

#searchInput {
  padding-right: 48px; /* クリアボタン分の余白を右側に確保 */
}

.search-clear-btn {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  width: 32px;
  height: 32px;
  border: none;
  border-radius: 50%;
  background: #eee;
  color: #666;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  padding: 0;
}

.search-clear-btn:hover {
  background: #e0e0e0;
}

.search-clear-btn svg {
  width: 16px;
  height: 16px;
  display: block;
}

/* ==== モバイル時：フィルターを左寄せ＆検索と現在地ボタンを同じ行に配置 ==== */
@media (max-width: 768px) {
  /* 種別・地域ボタンを左寄せ＆折り返しで表示 */
  .filter-section .filter-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: flex-start;
  }

  /* 2行構成のグリッドレイアウト：
     1行目：種別＋地域（全幅で縦積み）
     2行目：検索（1fr）＋現在地ボタン（auto） */
  .filter-area {
    display: grid;
    grid-template-columns: 1fr auto;
    grid-template-areas:
      "type type"
      "regions regions"
      "search locbtn";
    gap: 12px;
    align-items: end;
    padding: 12px;
  }

  .filter-area > .filter-section:nth-of-type(1) {
    grid-area: type;
  }

  .filter-area > .filter-section.regions {
    grid-area: regions;
  }

  .filter-area > .filter-section:nth-of-type(3) {
    grid-area: search;
  }

  /* .filter-area 内の最後の div を「現在地ボタンの位置」として扱う */
  .filter-area > div:last-child {
    grid-area: locbtn;
    align-self: end;
  }

  /* 検索ボックスをグリッドセルいっぱいに広げる */
  #searchInput {
    width: 100%;
    height: 45px;
    font-size: 16px;
  }

  /* 現在地ボタンの高さを入力欄と揃える */
  .upload-btn {
    height: 36px;
    display: inline-flex;
    align-items: center;
    padding: 0 12px;
    white-space: nowrap;
  }

  .school-item {
    padding: 10px 14px 7px;
  }

  .school-distance {
    font-size: 14px;
  }

  .school-name {
    font-size: 15px;
    font-weight: 700;
    line-height: 1.3;
    margin-right: 2px;
  }

  .detail-box {
    position: absolute;
    top: 230px;
    right: 4px;
    width: 280px;
    height: auto;
    max-height: calc(100% - 5px);
    overflow-y: auto;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, .25);
    z-index: 6;
    transform: translateX(100%);
    opacity: 0;
    transition: transform .35s ease, opacity .35s ease;
  }

  .db-photo {
    width: 100%;
    height: 140px;
    object-fit: cover;
    display: block;
    margin: 0;
  }

  .sidebar {
    background: #efede8;
    padding: 7px 6px;
    overflow-y: auto;
    border-left: 1px solid #e0e0e0;
    display: flex;
    flex-direction: column;
  }

  /* -- wpのスマホヘッダー固定解除　-----*/
  .header-global {
    position: static !important;
    top: auto !important;
    margin-top: 140px;
  }

  .header-sp {
    /*margin-top: 145px;*/
  }

  .Nav {
    position: relative;*/
        /*margin-top: 100px;*/
  }

  .Nav-open {
    height: 140%;
  }

  .sp-menu-link-kansai{
    margin-bottom: 300px;

  }

  .container.breadcrumb {
    margin-top: 13px;
  }

  .map-container {
    width: 100%;
    padding-right: 0px;
    padding-left: 0px;
  }

  /* -- // wpのスマホヘッダー固定解除　-----*/
}
