/* ---------------------- 共通 ---------------------- */
h2 {
  font-size: 1.2em;
}

.calendar {
  font-family: "UDデジタル教科書体", "UD Digi Kyokasho", "メイリオ", "ヒラギノ角ゴシック", sans-serif;
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
}

.calendar th,
.calendar td {
  width: calc(100% / 7);
  padding: 1px 1px;
  font-size: 16px;

  box-sizing: border-box;
  min-width: 0;
  border: 1px solid #000;
  text-align: center;
}

.calendar th {
  font-size: 14px;
  padding: 1px 1px;
}

.calendar .today {
  background-color: #fff;
}

.calendar .prev-month,
.calendar .next-month {
  color: #ccc;
  background-color: #ccc;
}

.calendar .unavailable-day {
  background-color: #ccc;
  color: #666;
  pointer-events: none;
  cursor: not-allowed;
}

.calendar .calendar-day:hover {
  background-color: #ff6666;
  color: #fff;
  cursor: pointer;
}

.calendar td.selected-day {
  background-color: #ebf872 !important;
  color: white;
}

.time-row:hover {
  background-color: #ebf872 !important;
  color: inherit !important;
}

.marker-placeholder {
  height: 16px;
  visibility: hidden;
}

.past-day {
  background-color: #ccc;
  color: #666;
  pointer-events: none;
  cursor: not-allowed;
}

#popup {
  overflow-y: auto;
  position: absolute;
  background: white;
  border: 1px solid #333;
  box-shadow: 0 0 8px rgba(0, 0, 0, 0.2);
  z-index: 1000;
}

.popup-cancel {
  margin-top: 10px;
  display: block;
  width: 100%;
  padding: 8px 0;
  font-size: 16px;
  background-color: #ffffff;
  border: 2px solid #333;
  color: #333;
  cursor: pointer;
  transition: background-color 0.2s ease;
}

.popup-cancel:hover {
  background-color: #f0f0f0;
}

.calendar th.sun {
  background-color: #ffada5;
}

.calendar th.sat {
  background-color: #b0e6ff;
}

.calendar th.mon,
.calendar th.tue,
.calendar th.wed,
.calendar th.thu,
.calendar th.fri {
  background-color: #e7e7e7;
}

@media (max-width: 767.98px) {

  .info-block select,
  .info-block input {
    width: 90%;
    max-width: 90%;
  }

  #calendar-pc {
    display: none;
  }

  #calendar-swiper {
    display: block;
  }

  .swiper {
    width: 100%;
    height: 100;
  }

  .swiper-slide {
    padding: 0 5px;
    box-sizing: border-box;
  }

  .calendar {
    max-width: 100%;
    width: 100;
    margin: 0 5px;
  }

  .calendar th,
  .calendar td {
    font-size: 18px;
  }

  #calendar-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    margin: 10px 0 20px;
    padding: 0 10px;
  }

  #calendar-nav button {
    padding: 0;
    background: none;
    border: none;
    cursor: pointer;
    width: 48px;
    height: 48px;
  }

  #calendar-nav button img.arrow-icon {
    width: 100%;
    height: auto;
    object-fit: contain;
    opacity: 1;
    transition: opacity 0.2s;
  }

  #calendar-nav button:disabled img.arrow-icon {
    opacity: 0.3;
    cursor: not-allowed;
  }

  #month-label {
    flex: 1;
    text-align: center;

    font-size: 1.5em;
  }

  .input-row {
    display: flex;
    flex-direction: row;
    align-items: center;
    width: 100%;
    margin-bottom: 0px;
    padding: 0 0px;
    box-sizing: border-box;
  }

  .input-row label {
    flex: 1;
    font-size: 16px;
    text-align: left;
  }

  .input-row select,
  .input-row input[type="text"] {
    flex: 3;
    font-size: 16px;
    padding: 0px;
    border: 1px solid #ccc;
    border-radius: 4px;
    width: 100%;
    box-sizing: border-box;
  }

  input,
  textarea,
  select,
  fieldset {
    margin-bottom: 0 !important;
  }
}

@media (min-width: 768px) {
  #calendar-swiper {
    display: none;
  }

  #calendar-pc {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
    padding: 30px;
    max-width: 1200px;
    margin: auto;
    background-color: #fff;
    box-sizing: border-box;
  }

  #calendar-nav {
    display: none;
  }
}

.calendar select,
.calendar input {
  font-size: 16px;
  width: 90%;
  margin-top: 8px;
}

.info-block select,
.info-block input {
  width: 300px;
  max-width: 100%;
  display: block;
  font-size: 18px;
  box-sizing: border-box;
}

.label {
  margin-top: 20px;
}

.button-area {
  display: flex;
  justify-content: space-between;
  margin-top: 30px;
}

.input-row {
  padding: 0 25px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.input-row label {
  padding-right: 6px;
  width: 100px;
  text-align: right;
}

/* 受験申込フォームのセレクト・インプット幅調整 */
.input-row select,
.input-row input[type="text"] {
  width: 400px;
  max-width: 100%;
  min-width: 80px;
  box-sizing: border-box;
  font-size: 16px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* 受験料の固定表示欄にも適用 */
#price-fixed {
  width: 400px;
  max-width: 100%;
  min-width: 80px;
  box-sizing: border-box;
  font-size: 16px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

@media (max-width: 767.98px) {
  #price-fixed {
    width: 200px;
  }

  .input-row select,
  .input-row input[type="text"] {
    width: 200px;
  }
}

.reserve-status {
  display: flex;
  gap: 1em;
  justify-content: center;
  flex-wrap: wrap;
}

.reserve-status span {
  display: inline-block;
}

/* スマホ時は縦並び */
@media (max-width: 767.98px) {
  .reserve-status {
    display: block;
    text-align: center;
  }
  .reserve-status span {
    display: block;
  }
}