/* イベント関連ページの共通スタイル */

/* コンテナのレイアウト - 共通 */
.p-event-container {
  display: flex;
  flex-wrap: wrap;
  gap: 32px;
  margin-top: 40px;
}

.p-event-main {
  flex: 1;
  min-width: 300px;
}

.p-event-sidebar {
  width: 300px;
}

/* 見出しスタイル - 共通 */
.p-event__heading {
  font-size: 1.5rem;
  font-weight: bold;
  padding: 10px 0;
  margin-bottom: 16px;
  border-bottom: 2px solid #e60012;
}

.p-event-section__heading {
  font-size: 1.125rem;
  font-weight: bold;
  padding: 10px 0;
  margin-bottom: 16px;
  border-bottom: 1px solid #ccc;
}

/* セクションスタイル - 共通 */
.p-event-section {
  margin-bottom: 40px;
  border: 1px solid #e0e0e0;
  background-color: #fff;
  padding: 16px;
}

.p-event-section__heading {
  font-size: 1rem;
  font-weight: bold;
  background-color: #535353;
  color: #fff;
  padding: 10px;
  margin: 0;
}

.p-event-section__description {
  margin-bottom: 20px;
  line-height: 1.6;
  padding: 8px;
  /* background-color: #f8f8f8;
  border: 1px solid #e0e0e0;
  border-radius: 4px; */
}

/* フィルタースタイル */
.p-event-filter {
  margin-bottom: 20px;
  padding: 8px 0;
}

.p-event-filter__select {
  padding: 8px;
  margin-left: 8px;
  border: 1px solid #ccc;
  border-radius: 4px;
  /* min-width: 200px; */
  appearance: auto;
}

/* 検索結果情報 */
.p-event-result-info {
  margin-top: 16px;
  margin-bottom: 16px;
  font-size: 1rem;
  color: #666;
}

/* イベントテーブルスタイル */
.p-event-table-container {
  overflow-x: auto;
}

.p-event-table {
  width: 100%;
  border-collapse: collapse;
  border: 1px solid #ddd;
}

.p-event-table__header {
  background-color: #f4f7fa;
  font-weight: bold;
  font-size: 1rem;
  padding: 16px;
  border: 1px solid #9ea6b2;
  text-align: center;
}

.p-event-table__header--name {
  width: 30%;
}

.p-event-table__header--date {
  width: 40%;
}

.p-event-table__header--prefecture {
  width: 10%;
}

.p-event-table__header--store {
  width: 20%;
}

.p-event-table__cell {
  padding: 12px 8px;
  border: 1px solid #9ea6b2;
  text-align: center;
  /* font-size: 1rem; */
}

.p-event-table__cell a {
  /* color: #0066cc; */
  /* text-decoration: none; */
  display: inline-block;
  padding: 2px 0;
}

/* .p-event-table__cell a:hover {
  text-decoration: underline;
} */

.p-event-table tr:nth-child(even) {
  background-color: #fff;
}

.p-event-mobile-container {
  display: none;
}


.p-event-error-message {
  padding: 2rem;
  text-align: center;
  background-color: #f8f9fa;
  border: 1px solid #dee2e6;
  border-radius: 5px;
  margin: 2rem 0;
  color: #721c24;
  font-size: 1rem;
}

@media (max-width: 768px) {
  /* 都道府県選択ボックスの上部に余白 */
  .c-selectlink {
    margin-top: 24px;
  }

  .p-event-table-container {
    display: none;
  }

  .p-event-mobile-count {
    text-align: center;
    font-weight: bold;
    margin: 16px;
  }

  .p-event-mobile-container {
    display: block;
  }

  .p-event-mobile-item {
    margin-bottom: 24px;
    padding-bottom: 16px;
  }

  .p-event-mobile-loading {
    text-align: center;
    margin-top: 24px;
  }

  .p-event-mobile-date {
    background-color: #f4f7fa;
    font-weight: bold;
    padding: 8px;
  }

  .p-event-mobile-name {
    padding-top: 8px;
    font-weight: 300;
  }

  .p-event-mobile-prefecture {
    padding-top: 8px;
    font-weight: 300;

  }

  .p-event-mobile-store {
    padding-top: 8px;
    padding-left: 16px;
  }
}

/* 店舗検索リンク */
.p-event-search-link {
  border: 1px solid #e0e0e0;
  background-color: #fff;
  margin-bottom: 32px;
}

.p-event-search-link__content {
  padding: 16px;
  text-align: center;
}

.p-event-search-link__content p {
  margin-bottom: 16px;
  font-size: 0.875rem;
  line-height: 1.6;
}

/* イベント詳細ページのスタイル */
.p-event-detail__title {
  background-color: #666;
  color: #fff;
  padding: 8px;
  margin-bottom: 24px;
}

.p-event-detail__title h2 {
  font-size: 1.25rem;
  font-weight: bold;
  margin: 0;
}

.p-event-detail__info {
  margin-bottom: 32px;
}

.p-event-detail__table {
  width: 100%;
  border-collapse: collapse;
  border: 1px solid #9ea6b2;
}

.p-event-detail__header {
  background-color: #f4f7fa;
  font-weight: bold;
  padding: 16px;
  border: 1px solid #9ea6b2;
  width: 10%;
  text-align: left;
  vertical-align: top;
}

.p-event-detail__data {
  padding: 16px;
  border: 1px solid #9ea6b2;
  width: 30%;
}

.p-event-detail__data a {
  text-decoration: underline;
}

.p-event-detail__data a:hover {
  text-decoration: none;
}

.p-event-detail__content {
  margin-bottom: 32px;
}

.p-event-detail__content-title {
  font-size: 1.25rem;
  font-weight: bold;
  margin-bottom: 16px;
  padding-bottom: 8px;
  border-bottom: 1px solid #9ea6b2;
}

.p-event-detail__content-text p {
  margin-bottom: 8px;
  line-height: 1.5;
}

.p-event-detail__button-container {
  text-align: center;
  margin-top: 32px;
}

/* レスポンシブデザイン */
@media (max-width: 768px) {
  .p-event-detail__table {
    border: none;
  }

  .p-event-detail__header,
  .p-event-detail__data {
    display: block;
    width: 100%;
    border: 1px solid #9ea6b2;
    border-top: none; /* 基本的に上のボーダーは非表示 */
  }

  /* 各行の最初のヘッダーのみ上のボーダーを表示 */
  .p-event-detail__table tr .p-event-detail__header:first-child {
    border-top: 1px solid #9ea6b2;
  }

  /* ヘッダーの直後のデータは上のボーダーを非表示 */
  .p-event-detail__header + .p-event-detail__data {
    border-top: none;
  }

  .p-event-detail__table tr {
    display: block;
    margin-bottom: 16px;
  }

  /* 最後の行のマージンを削除 */
  .p-event-detail__table tr:last-child {
    margin-bottom: 0;
  }
}

.p-event-search-link__button {
  margin-top: 16px;
}

/* ボタンスタイル - 共通 */
.c-button--event {
  display: inline-block;
  padding: 10px 32px;
  background-color: #e60012;
  color: #fff;
  text-decoration: none;
  border-radius: 5px;
  font-weight: bold;
  transition: background-color 0.3s;
}

.c-button--event:hover {
  background-color: #c00;
}

/* 店舗情報セクションとの間隔 */
.c-section+.c-localnav,
main>.c-section+.c-overlay {
  margin-top: 64px;
}

/* レスポンシブデザイン - 共通 */
@media (max-width: 768px) {
  .p-event-container {
    flex-direction: column;
  }

  .p-event-sidebar {
    width: 100%;
  }

  .p-event-table__header,
  .p-event-table__cell {
    padding: 8px 4px;
    font-size: 0.75rem;
  }
}