/* =====================================================================
 * 스테이럭스 호텔 예약 문의
 * - 호텔 상세: 호텔 예약 문의 버튼 / 문의 모달
 * - 내 문의 목록 / 상세
 * ===================================================================== */

/* ---------------------------------------------------------------------
 * 호텔 상세 - 상담 버튼 그룹 ([호텔 예약 문의] [카카오톡 상담])
 * --------------------------------------------------------------------- */
/*
 * 호텔 예약 문의 안내 + 버튼 (객실 카드의 요금 목록 하단 / 요금 없음)
 * - 카카오톡 상담 버튼은 노출하지 않음 (기능은 hotel-view.html 에 유지)
 * - 버튼 : 부드러운 블루 배경(테두리 · 진한 블루 글자)으로 예약하기(블랙) 버튼과 구분, 안내 문구와 함께 띠 형태로 노출
 */
.rate-kakao-consult.hotel-inquiry-cta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  min-height: 0;
  padding: 12px 14px;
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  border-radius: 12px;
  text-align: left;
}

/* stayluxe-hotel-detail.css 의 #rooms .rate-kakao-consult (투명 · 오른쪽 정렬) 덮어쓰기 */
#rooms .rate-kakao-consult.hotel-inquiry-cta {
  justify-content: space-between;
  margin-top: 0.6rem;
  padding: 12px 14px;
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  border-radius: 12px;
}

/* 요금 없음 : 안내 문구 없이 버튼만 (띠 배경 없이 오른쪽 정렬) */
.rate-kakao-consult.hotel-inquiry-cta.no-rate,
#rooms .rate-kakao-consult.hotel-inquiry-cta.no-rate {
  justify-content: flex-end;
  margin-top: 0;
  padding: 0;
  background: none;
  border: 0;
  border-radius: 0;
}

.hotel-inquiry-cta-text {
  flex: 1 1 260px;
  min-width: 0;
  line-height: 1.5;
}

.hotel-inquiry-cta-text strong {
  display: block;
  font-size: 0.85rem;
  color: #1e3a8a;
}

.hotel-inquiry-cta-text span {
  display: block;
  margin-top: 2px;
  font-size: 0.78rem;
  color: #475569;
}

.btn-hotel-inquiry {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  flex-shrink: 0;
  padding: 0.6rem 1.15rem;
  background: #dbeafe;
  color: #1e40af;
  border: 1px solid #bfdbfe;
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 700;
  line-height: 1;
  white-space: nowrap;
  cursor: pointer;
  box-shadow: none;
  transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.btn-hotel-inquiry:hover {
  background: #cfe0fd;
  border-color: #93c5fd;
  color: #1e3a8a;
}

.btn-hotel-inquiry:focus-visible {
  outline: 3px solid #93c5fd;
  outline-offset: 2px;
}

.btn-hotel-inquiry svg {
  width: 17px;
  height: 17px;
  flex-shrink: 0;
}

@media (max-width: 480px) {
  .rate-kakao-consult.hotel-inquiry-cta,
  #rooms .rate-kakao-consult.hotel-inquiry-cta {
    flex-direction: column;
    align-items: stretch;
    padding: 12px;
  }

  .rate-kakao-consult.hotel-inquiry-cta.no-rate,
  #rooms .rate-kakao-consult.hotel-inquiry-cta.no-rate {
    padding: 0;
  }

  /* 세로 배치에서는 flex-basis(260px)가 높이로 적용되어 큰 여백이 생기므로 내용 높이만 차지 */
  .hotel-inquiry-cta-text {
    flex: 0 0 auto;
  }

  .btn-hotel-inquiry {
    width: 100%;
    padding: 0.75rem 1rem;
  }
}

/* ---------------------------------------------------------------------
 * 호텔 예약 문의 모달
 * --------------------------------------------------------------------- */
.hotel-inquiry-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 4000;
}

.hotel-inquiry-overlay.active {
  display: block;
}

.hotel-inquiry-modal {
  display: none;
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  flex-direction: column;
  width: 640px;
  max-width: 94%;
  max-height: 90vh;
  overflow: hidden;
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
  z-index: 4001;
}

.hotel-inquiry-modal.active {
  display: flex;
  animation: hotelInquiryModalIn 0.22s ease-out;
}

@keyframes hotelInquiryModalIn {
  from { opacity: 0; transform: translate(-50%, -47%) scale(0.98); }
  to { opacity: 1; transform: translate(-50%, -50%) scale(1); }
}

.hotel-inquiry-header {
  flex-shrink: 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.1rem 1.5rem;
  border-bottom: 1px solid #e5e7eb;
  font-weight: 700;
  font-size: 1.05rem;
}

.hotel-inquiry-close {
  background: none;
  border: none;
  font-size: 1.5rem;
  line-height: 1;
  color: #666;
  cursor: pointer;
  padding: 0.25rem;
}

.hotel-inquiry-body {
  padding: 1.25rem 1.5rem;
  overflow-y: auto;
}

.hotel-inquiry-desc {
  margin: 0 0 1rem;
  font-size: 0.85rem;
  line-height: 1.6;
  color: #555;
  background: #f0f9ff;
  border-radius: 10px;
  padding: 0.75rem 1rem;
}

.hotel-inquiry-hours {
  margin: 0 0 1rem;
  padding: 0.75rem 1rem;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  background: #f9fafb;
  font-size: 0.82rem;
  line-height: 1.6;
  color: #4b5563;
}

.hotel-inquiry-hours strong {
  color: #111827;
  margin-right: 0.5rem;
}

.hotel-inquiry-hours span {
  font-weight: 600;
  color: #1e40af;
}

.hotel-inquiry-hours p {
  margin: 0.25rem 0 0;
  color: #6b7280;
}

.hotel-inquiry-section {
  margin-bottom: 1.5rem;
}

.hotel-inquiry-section-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: #111827;
  margin: 0 0 0.75rem;
}

.hotel-inquiry-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
}

.hotel-inquiry-field {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.hotel-inquiry-field.full {
  grid-column: 1 / -1;
}

.hotel-inquiry-field label {
  font-size: 0.8rem;
  font-weight: 600;
  color: #4b5563;
}

.hotel-inquiry-field input,
.hotel-inquiry-field select {
  width: 100%;
  padding: 0.6rem 0.75rem;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  font-size: 0.9rem;
  background: #fff;
  font-family: inherit;
}

.hotel-inquiry-field input:focus,
.hotel-inquiry-field select:focus {
  outline: none;
  border-color: #3b82f6;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
}

.hotel-inquiry-hint {
  font-size: 0.75rem;
  color: #6b7280;
}

.hotel-inquiry-nights {
  font-size: 0.8rem;
  color: #3b82f6;
  font-weight: 600;
}

.hotel-inquiry-room {
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 0.9rem 1rem;
  margin-bottom: 0.75rem;
}

.hotel-inquiry-room-title {
  font-size: 0.85rem;
  font-weight: 700;
  margin-bottom: 0.6rem;
  color: #111827;
}

.hotel-inquiry-room .hotel-inquiry-grid {
  grid-template-columns: 1fr 1fr;
}

.hotel-inquiry-child-ages {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.5rem;
  margin-top: 0.6rem;
}

.hotel-inquiry-room .booking-room-requests-accordion {
  margin-top: 0.75rem;
}

.hotel-inquiry-footer {
  flex-shrink: 0;
  display: flex;
  gap: 0.75rem;
  padding: 1rem 1.5rem;
  border-top: 1px solid #e5e5e5;
}

.hotel-inquiry-btn {
  flex: 1;
  padding: 0.85rem;
  border: none;
  border-radius: 10px;
  font-weight: 700;
  font-size: 0.95rem;
  cursor: pointer;
  font-family: inherit;
  transition: all 0.2s ease;
}

.hotel-inquiry-btn.cancel {
  background: #f5f5f5;
  color: #333;
}

.hotel-inquiry-btn.confirm {
  background: #111827;
  color: #fff;
}

.hotel-inquiry-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

@media (max-width: 600px) {
  /* 모바일 : 화면을 꽉 채우지 않고 주변 여백 + 어두운 배경이 보이는 떠 있는 카드 */
  .hotel-inquiry-modal {
    width: calc(100% - 28px);
    max-width: 480px;
    max-height: 82vh;
    max-height: 82dvh;
    border-radius: 16px;
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.35);
  }

  .hotel-inquiry-header {
    padding: 0.9rem 1rem;
    font-size: 1rem;
  }

  .hotel-inquiry-body {
    padding: 1rem;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
  }

  .hotel-inquiry-footer {
    padding: 0.75rem 1rem calc(0.75rem + env(safe-area-inset-bottom, 0px));
  }

  .hotel-inquiry-btn {
    padding: 0.75rem;
    font-size: 0.9rem;
  }

  .hotel-inquiry-desc {
    font-size: 0.8rem;
  }

  /* iOS 는 16px 미만 입력칸을 누르면 화면을 확대하므로 입력칸만 16px */
  .hotel-inquiry-field input,
  .hotel-inquiry-field select,
  .hotel-inquiry-modal select,
  .hotel-inquiry-modal textarea {
    font-size: 16px;
  }

  .hotel-inquiry-grid {
    grid-template-columns: 1fr;
  }

  .hotel-inquiry-room .hotel-inquiry-grid {
    grid-template-columns: 1fr 1fr;
  }
}

/* ---------------------------------------------------------------------
 * 내 문의 상세 (내 예약 / 내 문의 목록과 같은 폭 · 카드 형태)
 * - 컨테이너 / 헤더 / 요약 카드는 .mybookings-* (stayluxe.css + stayluxe-my-list.css) 사용
 * - 데스크톱 : 왼쪽(요약 · 상세) + 오른쪽(예약 진행, 스크롤 고정)
 * - 모바일 : 요약 → 예약 진행 → 상세 순서 1단
 * --------------------------------------------------------------------- */
/* 뒤로가기 : 예약 상세 .bookingdetail-back-button (stayluxe-booking-detail.css) 과 같은 디자인 */
.inquiry-detail-back {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.6rem 1rem;
  margin-bottom: 1.5rem;
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  color: #6b7280;
  font-size: 0.85rem;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.2s;
}

.inquiry-detail-back:hover {
  background: #f9fafb;
  color: #111827;
  border-color: #d1d5db;
}

.inquiry-detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  grid-template-areas:
    "summary side"
    "main side";
  column-gap: 1.25rem;
  align-items: start;
}

.inquiry-detail-summary { grid-area: summary; }
.inquiry-detail-main { grid-area: main; }
.inquiry-detail-side {
  grid-area: side;
  position: sticky;
  top: 6rem;
}

.inquiry-detail-summary .mybookings-card:hover {
  transform: none;
  border-color: #e5e7eb;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.inquiry-detail-summary .mybookings-hotel-name a {
  color: inherit;
  text-decoration: none;
}

.inquiry-detail-summary .mybookings-hotel-name a:hover {
  color: #2563eb;
}

/* 요약 카드 : 영문 호텔명 · 영문 객실명 */
.inquiry-summary-ename {
  margin: -0.1rem 0 0.25rem;
  font-size: 0.8rem;
  color: #6b7280;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.inquiry-summary-room-ename {
  font-weight: 400;
  color: #6b7280;
}

/* 섹션 카드 (목록 카드와 같은 테두리 · 모서리 · 그림자) */
.inquiry-view-section {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
  padding: 1rem 1.25rem;
  margin-bottom: 0.875rem;
}

.inquiry-view-section-title {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.5rem;
  margin: 0 0 0.75rem;
  padding-bottom: 0.625rem;
  border-bottom: 1px solid #e5e7eb;
  font-size: 0.95rem;
  font-weight: 700;
  color: #111827;
}

.inquiry-view-section-title small {
  font-size: 0.75rem;
  font-weight: 500;
  color: #9ca3af;
}

.inquiry-view-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
}

.inquiry-view-table th {
  width: 120px;
  padding: 0.45rem 0;
  text-align: left;
  vertical-align: top;
  font-weight: 600;
  color: #6b7280;
}

.inquiry-view-table td {
  padding: 0.45rem 0;
  color: #111827;
  word-break: break-word;
}

/* 여러 줄 입력 글(불포함사항 · 특전사항 · 담당자 메시지 등)만 줄바꿈 유지
   (td 전체에 pre-wrap 을 주면 템플릿 들여쓰기 공백까지 그려져 모바일에서 칸이 깨짐) */
.inquiry-view-table td.inquiry-view-pre {
  white-space: pre-wrap;
}

.inquiry-view-table tr + tr th,
.inquiry-view-table tr + tr td {
  border-top: 1px solid #f3f4f6;
}

.inquiry-view-amount {
  font-size: 1.1rem;
  font-weight: 700;
  color: #111827;
}

.inquiry-view-available-Y { color: #1d4ed8; font-weight: 700; }
.inquiry-view-available-N { color: #b91c1c; font-weight: 700; }

.inquiry-view-notice {
  margin-top: 0.75rem;
  padding: 0.7rem 0.875rem;
  background: #fffbeb;
  border: 1px solid #fde68a;
  border-radius: 8px;
  font-size: 0.8rem;
  line-height: 1.6;
  color: #92400e;
}

.inquiry-view-waiting {
  padding: 0.875rem 1rem;
  background: #f9fafb;
  border-radius: 8px;
  font-size: 0.85rem;
  line-height: 1.6;
  color: #6b7280;
  text-align: center;
}

/* 예약 진행 카드 (오른쪽) */
.inquiry-side-card .inquiry-view-section-title {
  margin-bottom: 0.875rem;
}

.inquiry-side-amount {
  margin-bottom: 0.875rem;
}

.inquiry-side-amount-label {
  font-size: 0.78rem;
  color: #6b7280;
}

.inquiry-side-amount-value {
  font-size: 1.5rem;
  font-weight: 700;
  color: #111827;
  line-height: 1.3;
}

.inquiry-side-amount-desc {
  margin-top: 0.15rem;
  font-size: 0.78rem;
  color: #6b7280;
}

.inquiry-view-actions {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.inquiry-view-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  padding: 0.75rem 1rem;
  border: none;
  border-radius: 8px;
  font-family: inherit;
  font-size: 0.9rem;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.2s ease;
}

.inquiry-view-btn.primary { background: #3b82f6; color: #fff; }
.inquiry-view-btn.primary:hover { background: #2563eb; }
.inquiry-view-btn.blue { background: #3b82f6; color: #fff; }
.inquiry-view-btn.blue:hover { background: #2563eb; }
.inquiry-view-btn.outline { background: #fff; color: #374151; border: 1px solid #d1d5db; }
.inquiry-view-btn.outline:hover { background: #f9fafb; }

.inquiry-view-action-desc {
  font-size: 0.78rem;
  line-height: 1.5;
  color: #6b7280;
  text-align: center;
}

.inquiry-view-expired {
  padding: 0.6rem;
  border-radius: 8px;
  background: #f3f4f6;
  color: #6b7280;
  font-size: 0.85rem;
  font-weight: 700;
  text-align: center;
}

.inquiry-side-help {
  margin-top: 0.875rem;
  padding-top: 0.75rem;
  border-top: 1px solid #f3f4f6;
  font-size: 0.75rem;
  line-height: 1.6;
  color: #9ca3af;
}

.inquiry-side-help a {
  color: #2563eb;
}

/* 이력 */
.inquiry-view-history {
  list-style: none;
  margin: 0;
  padding: 0;
  font-size: 0.84rem;
}

.inquiry-view-history li {
  padding: 0.55rem 0;
  border-bottom: 1px solid #f3f4f6;
  color: #374151;
}

.inquiry-view-history li:first-child {
  padding-top: 0;
}

.inquiry-view-history li:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.inquiry-view-history .history-date {
  margin-right: 0.75rem;
  font-size: 0.78rem;
  color: #9ca3af;
}

.inquiry-view-history .history-memo {
  margin-top: 0.25rem;
  white-space: pre-wrap;
  word-break: break-word;
  line-height: 1.6;
}

.inquiry-request-group {
  margin-bottom: 0.5rem;
}

.inquiry-request-group:last-child {
  margin-bottom: 0;
}

.inquiry-request-group strong {
  display: block;
  margin-bottom: 0.15rem;
  font-size: 0.8rem;
  color: #4b5563;
}

@media (max-width: 1024px) {
  .inquiry-detail-layout {
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas:
      "summary"
      "side"
      "main";
  }

  .inquiry-detail-side {
    position: static;
  }
}

@media (max-width: 600px) {
  .inquiry-view-section {
    padding: 0.875rem 1rem;
  }

  .inquiry-view-table th {
    width: 96px;
    word-break: keep-all;
  }
}

/* ---------------------------------------------------------------------
 * 문의 → 예약 진행 절차 안내 (fragment: site/stayluxe/inquiry/fragment :: inquirySteps)
 * --------------------------------------------------------------------- */
.inquiry-steps {
  margin: 0 0 1.25rem;
}

.inquiry-steps-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 0.5rem;
}

.inquiry-step {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 0.75rem 0.4rem;
  border-radius: 10px;
  background: #f9fafb;
  border: 1px solid #e5e7eb;
  color: #6b7280;
}

.inquiry-step-no {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: #e5e7eb;
  color: #4b5563;
  font-size: 0.75rem;
  font-weight: 700;
  margin-bottom: 0.35rem;
}

.inquiry-step-title {
  font-size: 0.8rem;
  font-weight: 700;
  color: #374151;
}

.inquiry-step-desc {
  font-size: 0.7rem;
  line-height: 1.4;
  margin-top: 0.2rem;
}

.inquiry-step.done {
  background: #eff6ff;
  border-color: #bfdbfe;
}

.inquiry-step.done .inquiry-step-no {
  background: #93c5fd;
  color: #fff;
}

.inquiry-step.current {
  background: #1d4ed8;
  border-color: #1d4ed8;
  color: #dbeafe;
}

.inquiry-step.current .inquiry-step-no {
  background: #fff;
  color: #1d4ed8;
}

.inquiry-step.current .inquiry-step-title {
  color: #fff;
}

.inquiry-steps-more {
  margin-top: 0.5rem;
  font-size: 0.78rem;
  color: #6b7280;
  text-align: right;
}

.inquiry-steps-more a {
  color: #2563eb;
  text-decoration: underline;
}

@media (max-width: 600px) {
  .inquiry-steps-list {
    grid-template-columns: 1fr;
    gap: 0.35rem;
  }

  .inquiry-step {
    flex-direction: row;
    align-items: center;
    text-align: left;
    gap: 0.6rem;
    padding: 0.55rem 0.75rem;
  }

  .inquiry-step-no {
    margin-bottom: 0;
    flex-shrink: 0;
  }

  .inquiry-step-desc {
    margin-top: 0;
    margin-left: auto;
    text-align: right;
  }
}
