/* ============================================================
   Church Calendar – style.css
   モノトーン基調 / 差し色最小限 / クラス名変更なし
   ============================================================ */

/* -----------------------------------------------
   共通変数
----------------------------------------------- */
:root {
  --cc-font:    -apple-system, BlinkMacSystemFont, "Hiragino Sans", "Noto Sans JP", sans-serif;
  --cc-text:    #1a1a1a;
  --cc-muted:   #666666;
  --cc-border:  #d0d0d0;
  --cc-bg:      #ffffff;
  --cc-bg-sub:  #f7f7f7;
  --cc-accent:  #1a1a1a;
  --cc-radius:  4px;
  --cc-transition: 0.2s ease;
}

/* -----------------------------------------------
   全行事一覧ラッパー
----------------------------------------------- */
.church-calendar-all {
  font-family: var(--cc-font);
  color: var(--cc-text);
  max-width: 760px;
  margin: 0 auto;
}

/* -----------------------------------------------
   タイトル
----------------------------------------------- */
.church-calendar__title {
  font-size: 1.2rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  margin-bottom: 1.5rem;
  color: var(--cc-text);
}

/* -----------------------------------------------
   テーブル
----------------------------------------------- */
.church-calendar__table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
  line-height: 1.7;
}

.church-calendar__table thead tr {
  border-bottom: 2px solid var(--cc-accent);
}

.church-calendar__table th {
  padding: 10px 14px;
  text-align: left;
  font-weight: 700;
  color: var(--cc-text);
  background: transparent;
  white-space: nowrap;
}

.church-calendar__table td {
  padding: 10px 14px;
  border-bottom: 1px solid var(--cc-border);
  color: var(--cc-text);
  vertical-align: middle;
}

.church-calendar__table tbody tr:last-child td {
  border-bottom: 1px solid var(--cc-border);
}

.church-calendar__table tbody tr:hover td {
  background: var(--cc-bg-sub);
  transition: background var(--cc-transition);
}

/* -----------------------------------------------
   ハイライト行（イースター）
----------------------------------------------- */
.church-calendar__row--highlight td {
  font-weight: 700;
}

/* -----------------------------------------------
   ボタン（共通）
----------------------------------------------- */
.church-calendar__btn {
  display: inline-block;
  padding: 5px 14px;
  font-size: 0.8rem;
  font-family: var(--cc-font);
  color: var(--cc-text);
  background: transparent;
  border: 1px solid var(--cc-border);
  border-radius: var(--cc-radius);
  text-decoration: none;
  cursor: pointer;
  transition: background var(--cc-transition), border-color var(--cc-transition);
  white-space: nowrap;
}

.church-calendar__btn:hover {
  background: var(--cc-bg-sub);
  border-color: var(--cc-accent);
}

/* -----------------------------------------------
   ボタン（プライマリ）
----------------------------------------------- */
.church-calendar__btn--primary {
  color: var(--cc-bg);
  background: var(--cc-accent);
  border-color: var(--cc-accent);
}

.church-calendar__btn--primary:hover {
  background: #333333;
  border-color: #333333;
}

/* -----------------------------------------------
   直近行事ラッパー
----------------------------------------------- */
.church-calendar-upcoming {
  font-family: var(--cc-font);
  color: var(--cc-text);
  max-width: 760px;
  margin: 0 auto;
}

/* -----------------------------------------------
   直近行事 各アイテム
----------------------------------------------- */
.church-calendar-upcoming__item {
  display: flex;
  align-items: center;
  gap: 1.2rem;
  padding: 1rem 0;
  border-bottom: 1px solid var(--cc-border);
}

.church-calendar-upcoming__item:last-of-type {
  border-bottom: none;
}

/* -----------------------------------------------
   直近行事 テキスト
----------------------------------------------- */
.church-calendar-upcoming__text {
  font-size: 0.95rem;
  line-height: 1.7;
  margin: 0;
  flex: 1;
  color: var(--cc-text);
}

/* -----------------------------------------------
   直近行事 フッター（全件ボタン）
----------------------------------------------- */
.church-calendar-upcoming__footer {
  margin-top: 1.4rem;
  text-align: right;
}

/* -----------------------------------------------
   ポップアップ オーバーレイ
----------------------------------------------- */
.church-calendar-popup {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 9999;
}

.church-calendar-popup[aria-hidden="false"] {
  display: block;
}

.church-calendar-popup__overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
}

/* -----------------------------------------------
   ポップアップ コンテンツ
----------------------------------------------- */
.church-calendar-popup__content {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: var(--cc-bg);
  border-radius: var(--cc-radius);
  width: min(90vw, 820px);
  max-height: 80vh;
  display: flex;
  flex-direction: column;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.18);
}

/* -----------------------------------------------
   ポップアップ 閉じるボタン
----------------------------------------------- */
.church-calendar-popup__close {
  position: absolute;
  top: 12px;
  right: 16px;
  background: transparent;
  border: none;
  font-size: 1.1rem;
  color: var(--cc-muted);
  cursor: pointer;
  line-height: 1;
  transition: color var(--cc-transition);
}

.church-calendar-popup__close:hover {
  color: var(--cc-text);
}

/* -----------------------------------------------
   ポップアップ スクロール領域
----------------------------------------------- */
.church-calendar-popup__inner {
  padding: 32px 28px 28px;
  overflow-y: auto;
}
