@charset "utf-8";

/* 既存のスタイルは維持 */
.bookLesson-title {
  width: 100%;

  height: 310px;
  background-image: url(/asset/member/book-lesson-title.png);
  background-repeat: no-repeat;
  background-position: center center;
  background-size: cover;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  background-color: blue;
  color: #e3759f;
  font-size: 1.3rem;
}

.bookLesson-title-box {
  height: 310px;
  display: flex;
  flex-direction: column;
  gap:10px;
}

/* Header */
.greeting {
  text-align: center;
  color: #ff80ab;
  font-size: clamp(20px, 10vw, 16px);
  margin-top: 180px;
  margin-bottom: 10px;
  padding: 0 15px;
}

#booklesson {
  background-color: var(--booklesson-background-color);
}
.bookLesson-title-box h1 {
  text-align: center;
  font-size: clamp(20px, 10vw, 16px);
  margin-top: 10px;
  margin-bottom: 10px;
  padding: 0 15px;
}
/* ページタイトルHeader */
.bookLesson_pageLabel  {
  display: block;
  text-align:start;
  font-weight:bold;
  margin-top: 20px;
  margin-bottom: 20px;
  margin-left: auto;
  padding: 15px;
  margin-bottom: 20px;

  width: 90%;
  max-width: 85%;
  margin-top: 15px;
  margin-left: auto;
  margin-right: auto;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  /* text-align: flex-start;*/
  color: var(--contact-accent-color);
}
.bookLesson_pageLabel::after {
  content: '';
  display: block;
  width: 36px;
  height: 3px;
  /* background-color: #000;*/
  color: var(--booklesson-text-color);
  margin-top: 10px;
}

.current-date  {
  display: flex;
  align-items: center;
  font-size: 18px;
  font-weight: normal;
  margin-top: 20px;
  margin-bottom: 10px;
  margin-left: 50px;
  color: var(--booklesson-text-color);
}

.selectedDateHeader {
  font-size: 18px;
  font-weight: normal;
  margin-top: 30px;
  margin-bottom: 10px;
  color: var(--booklesson-text-color);
}

.container {
    width: 80%;
    max-width: 95%;
    margin: 0 auto;
    position: relative;
}

.header-container {
width: 100%;
background-color: var(--booklesson-header-background-color);
position: relative;
overflow: hidden;
}

.reservation-container {
  background-color: var(--booklesson-header-background-color);
}

.calendar-container {
  background-color: var(--booklesson-header-background-color);
  border-radius: 8px;
  padding: 15px;
  margin-bottom: 20px;

  width: 90%;
  max-width: 85%;
  margin-top: 15px;
  margin-left: auto;
  margin-right: auto;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;

  }



.date-header {
  text-align: center;
  padding: 10px 0;
  margin-bottom:10px;
  /*border-bottom: 1px solid #eee;*/
}

.date-header h1 {
  font-size: 18px;
  font-weight: normal;
  color: var(--booklesson-text-color);
}

.date {
  width: 40px;
  height: 40px;
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 24px;
  color: #333;
}


/* 時間帯ボタンのコンテナ */
#timeSlotsContainer {
  display: flex;
  /*flex-wrap: wrap;*/
  flex-direction: row;
  gap: 30px;
  margin-top: 20px;
  justify-content: center;
}

.time-section {
  /* container style */
  /*background-color: #f7f7f7;*/
  border: 1px solid #ddd;
  border-radius: 8px;

  /* spacing */
  padding: 0 20px;
  margin: 15px auto 50px;

  /* layout */
  width: 90%;
  max-width: 900px;

  display: flex;
  flex-direction: column;
  align-items: flex-start;
}


/*
.note {
  font-size: 16px;
  color: #333;
  margin-bottom: 20px;
}
*/
.timeSlotsContainer {

  display: flex;
  flex-direction: column;

  gap: 30px;
}

.time-slots {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 15px;
}
.selected-slot {
  margin: 10px 0;
  text-align: center;
  font-size: 16px;
  font-weight: bold;
  margin-top: 10px;
}

.text-danger {
  color: red;
  margin: 10px 0;
  text-align: center;
  }

.reservation-action {
  display: flex;
  justify-content: center;
  gap: 20px;
  margin: 20px auto;
  flex-wrap: wrap;
  }




  .date-scroll-container {
    display: flex;
    align-items: center;
    gap: 10px;
    overflow: hidden;
    width: 100%;
}

.day-selector {
    display: flex;
    overflow-x: auto;
    white-space: nowrap;
    scrollbar-width: thin;
    scroll-behavior: smooth;
    flex-grow: 1;
}

.day-button {
    min-width: 60px;
    padding: 10px;
    border: 1px solid #ccc;
    background-color: #f9f9f9;
    text-align: center;
    cursor: pointer;
    flex-shrink: 0;
}

.day-button.selected {
    background-color: #fcd3f0;
    color: rgb(5, 4, 4);
}

.day-button:hover {
  /*outline: 2px solid #ff7a7a;*/
  background-color: #dd84a6;
}
.time-button-container {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-start;
}

.time-button {
  width: 100px;
  margin-top: 10px;
  margin-bottom: 10px;
  margin-right: 0px;
  padding: 15px 15px 15px 15px;
  cursor: pointer;
}
.time-button.selected {
  background-color: #fcd3f0;
  color: rgb(5, 4, 4);
}

.time-button:hover {
  /*outline: 2px solid #ff7a7a;*/
  background-color: #dd84a6;
}

.reservation-action-box {
  margin-left: auto;
  display: block;
  align-items: center;
}
.reservation-action {
    flex-direction: row;
    align-items: center;
    justify-content: center;
}
.time-header text-danger {
  color: red;
  font-size: 16px;
  margin-left: 10px;
}

#selectedTimeHeader {
  font-size: 18px;
  font-weight: normal;
  margin-top: 30px;
  margin-bottom: 10px;
}
.loading-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(3px);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 9999;
  opacity: 0;
  transition: opacity 0.3s ease-in-out;
}

.loading-overlay.show {
  opacity: 1;
}

.loading-box {
  background: #f0f1e4;
  padding: 40px 50px;
  border-radius: 20px;
  text-align: center;
  font-size: 18px;
  box-shadow: 0 8px 20px rgba(0,0,0,0.2);
}

/* スピナー */
.spinner {
  width: 60px;
  height: 60px;
  border: 6px solid #eee;
  border-top-color: #7ec6ff; /* ← ブランドカラー（必要なら変更） */
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin: 0 auto 20px;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

@media (max-width: 768px) {
  .book-lesson-submit-button {
    width: 100%;
    max-width: none;
  }
  .day-selector {
    gap: 30px;
  }

  .time-slots {
    grid-template-columns: 1fr;
  }

  .reservation-action {
    flex-direction: column;
    align-items: center;
  }

  .book-lesson-submit-button {
    width: 80%;
    max-width: 300px;
  }
/*
  .date-navigation {
  flex-direction: column;
  gap: 15px;
  }

  .date-navigation-before,
  .date-navigation-after {
  width: 100%;
  justify-content: space-between;
  }
  */
  }


/* =========================================================
   レッスン予約画面
   ========================================================= */

/* ---------------------------------------------------------
   ページタイトル
   --------------------------------------------------------- */

.bookLesson-title {
  width: 100%;
  height: 310px;

  background-image: url("/asset/member/book-lesson-title.png");
  background-repeat: no-repeat;
  background-position: center;
  background-size: cover;

  display: flex;
  justify-content: center;
  align-items: center;

  color: var(--label-accent-color);
}

.bookLesson-title-box {
  width: 100%;
  height: 310px;

  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.greeting {
  margin-top: 170px;
  padding: 0 15px;

  text-align: center;
  font-size: clamp(14px, 2vw, 18px);
  color: var(--authenticated-text-color);
}

.bookLesson-title-box h1 {
  margin: 10px 0;
  padding: 0 15px;

  text-align: center;
  font-family: "Montserrat", sans-serif;
  font-size: clamp(24px, 4vw, 40px);
  letter-spacing: 0.08em;

  color: var(--label-accent-color);
}


/* ---------------------------------------------------------
   メインコンテナ
   --------------------------------------------------------- */

.container {
  width: min(95%, 1200px);
  margin: 0 auto;
  background-color: var(--booklesson-background-color);
}

.header-container {
  width: 100%;
  background-color: var(--booklesson-header-background-color);
  position: relative;
  overflow: hidden;
}


/* ---------------------------------------------------------
   ページラベル
   --------------------------------------------------------- */

.bookLesson_pageLabel {
  width: 90%;
  max-width: 1000px;

  margin: 15px auto 20px;
  padding: 15px 0;

  color: var(--contact-accent-color);
  font-weight: bold;
  text-align: left;
}

.bookLesson_pageLabel::after {
  content: "";

  display: block;
  width: 36px;
  height: 3px;

  margin-top: 10px;

  background-color: var(--contact-accent-color);
}


/* ---------------------------------------------------------
   カレンダー
   --------------------------------------------------------- */

.calendar-container {
  width: 90%;
  max-width: 1000px;

  margin: 15px auto 20px;
  padding: 20px;

  display: flex;
  flex-direction: column;
  align-items: stretch;

  background-color: var(--booklesson-background-color);
  border-radius: 12px;
}


/* 本日 */

.current-date {
  display: flex;
  align-items: center;

  margin: 5px 0 10px;
  padding-left: 10px;

  color: var(--booklesson-text-color);
  font-size: 16px;
  font-weight: normal;
}


/* 日付見出し */

.date-header {
  padding: 10px 0;
  margin-bottom: 10px;

  text-align: center;
}

.date-header h1,
.selectedDateHeader {
  margin: 10px 0;

  color: var(--booklesson-text-color);
  font-size: 18px;
  font-weight: normal;
}


/* ---------------------------------------------------------
   日付スクロール
   --------------------------------------------------------- */

.date-scroll-container {
  width: 100%;

  display: flex;
  align-items: center;

  overflow: hidden;
}

.day-selector {
  width: 100%;

  display: flex;
  gap: 8px;

  overflow-x: auto;
  overflow-y: hidden;

  padding: 5px 2px 10px;

  white-space: nowrap;
  scroll-behavior: smooth;

  scrollbar-width: thin;
}


/* 日付ボタン */

.day-button {
  flex: 0 0 68px;

  min-height: 90px;
  padding: 8px 5px;

  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 4px;

  border: 1px solid var(--text-input-border-color);
  border-radius: 10px;

  background-color: var(--booklesson-background-color);
  color: var(--booklesson-text-color);

  cursor: pointer;

  transition:
    background-color 0.2s ease,
    color 0.2s ease,
    border-color 0.2s ease,
    transform 0.2s ease;
}

.day-button:hover {
  background-color: var(--button-hover-bg);
  color: var(--button-hover-text);
  border-color: var(--button-hover-bg);
}

.day-button:active {
  transform: scale(0.96);
}


/* 選択中の日付 */

.day-button.selected {
  background-color: var(--accent);
  color: #fff;
  border-color: var(--accent);
}


/* 曜日 */

.day-button .weekday {
  font-size: 13px;
  font-weight: bold;
}


/* 日 */

.day-button .date {
  width: auto;
  height: auto;

  font-size: 24px;
  font-weight: bold;

  color: inherit;
}


/* 空き状況 */

.day-button span {
  min-height: 18px;

  font-size: 14px;
  font-weight: bold;
}


/* 空きあり */

.day-button span:first-of-type {
  color: #2684d9;
}


/* 満席 */

.day-button span:last-of-type {
  color: #d9534f;
}


/*
  選択中は○×の色を白にする
*/
.day-button.selected span {
  color: #fff;
}


/* ---------------------------------------------------------
   時間選択エリア
   --------------------------------------------------------- */

.time-section {
  width: 90%;
  max-width: 900px;

  margin: 15px auto 50px;
  padding: 10px 20px 25px;

  border: 1px solid var(--text-input-border-color);
  border-radius: 12px;

  background-color: var(--booklesson-background-color);

  display: flex;
  flex-direction: column;
  align-items: stretch;
}


/* 時間見出し */

.selectedTimeHeader {
  margin: 20px 0 10px;
  color: var(--booklesson-text-color);
  font-size: 18px;
  font-weight: normal;
  text-align: center;
}


/* 満席メッセージ */

.time-header.text-danger {
  color: var(--text-input-error-color);
}

.time-header.text-danger #selectedTimeHeader {
  color: inherit;
}


/* 時間ボタンコンテナ */

#timeSlotsContainer {
  width: 100%;

  display: flex;
  flex-wrap: wrap;
  justify-content: center;

  gap: 12px;

  margin-top: 10px;
}

#reservationData {
  width: 100%;

  display: flex;
  flex-wrap: wrap;
  justify-content: center;

  gap: 12px;
}


/* 時間ボタン */

.time-button {
  width: 100px;
  min-height: 48px;

  padding: 10px;

  border: 1px solid var(--text-input-border-color);
  border-radius: 8px;

  background-color: var(--booklesson-background-color);
  color: var(--booklesson-text-color);

  font-size: 15px;

  cursor: pointer;

  transition:
    background-color 0.2s ease,
    color 0.2s ease,
    border-color 0.2s ease,
    transform 0.2s ease;
}

.time-button:hover {
  background-color: var(--button-hover-bg);
  color: var(--button-hover-text);
  border-color: var(--button-hover-bg);
}

.time-button:active {
  transform: scale(0.96);
}

.time-button.selected {
  background-color: var(--accent);
  color: #fff;
  border-color: var(--accent);
}


/* ---------------------------------------------------------
   予約アクション
   --------------------------------------------------------- */

.reservation-action-box {
  width: 90%;
  max-width: 900px;

  margin: 0 auto 40px;
}

.selected-slot {
  margin: 15px 0;

  color: var(--booklesson-text-color);

  font-size: 16px;
  font-weight: bold;
  text-align: center;
}

.selected-slot.text-danger {
  color: var(--text-input-error-color);
}


.reservation-action {
  display: flex;
  justify-content: center;
  align-items: center;

  gap: 20px;

  margin: 20px auto;

  flex-wrap: wrap;
}


/* ---------------------------------------------------------
   ダークモード
   --------------------------------------------------------- */

@media (prefers-color-scheme: dark) {
/*
  .bookLesson-title {
    background-color: var(--main-bg);
  }

  .calendar-container {
    background-color:  #f1d5d5;;
  }

  .day-button,
  .time-button {
    background-color: #f7abcc;
    border-color: #fb8bbb;
    color: var(--booklesson-text-color);
  }

  .day-button:hover,
  .time-button:hover {
    background-color: var(--button-hover-bg);
    color: var(--button-hover-text);
  }

  .day-button.selected,
  .time-button.selected {
    background-color: var(--accent);
    color: #fff;
  }

  .time-section {
    background-color:  #f1d5d5;;
    border-color: #555;
  }

  .day-selector {
    scrollbar-color: #777 #242424;
  }
*/
}


/* ---------------------------------------------------------
   レスポンシブ
   --------------------------------------------------------- */

@media (max-width: 768px) {

  .bookLesson-title {
    height: 220px;
  }

  .bookLesson-title-box {
    height: 220px;
  }

  .greeting {
    margin-top: 100px;

    font-size: 14px;
  }

  .bookLesson-title-box h1 {
    font-size: 26px;
  }


  /* メイン */

  .container {
    width: 100%;
  }


  /* ページタイトル */

  .bookLesson_pageLabel {
    width: 90%;
    margin-top: 15px;
  }


  /* カレンダー */

  .calendar-container {
    width: 94%;

    padding: 15px;

    border-radius: 10px;
  }

  .current-date {
    padding-left: 5px;
    font-size: 14px;
  }

  .selectedDateHeader {
    font-size: 16px;
  }


  /* 日付ボタン */

  .day-selector {
    gap: 6px;
  }

  .day-button {
    flex-basis: 58px;
    min-height: 82px;

    padding: 6px 4px;
  }

  .day-button .weekday {
    font-size: 12px;
  }

  .day-button .date {
    font-size: 21px;
  }

  .day-button span {
    font-size: 13px;
  }


  /* 時間 */

  .time-section {
    width: 94%;

    margin-bottom: 30px;
    padding: 10px 12px 20px;
  }

  #selectedTimeHeader {
    font-size: 16px;
  }

  #timeSlotsContainer,
  #reservationData {
    gap: 8px;
  }

  .time-button {
    width: 85px;
    min-height: 44px;

    padding: 8px 5px;

    font-size: 14px;
  }


  /* 予約ボタン */

  .reservation-action-box {
    width: 94%;
  }

  .reservation-action {
    flex-direction: column;

    gap: 12px;
  }

  .reservation-action .submit-button {
    width: 80%;
    max-width: 300px;
  }
}


/* ---------------------------------------------------------
   小さいスマートフォン
   --------------------------------------------------------- */

@media (max-width: 480px) {

  .bookLesson-title {
    height: 190px;
  }

  .bookLesson-title-box {
    height: 190px;
  }

  .greeting {
    margin-top: 80px;
    font-size: 13px;
  }

  .bookLesson-title-box h1 {
    font-size: 22px;
  }


  .calendar-container {
    width: 96%;
    padding: 12px;
  }


  .day-button {
    flex-basis: 54px;
    min-height: 78px;
  }

  .day-button .date {
    font-size: 20px;
  }


  .time-section {
    width: 96%;
    padding-left: 8px;
    padding-right: 8px;
  }

  .time-button {
    width: 76px;
  }


  .reservation-action-box {
    width: 96%;
  }
}

