/* Month Header */
.month-header {
    padding-left: 14px;
    padding-top: 8px;
    margin-bottom: 0px !important;
    font-size: 16px; /* Slightly larger than event-date-header */
    font-weight: bold;
    color: #333; /* Neutral dark gray for text */
}

.event-date-header {
    position: sticky;
    top: 102px;
    z-index: 10;
    display: block; /* Makes the header occupy its own line */
    font-size: 16px; /* Slightly larger than normal text */
    font-weight: 700; /* Makes the date bold */
    text-align: left; /* Aligns text to the left */
    padding-top: 8px;
    padding-bottom: 6px; /* Space between text and underline */
    padding-left: 12px;
    padding-right: 12px;
    margin-bottom: 0px;
    background-color: #e0f2ff; /* グレーをやや明るく */
    border-left: 4px solid var(--primary-color);
    color: #333; /* 文字色もやや濃く */
    border-radius: 4px; /* 丸みを少しつけて柔らかく */
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.month-header {
    font-size: 18px;
    font-weight: 700;
}

@media (max-width: 959px) {
    .month-header {
        display: none;
    }
    .event-date-header {
        top: 70px;
    }
}

.event-border {
    display: block; /* Makes it a block-level element so it takes up the full width */
    border-top: 1px solid #ccc; /* Adjust the thickness and color as needed */
    margin: 0 !important; /* Add margin to create space above and below the border */
}

/* Search Result List View */
.custom-search-list {
    padding-top: 10px;
    padding-bottom: 10px; /* ボーダーの上に余白を追加 */
    padding-left: 4px;
    padding-right: 4px;
    background-color: white;
    font-size: 14px; /* ここでフォントサイズを指定 */ 
    margin-bottom: 0px !important;
    border-bottom: 1px solid #ddd; /* 下に薄いボーダーを追加 */
}

.search-result-wrapper {
    margin-bottom: 0px !important;
}

.search-result-wrapper .custom-search-list:not(:has(+ .custom-search-list)) {
    border-bottom: none;
}


.custom-search-list h4 {  
    margin-bottom: 0.5em;
}

/* カテゴリーチップのスタイル */
.custom-search-list-chip {
    display: inline-block;
    background-color: #fff !important; /* デフォルトの背景色を白に設定 */
    color: var(--primary-color) !important;
    padding: 2px 12px !important; /* パディングを調整 */
    border-radius: 999px !important; /* 角を少し丸くする設定 */
    text-decoration: none !important;
    transition: background-color 0.3s, color 0.3s !important; /* 色の変更にもトランジションを適用 */
    font-size: 14px !important; /* フォントサイズを小さく調整 */
    border: 1px solid #d2d2d2 !important; /* ボーダーの色を#d2d2d2に設定 */
    box-sizing: border-box !important; /* ボーダーを含むボックスサイズを確保 */
    line-height: 1.5; /* テキストのラインハイトを設定 */
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

.custom-search-list-chip:hover {
    background-color: var(--primary-color) !important; /* ホバー時の背景色を設定 */
    color: #ffffff !important; /* ホバー時のテキスト色を白に設定 */
    border: 1px solid var(--primary-color) !important; /* ホバー時のボーダーの色を背景色と一致させる */
    box-sizing: border-box !important; /* ボーダーを含むボックスサイズを確保 */
    line-height: 1.5; /* テキストのラインハイトを設定 */
    cursor: pointer; /* ポインターを表示 */
}
.custom-search-list-chip-inlist {
    display: inline-block;
    background-color: #fff !important; /* デフォルトの背景色を白に設定 */
    color: var(--primary-color) !important;
    padding: 2px 12px !important; /* パディングを調整 */
    border-radius: 999px !important; /* 角を少し丸くする設定 */
    text-decoration: none !important;
    transition: background-color 0.3s, color 0.3s !important; /* 色の変更にもトランジションを適用 */
    font-size: 12px !important; /* フォントサイズを小さく調整 */
    border: 1px solid #d2d2d2 !important; /* ボーダーの色を#d2d2d2に設定 */
    box-sizing: border-box !important; /* ボーダーを含むボックスサイズを確保 */
    line-height: 1.5; /* テキストのラインハイトを設定 */
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

.custom-search-list-chip-inlist:hover {
    background-color: var(--primary-color) !important; /* ホバー時の背景色を設定 */
    color: #ffffff !important; /* ホバー時のテキスト色を白に設定 */
    border: 1px solid var(--primary-color) !important; /* ホバー時のボーダーの色を背景色と一致させる */
    box-sizing: border-box !important; /* ボーダーを含むボックスサイズを確保 */
    line-height: 1.5; /* テキストのラインハイトを設定 */
    cursor: pointer; /* ポインターを表示 */
}

.selected-custom-search-list-chip {
    display: inline-block;
    background-color: var(--primary-color) !important; /* 背景色をprimaryに */
    color: #ffffff !important; /* テキストを白に */
    padding: 2px 12px !important;
    margin-top: 0 !important;
    margin-right: 4px !important;
    margin-bottom: 10px !important;
    border-radius: 999px !important;
    text-decoration: none !important;
    transition: background-color 0.3s, color 0.3s !important;
    font-size: 14px !important;
    border: 1px solid var(--primary-color) !important; /* ボーダーもprimaryに */
    box-sizing: border-box !important;
    line-height: 1.5;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

.selected-custom-search-list-chip:hover {
    background-color: #ffffff !important; /* ホバー時に元の背景色（白）に戻す */
    color: var(--primary-color) !important; /* テキスト色をprimaryに */
    border: 1px solid #d2d2d2 !important; /* ボーダーも元に戻す */
    cursor: pointer;
}

/* カテゴリーチップのスタイル */
.custom-search-list-chip-defq {
    display: inline-block;
    background-color: #fff !important; /* デフォルトの背景色を白に設定 */
    color: #707070 !important;
    padding: 2px 12px !important; /* パディングを調整 */
    margin-right: 4px !important; /* マージンをゼロに設定 */
    border-radius: 999px !important; /* 角を少し丸くする設定 */
    text-decoration: none !important;
    transition: background-color 0.3s, color 0.3s !important; /* 色の変更にもトランジションを適用 */
    font-size: 14px !important; /* フォントサイズを小さく調整 */
    border: 1px solid #d2d2d2 !important; /* ボーダーの色を#d2d2d2に設定 */
    box-sizing: border-box !important; /* ボーダーを含むボックスサイズを確保 */
    line-height: 1.5; /* テキストのラインハイトを設定 */
    margin-top:0 !important;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

.custom-search-list .detail {
    display: flex;
    align-items: flex-start; /* 🔥 上詰めで描画 */
    justify-content: space-between; /* 🔥 左の要素を左寄せ・画像を右端へ */
    padding-bottom: 6px;
    line-height: 1.4; /* 🔥 行間を少し広げる（1.3 → 1.4） */
    width: 100%; /* 幅を固定 */
    flex-grow: 1;                    /* 左列は残りの幅を取る */
}

.custom-search-list .info-wrapper {
    display: flex;
    flex-direction: column; /* 縦並びに */
    flex-grow: 1; /* 🔥 左側の要素が余ったスペースを使う */
    gap: 8px; /* 🔥 各要素の間隔を広げる（デフォルト0px → 6px） */
}

.custom-search-list .venue-img {
    flex-shrink: 0; /* 画像が縮まないように */
    width: 90px;  /* 画像の枠を固定 */
    height: 90px; /* 画像の枠を固定 */
    overflow: hidden; /* はみ出した部分を隠す */
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px; /* 角を丸める（オプション） */
}

.custom-search-list .venue-img img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover; /* 画像を中央基準でクロップ */
    transition: opacity 0.3s ease; /* 🔥 ホバー時のエフェクト */
}

.custom-search-list .venue-img a {
    display: block; /* 🔥 クリック範囲を広げる */
    width: 100%;
    height: 100%;
}

.custom-search-list .venue-img a:hover img {
    opacity: 0.8; /* 🔥 クリック感を出すために薄くする */
}

.custom-search-list .event-title-container {
    margin-bottom: 6px;
}

/* デフォルト（PC）では表示 */
.mobile-only {
    display: inline; /* デスクトップでは表示 */
}

/* モバイル時（画面幅が768px以下）では非表示 */
@media screen and (max-width: 768px) {
    .mobile-only {
        display: none;
    }
}

.detail-venue-img {
    margin-bottom: 8px;
    border-radius: 8px; /* 🔥 角を8px丸くする */
    overflow: hidden; /* 🔥 はみ出しを防ぐ */
    display: inline-block; /* 🔥 親要素としての影響を調整 */
}

.detail-venue-img img {
    border-radius: 8px; /* 🔥 画像自体にも適用 */
    display: block; /* 🔥 画像の余白の影響を防ぐ */
    width: 100%; /* 🔥 親要素にフィット */
    height: auto; /* 🔥 アスペクト比を維持 */
}

.modal {
    position: fixed;
    z-index: 99999; /* 確実に header より前 */
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0,0,0,0.4);
}

.modal-content {
    position: relative;
    top: 122px; /* デフォルトはデスクトップ用 */
    margin: 0 auto;
    background-color: #fff;
    padding: 20px;
    width: 90%;
    max-width: 600px;
    border-radius: 8px;
    animation: slideDownFade 0.3s ease-out;

     /* スクロール可能にする設定 */
     max-height: calc(100vh - 140px); /* ヘッダー＋余白分を引いた高さ */
     overflow-y: auto;
     scroll-behavior: smooth;
     -webkit-overflow-scrolling: touch; /* iOS用慣性スクロール */

}

.modal-close {
    color: #aaa;
    position: absolute;
    right: 15px;
    top: 2px;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
}

.modal-close:hover {
    color: #000;
}

/* スクロール禁止用のクラス */
.body-no-scroll {
    overflow: hidden;
}

@media screen and (max-width: 768px) {
    .modal-content {
        margin: 20vh auto;
        top: 90px; /* モバイル用ヘッダー高さに合わせる */
        max-height: calc(100vh - 110px); /* モバイル用に少し小さめ */
    }
}

@keyframes slideDownFade {
    0% {
        opacity: 0;
        transform: translateY(-20px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

.search-icon-button {
    width: 30px;
    height: 30px; /* select と合わせる */
    padding: 0; /* 高さ調整の邪魔を防ぐ */
    background-color: #fff;
    color: #2b7cff;
    border: 1px solid #ced4da;
    border-radius: 5px;
    font-size: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background-color 0.2s, border-color 0.2s;
    flex-shrink: 0;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05); /* selectと統一感出すなら追加 */
}

.search-icon-button:hover {
    background-color: #f5f8ff;
    border-color: #2b7cff;
}

.search-info {
    display: flex;
    flex-direction: column;
    gap: 6px;
    align-items: flex-start; /* ← ここがポイント */
    flex-grow: 1;
}

.filter-chip-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 6px; /* チップ同士の間隔 */
  }
  
.event-type-filter-container {
    margin-bottom: 10px; /* セクションごとの余白 */
  }

.event-pagenation {
    margin-top: 14px !important;
}
@media (min-width: 768px) {
    .event-pagenation {
        justify-content: center;
        display: flex;
        flex-wrap: wrap;
        gap: 8px;
        flex-direction: row;
      }
    
      .event-pagenation .page-numbers,
      .event-pagenation .page-numbers.prev,
      .event-pagenation .page-numbers.next {
        margin: 0 4px;
        padding: 6px 10px;
        font-size: 14px;
        border-radius: 20px;
        min-width: 32px; /* ← ボタンの横幅を揃える */
        text-align: center;
      }
  }
  
#prefecture-list {
    margin-top: 20px;
    margin-bottom: 10px !important;
    padding-left: 0;
}

#prefecture-list .prefectures {
    display: flex;
    align-items: center; /* ← 高さを合わせる */
    margin-bottom: 8px;
    list-style: none;
}
  

#prefecture-list .region {
    display: flex;
    align-items: center; /* ← 縦の中央揃え */
    justify-content: flex-end; /* ← テキスト右寄せ */
    width: 120px;
    font-weight: normal;
    flex-shrink: 0;
    margin-right: 10px;
}

#prefecture-list .prefectures ul {
    display: flex;
    flex-wrap: wrap;
    gap: 0px;
    margin: 0;
    padding: 0;
    list-style: none;
}

#prefecture-list .prefectures ul li {
    display: inline-block; /* ← inlineだと::after位置ズレやすい */
    margin: 0;
    padding: 0;
}

#prefecture-list .prefectures ul li:not(:last-child)::after {
    content: "|";
    display: inline-block;
    margin-left: 3px !important;
    margin-right: 6px !important;
    color: #ddd;
    font-size: 12px;
    line-height: 1;
    vertical-align: baseline; /* ← 日本語と高さを揃えるにはこれが最も安定 */
}
  
  
@media (max-width: 600px) {
    #prefecture-list {
        margin-bottom: 20px !important;
    }
    #prefecture-list .prefectures {
      display: flex;
      flex-direction: row;
      align-items: flex-start;
    }
  
    #prefecture-list .region {
      display: flex;
      align-items: flex-start;
      justify-content: flex-end;
      width: 90px;
      margin-right: 8px;
      font-weight: normal;
      font-size: 14px;
      line-height: 1.2;
      padding: 0;
      margin-top: 0;
      height: auto;
    }
  
    #prefecture-list .prefectures ul {
      display: flex;
      flex-wrap: wrap;
      gap: 6px;
      margin: 0;
      padding: 0;
      list-style: none;
      line-height: 1.2; /* ← 全体で揃える */
    }
  
    #prefecture-list .prefectures ul li {
        display: flex; /* ← これがポイント！ */
        align-items: center; /* ← 縦揃えを正確に */
        margin: 0 !important;
        padding: 0;
        line-height: 1.2;
    }
  
    #prefecture-list .prefectures ul li a {
      display: inline-block;
      font-size: 14px;
      line-height: 1.2;
      padding: 0;
      margin: 0 !important;
      vertical-align: middle;  /* ← 最も自然に揃う */
      white-space: nowrap;
    }
  
    #prefecture-list .prefectures ul li:not(:last-child)::after {
      content: "|";
      display: inline-block;
      margin-left: 6px !important;
      margin-right: 0px !important;
      color: #dddddd;
      font-size: 12px;
      line-height: 1.2;
      vertical-align: middle;  /* ← aタグと合わせる */
      white-space: nowrap;
      align-self: center; /* ← Flexに合わせて縦中央 */
    }
  }
