/* R108_CCC_BOOKING_FORM_COMPACT_V137_CSS_ACTIVE */

/* Modal และหัวข้อ */
html body.khaokho-theme.ploysea-theme .booking-modal {
  padding: 8px !important;
}
html body.khaokho-theme.ploysea-theme .booking-modal-dialog {
  width: min(930px, calc(100vw - 16px)) !important;
  max-height: calc(100dvh - 16px) !important;
}
html body.khaokho-theme.ploysea-theme .booking-modal .booking-card {
  max-height: calc(100dvh - 16px) !important;
  padding: 13px 16px 14px !important;
}
html body.khaokho-theme.ploysea-theme .booking-modal .booking-title-row {
  min-height: 35px !important;
  margin: 0 0 6px !important;
  padding: 0 46px 5px 0 !important;
}
html body.khaokho-theme.ploysea-theme .booking-modal .booking-title-row h2 {
  font-size: 20px !important;
  line-height: 1.2 !important;
}
html body.khaokho-theme.ploysea-theme .booking-modal .booking-title-row > span {
  min-height: 30px !important;
  padding: 0 9px !important;
  font-size: 11px !important;
}
html body.khaokho-theme.ploysea-theme .booking-modal-close {
  top: 8px !important;
  right: 8px !important;
  width: 32px !important;
  height: 32px !important;
  font-size: 21px !important;
}

/* ข้อความแนะนำด้านบน */
html body.khaokho-theme.ploysea-theme .booking-modal .booking-note--customer {
  display: block !important;
  min-height: 0 !important;
  margin: 0 0 7px !important;
  padding: 7px 10px !important;
  border-radius: 8px !important;
  font-size: 11.5px !important;
  line-height: 1.35 !important;
}

/* โครงสร้างฟอร์มบนคอมพิวเตอร์ */
html body.khaokho-theme.ploysea-theme .booking-modal .booking-form.form-grid {
  display: grid !important;
  grid-template-columns: minmax(0, 1.45fr) minmax(0, 1.15fr) minmax(82px, .62fr) minmax(82px, .62fr) !important;
  column-gap: 8px !important;
  row-gap: 6px !important;
  align-items: end !important;
}
html body.khaokho-theme.ploysea-theme .booking-form .booking-selected-room,
html body.khaokho-theme.ploysea-theme .booking-form .date-range-field,
html body.khaokho-theme.ploysea-theme .booking-form .availability-status,
html body.khaokho-theme.ploysea-theme .booking-form .booking-room-field,
html body.khaokho-theme.ploysea-theme .booking-form .booking-price-summary,
html body.khaokho-theme.ploysea-theme .booking-form .booking-message-compact,
html body.khaokho-theme.ploysea-theme .booking-form > button[type="submit"] {
  grid-column: 1 / -1 !important;
}
html body.khaokho-theme.ploysea-theme .booking-form .booking-field-name { grid-column: 1 !important; }
html body.khaokho-theme.ploysea-theme .booking-form .booking-field-phone { grid-column: 2 !important; }
html body.khaokho-theme.ploysea-theme .booking-form .booking-field-adults { grid-column: 3 !important; }
html body.khaokho-theme.ploysea-theme .booking-form .booking-field-children { grid-column: 4 !important; }
html body.khaokho-theme.ploysea-theme .booking-form .booking-quantity-field { grid-column: 1 !important; }
html body.khaokho-theme.ploysea-theme .booking-form .booking-extra-bed-field { grid-column: 2 !important; }
html body.khaokho-theme.ploysea-theme .booking-form .booking-capacity-status {
  grid-column: 3 / 5 !important;
  align-self: stretch !important;
}

/* บ้านพักที่เลือก */
html body.khaokho-theme.ploysea-theme .booking-modal .booking-selected-room {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) auto !important;
  gap: 2px 10px !important;
  margin: 0 !important;
  padding: 8px 10px !important;
  border-radius: 10px !important;
}
html body.khaokho-theme.ploysea-theme .booking-selected-room__label {
  grid-column: 1 !important;
  margin: 0 !important;
  font-size: 10px !important;
  line-height: 1.2 !important;
}
html body.khaokho-theme.ploysea-theme .booking-selected-room__body {
  display: contents !important;
}
html body.khaokho-theme.ploysea-theme .booking-selected-room__body > div {
  grid-column: 1 !important;
  min-width: 0 !important;
}
html body.khaokho-theme.ploysea-theme .booking-selected-room strong {
  font-size: 15px !important;
  line-height: 1.25 !important;
}
html body.khaokho-theme.ploysea-theme .booking-selected-room p {
  margin: 1px 0 0 !important;
  font-size: 10.5px !important;
  line-height: 1.25 !important;
}
html body.khaokho-theme.ploysea-theme .booking-selected-room small {
  display: none !important;
}
html body.khaokho-theme.ploysea-theme .booking-change-room-button {
  grid-column: 2 !important;
  grid-row: 1 / span 2 !important;
  align-self: center !important;
  min-height: 34px !important;
  padding: 6px 10px !important;
  font-size: 11px !important;
}

/* วันที่และสถานะวันว่าง */
html body.khaokho-theme.ploysea-theme .booking-form label,
html body.khaokho-theme.ploysea-theme .booking-form .date-range-field {
  gap: 2px !important;
}
html body.khaokho-theme.ploysea-theme .booking-form label > span,
html body.khaokho-theme.ploysea-theme .date-range-field > span {
  min-height: 0 !important;
  font-size: 9.5px !important;
  line-height: 1.2 !important;
}
html body.khaokho-theme.ploysea-theme .date-range-trigger {
  min-height: 50px !important;
  height: 50px !important;
  padding: 5px 9px !important;
}
html body.khaokho-theme.ploysea-theme .date-range-caption {
  font-size: 8px !important;
}
html body.khaokho-theme.ploysea-theme .date-range-cell strong,
html body.khaokho-theme.ploysea-theme .date-range-nights {
  font-size: 10.5px !important;
}
html body.khaokho-theme.ploysea-theme .booking-form .availability-status {
  min-height: 28px !important;
  padding: 5px 8px !important;
  font-size: 9.5px !important;
  line-height: 1.3 !important;
}

/* ช่องกรอกทั้งหมด */
html body.khaokho-theme.ploysea-theme .booking-form input,
html body.khaokho-theme.ploysea-theme .booking-form select {
  height: 38px !important;
  min-height: 38px !important;
  padding: 5px 8px !important;
  font-size: 12px !important;
}
html body.khaokho-theme.ploysea-theme .booking-extra-bed-field > span {
  min-height: 12px !important;
}
html body.khaokho-theme.ploysea-theme .booking-extra-bed-field > span small {
  max-width: 58% !important;
  font-size: 7.5px !important;
}

/* สถานะความจุให้อยู่ในแถวเดียวกับจำนวนบ้านและที่นอนเสริม */
html body.khaokho-theme.ploysea-theme .booking-form .booking-capacity-status {
  display: flex !important;
  flex-direction: row !important;
  flex-wrap: wrap !important;
  align-content: center !important;
  align-items: center !important;
  gap: 2px 6px !important;
  min-height: 38px !important;
  padding: 5px 8px !important;
  border-radius: 9px !important;
  line-height: 1.25 !important;
}
html body.khaokho-theme.ploysea-theme .booking-capacity-status strong {
  font-size: 10.5px !important;
  line-height: 1.25 !important;
}
html body.khaokho-theme.ploysea-theme .booking-capacity-status span {
  font-size: 9px !important;
  line-height: 1.25 !important;
}

/* สรุปราคาแนวนอน 3 ช่อง */
html body.khaokho-theme.ploysea-theme .booking-form .booking-price-summary {
  display: grid !important;
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  gap: 4px 8px !important;
  padding: 7px 10px !important;
  border-radius: 10px !important;
}
html body.khaokho-theme.ploysea-theme .booking-price-summary > div,
html body.khaokho-theme.ploysea-theme .booking-price-summary .booking-price-grand {
  display: flex !important;
  grid-column: auto !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 5px !important;
  min-width: 0 !important;
  border-top: 0 !important;
  padding: 0 !important;
}
html body.khaokho-theme.ploysea-theme .booking-price-summary span {
  font-size: 10px !important;
  line-height: 1.2 !important;
}
html body.khaokho-theme.ploysea-theme .booking-price-summary strong,
html body.khaokho-theme.ploysea-theme .booking-price-summary .booking-price-grand strong {
  font-size: 15px !important;
  line-height: 1.2 !important;
  white-space: nowrap !important;
}
html body.khaokho-theme.ploysea-theme .booking-price-summary small {
  grid-column: 1 / -1 !important;
  margin: 0 !important;
  font-size: 8.5px !important;
  line-height: 1.15 !important;
}

/* รายละเอียดเพิ่มเติม ย่อเป็นแถบกดเปิด */
html body.khaokho-theme.ploysea-theme .booking-message-compact {
  width: 100% !important;
  margin: 0 !important;
  border: 1px solid #dbe3ee !important;
  border-radius: 9px !important;
  background: #fff !important;
  overflow: hidden !important;
}
html body.khaokho-theme.ploysea-theme .booking-message-compact > summary {
  display: flex !important;
  min-height: 34px !important;
  align-items: center !important;
  justify-content: space-between !important;
  padding: 6px 9px !important;
  color: #334155 !important;
  cursor: pointer !important;
  font-size: 10.5px !important;
  font-weight: 800 !important;
  list-style: none !important;
}
html body.khaokho-theme.ploysea-theme .booking-message-compact > summary::-webkit-details-marker {
  display: none !important;
}
html body.khaokho-theme.ploysea-theme .booking-message-compact > summary::after {
  content: "+";
  font-size: 17px;
  font-weight: 500;
  line-height: 1;
}
html body.khaokho-theme.ploysea-theme .booking-message-compact[open] > summary::after {
  content: "−";
}
html body.khaokho-theme.ploysea-theme .booking-message-compact .booking-message-field {
  display: flex !important;
  margin: 0 !important;
  padding: 0 8px 8px !important;
}
html body.khaokho-theme.ploysea-theme .booking-message-compact .booking-message-field > span {
  display: none !important;
}
html body.khaokho-theme.ploysea-theme .booking-message-compact textarea {
  min-height: 54px !important;
  height: 54px !important;
  padding: 7px 8px !important;
  font-size: 11px !important;
  resize: vertical !important;
}

html body.khaokho-theme.ploysea-theme .booking-form > button[type="submit"] {
  min-height: 38px !important;
  height: 38px !important;
  margin: 0 !important;
  padding: 6px 12px !important;
  font-size: 12px !important;
}

/* มือถือ: 2 คอลัมน์ทุกคู่สำคัญ */
@media (max-width: 760px) {
  html body.khaokho-theme.ploysea-theme .booking-modal {
    padding: 4px !important;
    align-items: center !important;
  }
  html body.khaokho-theme.ploysea-theme .booking-modal-dialog {
    width: calc(100vw - 8px) !important;
    max-height: calc(100dvh - 8px) !important;
  }
  html body.khaokho-theme.ploysea-theme .booking-modal .booking-card {
    max-height: calc(100dvh - 8px) !important;
    padding: 9px 9px 10px !important;
    border-radius: 12px !important;
  }
  html body.khaokho-theme.ploysea-theme .booking-modal .booking-title-row {
    min-height: 32px !important;
    margin-bottom: 5px !important;
    padding-bottom: 4px !important;
  }
  html body.khaokho-theme.ploysea-theme .booking-modal .booking-title-row h2 {
    font-size: 17px !important;
  }
  html body.khaokho-theme.ploysea-theme .booking-modal .booking-title-row > span {
    min-height: 27px !important;
    font-size: 10px !important;
  }
  html body.khaokho-theme.ploysea-theme .booking-modal .booking-note--customer {
    margin-bottom: 5px !important;
    padding: 6px 8px !important;
    font-size: 10px !important;
    line-height: 1.3 !important;
  }
  html body.khaokho-theme.ploysea-theme .booking-modal .booking-form.form-grid {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) !important;
    column-gap: 6px !important;
    row-gap: 5px !important;
  }
  html body.khaokho-theme.ploysea-theme .booking-form .booking-field-name,
  html body.khaokho-theme.ploysea-theme .booking-form .booking-field-adults,
  html body.khaokho-theme.ploysea-theme .booking-form .booking-quantity-field {
    grid-column: 1 !important;
  }
  html body.khaokho-theme.ploysea-theme .booking-form .booking-field-phone,
  html body.khaokho-theme.ploysea-theme .booking-form .booking-field-children,
  html body.khaokho-theme.ploysea-theme .booking-form .booking-extra-bed-field {
    grid-column: 2 !important;
  }
  html body.khaokho-theme.ploysea-theme .booking-form .booking-capacity-status,
  html body.khaokho-theme.ploysea-theme .booking-form .booking-price-summary,
  html body.khaokho-theme.ploysea-theme .booking-form .booking-message-compact {
    grid-column: 1 / -1 !important;
  }
  html body.khaokho-theme.ploysea-theme .booking-selected-room {
    padding: 7px 8px !important;
  }
  html body.khaokho-theme.ploysea-theme .booking-selected-room strong {
    font-size: 13px !important;
  }
  html body.khaokho-theme.ploysea-theme .booking-selected-room p {
    max-width: 210px !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
    font-size: 9px !important;
  }
  html body.khaokho-theme.ploysea-theme .booking-change-room-button {
    min-height: 31px !important;
    padding: 5px 8px !important;
    font-size: 10px !important;
  }
  html body.khaokho-theme.ploysea-theme .date-range-trigger {
    min-height: 47px !important;
    height: 47px !important;
    padding: 4px 7px !important;
  }
  html body.khaokho-theme.ploysea-theme .booking-form input,
  html body.khaokho-theme.ploysea-theme .booking-form select {
    height: 36px !important;
    min-height: 36px !important;
    padding: 4px 7px !important;
    font-size: 11px !important;
  }
  html body.khaokho-theme.ploysea-theme .booking-form .availability-status {
    min-height: 26px !important;
    padding: 4px 7px !important;
    font-size: 8.8px !important;
  }
  html body.khaokho-theme.ploysea-theme .booking-form .booking-capacity-status {
    min-height: 34px !important;
    padding: 5px 7px !important;
  }
  html body.khaokho-theme.ploysea-theme .booking-capacity-status strong {
    font-size: 9.5px !important;
  }
  html body.khaokho-theme.ploysea-theme .booking-capacity-status span {
    font-size: 8.2px !important;
  }
  html body.khaokho-theme.ploysea-theme .booking-form .booking-price-summary {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    gap: 3px 5px !important;
    padding: 6px 7px !important;
  }
  html body.khaokho-theme.ploysea-theme .booking-price-summary > div,
  html body.khaokho-theme.ploysea-theme .booking-price-summary .booking-price-grand {
    display: block !important;
  }
  html body.khaokho-theme.ploysea-theme .booking-price-summary span {
    display: block !important;
    margin-bottom: 1px !important;
    font-size: 8.5px !important;
  }
  html body.khaokho-theme.ploysea-theme .booking-price-summary strong,
  html body.khaokho-theme.ploysea-theme .booking-price-summary .booking-price-grand strong {
    display: block !important;
    font-size: 13px !important;
  }
  html body.khaokho-theme.ploysea-theme .booking-price-summary small {
    font-size: 7.5px !important;
  }
  html body.khaokho-theme.ploysea-theme .booking-message-compact > summary {
    min-height: 31px !important;
    padding: 5px 7px !important;
    font-size: 9.5px !important;
  }
  html body.khaokho-theme.ploysea-theme .booking-form > button[type="submit"] {
    min-height: 36px !important;
    height: 36px !important;
    font-size: 11px !important;
  }
}

@media (max-width: 360px) {
  html body.khaokho-theme.ploysea-theme .booking-modal .booking-card {
    padding-left: 7px !important;
    padding-right: 7px !important;
  }
  html body.khaokho-theme.ploysea-theme .booking-selected-room p {
    max-width: 165px !important;
  }
  html body.khaokho-theme.ploysea-theme .booking-form input,
  html body.khaokho-theme.ploysea-theme .booking-form select {
    font-size: 10px !important;
  }
}
