/* =========================================
   黒門カルチャーファクトリー SCHEDULE カレンダー
   FullCalendar 5.6.0 ダークテーマ + 予約UI
   （モバイルファースト: デフォルト=スマホ、min-width:768pxでPC拡張）
   ========================================= */

#calendar {
  max-width: 1000px;
  margin: 0 auto;
  padding: 0 12px 24px;
  color: #eaeaea;
}

/* --- ツールバー --- */
.schedule .fc .fc-toolbar.fc-header-toolbar {
  margin-bottom: 1.2em;
  flex-wrap: wrap;
  gap: .6em;
}

/* スマホではタイトル（〇年〇月）を1行目に全幅で */
.schedule .fc .fc-toolbar-chunk:nth-child(2) {
  order: -1;
  width: 100%;
  text-align: center;
}

.schedule .fc .fc-toolbar-chunk:nth-child(1),
.schedule .fc .fc-toolbar-chunk:nth-child(3) {
  flex: 1 1 auto;
}

.schedule .fc .fc-toolbar-chunk:nth-child(3) {
  text-align: right;
}

.schedule .fc .fc-toolbar-title {
  color: #fff;
  font-size: 1.25em;
}

.schedule .fc .fc-button {
  background: #2b2b2b;
  border: 1px solid rgba(255, 255, 255, .35);
  color: #eaeaea;
  box-shadow: none;
  padding: .45em .7em;
  font-size: .85em;
  min-height: 40px;
}

.schedule .fc .fc-button:hover {
  background: #3a3a3a;
  color: #fff;
}

.schedule .fc .fc-button:focus,
.schedule .fc .fc-button:focus-visible {
  box-shadow: 0 0 0 2px rgba(222, 156, 8, .6);
  outline: none;
}

.schedule .fc .fc-button:disabled {
  background: #2b2b2b;
  color: #777;
  border-color: rgba(255, 255, 255, .2);
}

/* 選択中の表示（月表示 / 週表示）を金色ではっきり示す */
.schedule .fc .fc-button-primary:not(:disabled).fc-button-active,
.schedule .fc .fc-button-primary:not(:disabled):active {
  background: #de9c08;
  border-color: #de9c08;
  color: #1c1c1c;
  font-weight: 700;
}

/* --- 枠線・日付セル --- */
.schedule .fc .fc-scrollgrid-section-sticky > * {
  background: #1c1c1c;
}

.schedule .fc-theme-standard td,
.schedule .fc-theme-standard th,
.schedule .fc-theme-standard .fc-scrollgrid {
  border-color: rgba(255, 255, 255, .16);
}

.schedule .fc .fc-col-header-cell-cushion {
  color: #bdbdbd;
  text-decoration: none;
  padding: 6px 4px;
}

.schedule .fc .fc-daygrid-day-number {
  color: #eaeaea;
  text-decoration: none;
  padding: 4px 6px;
}

/* 日曜は赤・土曜は青（日本式） */
.schedule .fc .fc-day-sun .fc-daygrid-day-number,
.schedule .fc .fc-col-header-cell.fc-day-sun .fc-col-header-cell-cushion {
  color: #e88080;
}

.schedule .fc .fc-day-sat .fc-daygrid-day-number,
.schedule .fc .fc-col-header-cell.fc-day-sat .fc-col-header-cell-cushion {
  color: #86b7f5;
}

/* 今日 */
.schedule .fc .fc-day-today {
  background: rgba(222, 156, 8, .1);
}

/* 過去の日付は薄く */
.schedule .fc .fc-day-past .fc-daygrid-day-number {
  opacity: .45;
}

/* 前後の月の日付 */
.schedule .fc .fc-day-other .fc-daygrid-day-top {
  opacity: .35;
}

/* 日付セルはタップできることを示す */
.schedule .fc .fc-daygrid-day-frame {
  cursor: pointer;
  min-height: 4.5em;
}

/* --- 予約イベント（月表示） --- */
.schedule .fc .fc-daygrid-event {
  border-radius: 4px;
  border: none;
  margin: 1px 2px;
}

.schedule .kcalEvent {
  font-size: 9px;
  line-height: 1.4;
  padding: 1px 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-feature-settings: "tnum";
}

.schedule .fc .fc-daygrid-more-link {
  color: #de9c08;
  font-size: 11px;
}

/* --- 週表示（時間別） --- */
/* 曜日ヘッダーを「曜日 / 月/日」の縦2段にして重なりを防ぐ */
.schedule .fc .fc-timegrid-axis-cushion,
.schedule .fc .fc-timeGridWeek-view .fc-col-header-cell-cushion {
  display: block;
  width: 100%;
  padding: 4px 0;
  text-align: center;
  line-height: 1.25;
}

.schedule .kcalDow {
  display: block;
  font-size: 11px;
}

.schedule .kcalMd {
  display: block;
  font-size: 13px;
  font-weight: 700;
  font-feature-settings: "tnum";
}

.schedule .fc .fc-timegrid-slot {
  height: 2.4em;
}

.schedule .fc .fc-timegrid-slot-label-cushion,
.schedule .fc .fc-timegrid-axis-cushion {
  color: #a8a8a8;
  font-size: .85em;
}

.schedule .fc .fc-timegrid-now-indicator-line {
  border-color: #de9c08;
}

.schedule .fc .fc-timegrid-now-indicator-arrow {
  border-color: #de9c08;
}

.schedule .fc .fc-timegrid-event {
  border: none;
  border-radius: 4px;
}

.schedule .kcalEventTG {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 2px 3px;
  font-size: 9px;
  line-height: 1.35;
  overflow: hidden;
}

.schedule .kcalEventTG__time {
  font-feature-settings: "tnum";
}

.schedule .kcalEventTG__label {
  opacity: .85;
}

/* --- カレンダー上の案内・凡例 --- */
.calendarGuide {
  max-width: 1000px;
  margin: 0 auto 1em;
  padding: 0 16px;
  text-align: center;
  color: #cfcfcf;
  font-size: .9em;
}

.calendarGuide__legend {
  display: inline-flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: .5em 1.5em;
  list-style: none;
  margin: 0 0 .5em;
  padding: 0;
}

.calendarGuide__legend li {
  display: inline-flex;
  align-items: center;
}

.legendBadge {
  display: inline-block;
  width: 14px;
  height: 14px;
  border-radius: 3px;
  margin-right: .45em;
}

.legendBadge--booked {
  background: #b5433c;
}

.legendBadge--free {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, .45);
}

/* --- LINE導線 --- */
.calendarCta {
  max-width: 1000px;
  margin: 0 auto;
  padding: 4px 16px 56px;
  text-align: center;
}

.calendarCta__line,
.calendarCta__line:link,
.calendarCta__line:visited {
  display: inline-block;
  background: #06C755;
  color: #fff;
  font-weight: 700;
  font-size: 1.05em;
  padding: 14px 36px;
  border-radius: 999px;
  text-decoration: none;
  box-shadow: 0 4px 14px rgba(6, 199, 85, .3);
}

.calendarCta__line:hover {
  opacity: .85;
  color: #fff;
}

.calendarCta__note {
  margin-top: .9em;
  color: #bdbdbd;
  font-size: .85em;
  line-height: 1.7;
}

/* --- 日別ポップアップ（スマホ=下からのシート表示） --- */
.kcalModal {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: flex-end;
  justify-content: center;
}

.kcalModal[hidden] {
  display: none;
}

.kcalModal__overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, .65);
}

.kcalModal__panel {
  position: relative;
  background: #242424;
  color: #eaeaea;
  border-top: 1px solid rgba(222, 156, 8, .5);
  border-radius: 16px 16px 0 0;
  width: 100%;
  max-height: 78vh;
  overflow-y: auto;
  padding: 24px 20px calc(20px + env(safe-area-inset-bottom));
  box-shadow: 0 10px 40px rgba(0, 0, 0, .6);
}

.kcalModal__close {
  position: absolute;
  top: 6px;
  right: 6px;
  background: none;
  border: none;
  color: #aaa;
  font-size: 26px;
  line-height: 1;
  padding: 8px 10px;
  cursor: pointer;
}

.kcalModal__close:hover {
  color: #fff;
}

.kcalModal__title {
  margin: 0 0 4px;
  font-size: 1.15em;
  color: #fff;
}

.kcalModal__lead {
  margin: 0 0 14px;
  font-size: .82em;
  color: #bdbdbd;
}

.kcalModal__head {
  margin: 14px 0 6px;
  font-size: .9em;
  font-weight: 700;
  color: #de9c08;
}

.kcalModal__list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.kcalModal__list li {
  display: flex;
  align-items: center;
  gap: .5em;
  padding: 7px 10px;
  margin-bottom: 6px;
  border-radius: 6px;
  background: rgba(255, 255, 255, .05);
  font-size: .95em;
  font-feature-settings: "tnum";
}

.kcalModal__list--free li::before {
  content: "◎";
  color: #4fc97e;
}

.kcalModal__list--booked li::before {
  content: "●";
  color: #d0655e;
}

.kcalModal__empty {
  margin: 8px 0;
  padding: 12px;
  border-radius: 6px;
  background: rgba(255, 255, 255, .05);
  font-size: .95em;
  line-height: 1.7;
}

.kcalModal__empty--free {
  border-left: 3px solid #4fc97e;
}

.kcalModal__small {
  margin: 4px 0 0;
  font-size: .78em;
  color: #9c9c9c;
}

.kcalModal__line,
.kcalModal__line:link,
.kcalModal__line:visited {
  display: block;
  margin-top: 16px;
  padding: 13px 16px;
  border-radius: 999px;
  background: #06C755;
  color: #fff;
  font-weight: 700;
  text-align: center;
  text-decoration: none;
}

.kcalModal__line:hover {
  opacity: .85;
  color: #fff;
}

.kcalModal__note {
  margin: 10px 0 0;
  font-size: .78em;
  color: #9c9c9c;
  line-height: 1.6;
}

body.kcalModalOpen {
  overflow: hidden;
}

/* --- タブレット・PC（768px〜） --- */
@media only screen and (min-width: 768px) {
  .schedule .fc .fc-toolbar.fc-header-toolbar {
    flex-wrap: nowrap;
  }

  .schedule .fc .fc-toolbar-chunk:nth-child(2) {
    order: 0;
    width: auto;
  }

  .schedule .fc .fc-toolbar-chunk:nth-child(1),
  .schedule .fc .fc-toolbar-chunk:nth-child(3) {
    flex: 0 0 auto;
  }

  .schedule .fc .fc-toolbar-title {
    font-size: 1.5em;
  }

  .schedule .fc .fc-button {
    padding: .5em 1em;
    font-size: 1em;
  }

  .schedule .kcalEvent {
    font-size: 11px;
    padding: 1px 4px;
  }

  .schedule .fc .fc-daygrid-day-frame {
    min-height: 5.5em;
  }

  .schedule .kcalEventTG {
    font-size: 11px;
    padding: 3px 5px;
  }

  /* ポップアップは中央のダイアログ表示 */
  .kcalModal {
    align-items: center;
  }

  .kcalModal__panel {
    width: calc(100% - 32px);
    max-width: 420px;
    max-height: 82vh;
    border: 1px solid rgba(222, 156, 8, .5);
    border-radius: 12px;
    padding-bottom: 20px;
  }
}
