/* ================================================================
   見出し・タブ
   ================================================================ */
.room-search-header {
  width: 90% !important;
  margin: 0 auto 4px;
  max-width: 780px !important;
}

.room-search-title {
  text-align: center;
  font-size: 18px;
  font-weight: normal;
  letter-spacing: 0.08em;
  margin: 0 0 14px;
  color: #fff;
}

.room-search-tabs {
  display: flex;
  gap: 10px;
  width: 100% !important;
}

@media screen and (min-width: 768px) {
  .room-search-tabs {
    gap: 2em;
  }
}

.room-search-tab {
  flex: 1;
  max-width: calc(50% - 5px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  padding: 30px 8px;
  background: #1a1a1a;
  border: 1px solid #444;
  border-radius: 6px;
  color: #888;
  cursor: pointer;
  transition: border-color 0.2s, color 0.2s;
}

.room-search-tab.is-active {
  border-color: #64b7cb;
  color: #64b7cb;
}

.material-icons.room-search-tab-icon {
  font-family: 'Material Icons' !important;
  font-size: 30px !important;
  line-height: 1;
}

.room-search-tab-label {
  font-size: 14px;
  letter-spacing: 0.04em;
}

/* ----------------------------------------------------------------
   タブ切り替え表示制御
   ---------------------------------------------------------------- */
#cottage-list {
  display: none;
  width: 90% !important;
  margin: 3em auto 0 !important;
  max-width: 780px !important;
}

#cottage-list.is-active {
  display: block;
}

#cottage-list .wp-block-columns.is-layout-flex {
  justify-content: center;
}

@media screen and (min-width: 768px) {
  #cottage-list .wp-block-columns.is-layout-flex .wp-block-column {
    width: calc(50% - 1em);
  }
}

#booking-package_calendarPage.is-hidden {
  display: none;
}

/* ---------------------------------------------------------------- */

#booking-package_calendarPage {
  width: 90% !important;
  margin-top: 3em !important;
  max-width: 780px !important;
}

#booking-package_calendarPage.is-loading #calendar-spinner {
  display: block;
}

#calendar-spinner {
  display: none;
}

#booking-package_calendarPage.is-loading .calendarHeader {
  display: none;
}

#booking-package_calendarPage.is-loading .calendar {
  display: none;
}

#booking-package_calendarPage.is-loading .calendar-note-container {
  display: none;
}

#booking-package_calendarPage .calendarHeader {
  width: 100%;
}

#booking-package_calendarPage .calendar {
  width: 100%;
  border-color: #ddd;
  background-color: #ddd;
}

#booking-package_calendarPage .week_slot {
  background-color: #000;
}

#booking-package_calendarPage .pastDay {
  background-color: #000;
}

#booking-package_calendarPage .day_slot {
  background-color: #000;
}

#booking-package_calendarPage .available_day:hover {
  background-color: #000 !important;
}

#booking-package_calendarPage .calendar-note-container {
  display: block;
  margin-top: 30px;
}

#booking-package_calendarPage .calendar-note {
  font-size: 14px;
  line-height: 18px;
}

.calendar-season-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  margin-top: 6px;
}

.calendar-season-table th,
.calendar-season-table td {
  padding: 6px 10px;
  border: 1px solid #ddd;
  line-height: 1.6;
}

.calendar-season-table th {
  white-space: nowrap;
  font-weight: normal;
  background: #000;
  width: 100px;
}

.availability-information {
  font-size: 12px;
  line-height: 18px;
}

@media screen and (min-width: 1024px) {
  .availability-information {
    margin-top: 4px;  
  }
}

.availability-information.full-room {
  font-size: 16px;
  color: rgb(221, 51, 51);
  line-height: 22px;
}

.availability-information.almost-full-room {
  color: rgb(233, 160, 111);
}

.availability-information-number {
  font-size: 14px;
  margin-left: 2px;
  margin-right: 1px;
  line-height: 18px;
}

#booking-package_calendarPage .otherMonth {
  opacity: 0.35;
  pointer-events: none;
}

#booking-package_calendarPage .is-clickable {
  cursor: pointer;
}

#booking-package_calendarPage .notYetOpen {
  cursor: default;
}

.not-yet-open-mark {
  display: block;
  height: 2px;
  width: 30%;
  background-color: #888;
  margin: 9px auto 2px;
}

#booking-package_calendarPage .available_day:not(.is-clickable) {
  cursor: initial;
  pointer-events: none;
}

/* ================================================================
   モーダル
   ================================================================ */
.avail-modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 9999;
}

#booking-package_calendarPage .day_slot.is-selected {
  background-color: #64b7cb !important;
}

.avail-modal-overlay.is-open {
  display: flex;
  align-items: center;
  justify-content: center;
}

.avail-modal {
  position: relative;
  width: calc(100% - 32px);
  max-width: 480px;
  max-height: 80vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: #1a1a1a;
  border: 1px solid #444;
  border-radius: 8px;
  color: #fff;
}

.avail-modal-close {
  position: absolute;
  top: 12px;
  right: 14px;
  background: none;
  border: none;
  color: #aaa;
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
  padding: 4px 6px;
  z-index: 1;
  transition: color 0.2s;
}

.avail-modal-close:hover {
  color: #fff;
}

.avail-modal-header {
  padding: 12px 48px 8px 20px;
  border-bottom: 1px solid #333;
  flex-shrink: 0;
}

.avail-modal-date {
  font-size: 16px;
  font-weight: bold;
  letter-spacing: 0.04em;
  margin-bottom: 6px;
}

.avail-modal-count {
  font-size: 13px;
  line-height: 24px;
  color: #bbb;
}

.avail-modal-count span {
  font-size: 22px;
  font-weight: bold;
  color: #fff;
  margin: 0 2px;
}

.avail-modal-body {
  overflow-y: auto;
  padding: 16px;
  flex: 1;
}

.avail-modal-cottage-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.avail-modal-cottage-card {
  background: #272727;
  border-radius: 6px;
  overflow: hidden;
  border: 1px solid #333;
  text-decoration: none !important;
}

.avail-modal-cottage-img-wrap {
  width: 100%;
  aspect-ratio: 3 / 2;
  overflow: hidden;
  background: #333;
}

.avail-modal-cottage-img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.avail-modal-cottage-info {
  padding: 8px 0px 10px;
  text-align: center;
  display: flex;
  flex-wrap: wrap;
  gap: 6px 0px;
}

.avail-modal-cottage-name {
  font-size: 14px;
  width: 100%;
  margin: 0;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.avail-modal-cottage-capacity {
  margin: 0;
  font-size: 14px;
  line-height: 1;
  color: #ddd;
}

.avail-modal-cottage-price {
  margin: 0;
  font-size: 14px;
  line-height: 1;
  color: #ddd;
}

@media screen and (max-width: 375px) {
  .avail-modal-cottage-price {
    font-size: 12px;
  }

  .avail-modal-cottage-capacity {
    font-size: 12px;
  }
}

.avail-modal-cottage-info-inner {
  display: flex;
  flex-direction: column;
  gap: 6px;
  align-items: center;
  justify-content: center;
  flex: 1;
}

.avail-modal-cottage-info-inner.avail-modal-cottage-smallgroup {
  border-right: 1px solid #ddd;
}

.availability-information.phone-mark {
  color: #fff;
}

.availability-information.phone-mark span {
  font-size: 16px !important;
  line-height: 22px;
}

.calendar-spinner-icon {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  border: 5px solid #4f4f4f;
  border-top-color: #dfdfdf;
  animation: spinner 1.5s linear infinite;
  margin: 60px auto;
}

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

.calendar-error {
  margin-top: 60px;
  text-align: center;
}

@media screen and (min-width: 1024px) {
  .avail-modal {
    width: 800px;
    max-width: unset;
  }

  .avail-modal-cottage-grid {
    grid-template-columns: 1fr 1fr 1fr;
  }
}