/* カレンダーコンテナ */
#calendar {
  background: #ffffff;
  padding: 1rem;
  border-radius: 8px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

/* カレンダー上部の固定案内 */
.calendar-notice {
  margin: 0 0 4px;
  font-size: 0.9rem;
  color: #334155;
  line-height: 1.4;
  margin-top: -0.5rem;
}
.calendar-notice p {
  margin: 0;
}

/* カレンダー内のイベント要素 */
.fc-event {
  cursor: pointer;
}

/* モーダル内のGoogleマップリンクボタン */
.btn-map {
  background-color: #059669;
  color: #ffffff;
  border: none;
  padding: 0.4rem 0.8rem;
  border-radius: 4px;
  text-decoration: none;
  font-weight: bold;
  display: inline-block;
  margin-bottom: 0.8rem;
  font-size: 0.85rem;
}
.btn-map:hover {
  background-color: #047857;
}

/* 日曜日のヘッダー（「日」の文字）を赤色に */
.fc-day-sun .fc-col-header-cell-cushion {
  color: #dc2626 !important; /* 赤色 */
}

/* 日曜日の日付数字（1日, 2日...）を赤色に */
.fc-day-sun .fc-daygrid-day-number {
  color: #dc2626 !important; /* 赤色 */
}

/* （おまけ）日曜日の背景色をほんのり赤くしたい場合 */
.fc-day-sun {
  background-color: #fef2f2 !important; /* 薄い赤色背景 */
}

/* （おまけ）土曜日のヘッダーと日付を青色にしたい場合 */
.fc-day-sat .fc-col-header-cell-cushion,
.fc-day-sat .fc-daygrid-day-number {
  color: #2563eb !important; /* 青色 */
}

/* スマホ表示時（768px未満）のイベント文字・レイアウト調整 */
@media (max-width: 767px) {
  /* カレンダーの余白を減らして描画領域を広げる */
  #calendar {
    padding: 8px;
  }

  /* --- 1. ヘッダーとボタンの崩れ防止 --- */
  .fc .fc-toolbar {
    gap: 4px !important;
    margin-bottom: 8px !important;
  }

  /* タイトル（年月）の文字サイズ調整 */
  .fc .fc-toolbar-title {
    font-size: 1.1rem !important;
  }

  /* ボタン共通のコンパクト化（文字の縦並びを禁止） */
  .fc .fc-button {
    padding: 4px 8px !important;
    font-size: 0.75rem !important;
    white-space: nowrap !important; /* 「リスト」等の文字折り返しを禁止 */
    height: auto !important;
  }

  /* ボタングループのすき間を詰める */
  .fc-button-group > .fc-button {
    padding: 4px 6px !important;
  }

  /* --- 2. カレンダー内の予定文字調整 --- */
  .fc-daygrid-event {
    font-size: 0.75rem !important;
    line-height: 1.2 !important;
    padding: 1px 2px !important;
  }

  /* 2行折り返しを防ぎ、溢れた文字を「...」にする */
  .fc-event-title, 
  .fc-event-time {
    white-space: nowrap !important;     /* 自動折り返しを禁止 */
    overflow: hidden !important;        /* 枠からはみ出た部分を隠す */
    text-overflow: ellipsis !important; /* はみ出た部分を「…」表示にする */
    display: block !important;          /* ellipsisを効かせるための指定 */
  }

  /* 日付セルの縦幅が伸びすぎて月末が画面外に切れるのを防ぐ */
  .fc .fc-daygrid-body-unbalanced .fc-daygrid-day-events {
    min-height: 1.5em !important;
  }
}

.detail-meta-text {
  display: block;
  margin-bottom: 6px;
  font-size: 0.9rem;
}

/*
.map-button-container {
  margin: 8px 0;
  display: block;
}
*/

/* 予定登録・編集モーダル：お知らせ同時投稿チェックボックス */
.sync-announcement-group {
  margin-top: 1rem;
  padding-top: 0.75rem;
  border-top: 1px dashed #cbd5e1;
}

.sync-announcement-label {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  font-weight: bold;
  color: #334155;
}

.sync-announcement-checkbox {
  width: 18px;
  height: 18px;
  accent-color: #2563eb;
}

/* モーダル：日付＋曜日 */
.date-with-weekday {
  display: flex;
  align-items: center;
  gap: 8px;
}
.date-with-weekday .form-control {
  flex: 1;
}
.date-weekday {
  font-weight: bold;
  white-space: nowrap;
  min-width: 2.5em;
}
.date-weekday .sun { color: #dc2626; }
.date-weekday .sat { color: #2563eb; }

/* 予定詳細：カレンダー連携ボタン */
.calendar-link-container {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 8px 0 12px;
}

.btn-gcal {
  background-color: #2563eb;
  color: #ffffff;
  padding: 0.4rem 0.8rem;
  border-radius: 4px;
  text-decoration: none;
  font-weight: bold;
  font-size: 0.85rem;
}
.btn-gcal:hover { background-color: #1d4ed8; }

.btn-ics {
  background-color: #f1f5f9;
  color: #475569;
  border: 1px solid #cbd5e1;
  padding: 0.4rem 0.8rem;
  border-radius: 4px;
  font-weight: bold;
  font-size: 0.85rem;
  cursor: pointer;
}
.btn-ics:hover { background-color: #e2e8f0; }

/* モーダル：見出しと入力欄を1行に並べる */
.form-group.inline {
  display: flex;
  align-items: center;
  gap: 8px;
}
.form-group.inline > label {
  flex: 0 0 4.5em;   /* 見出し幅を固定して入力欄の左端をそろえる */
  margin-bottom: 0;
}
.form-group.inline > .form-control,
.form-group.inline > .date-with-weekday,
.form-group.inline > .time-range {
  flex: 1;
  min-width: 0;
}

/* 場所行の右端に置く「地図」ボタン */
.form-group.inline > .btn-map {
  flex: 0 0 auto;
  margin-bottom: 0;
  padding: 0.5rem 0.7rem; /* 入力欄と高さをそろえる */
  white-space: nowrap;
}

/* 開始〜終了を1行にまとめる */
.time-range {
  display: flex;
  align-items: center;
  gap: 6px;
}
.time-range .form-control {
  flex: 1;
  min-width: 0;
  padding: 0.5rem 0.3rem; /* スマホで2つ並べても収まるように */
}

