/* reservation.php 전용 — 공통은 front.css */

.dir-toggle {
  appearance: none; cursor: pointer; font: inherit; width: 100%;
  display: flex; align-items: center; gap: 7px;
  background: transparent; border: 0; padding: 2px 0;
  font-size: 13px; font-weight: 600; letter-spacing: -0.2px; color: var(--text);
}

.dir-toggle .dir-sum {
  flex: 1; min-width: 0; text-align: left;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}

.dir-toggle svg { width: 15px; height: 15px; color: var(--text-mute); }

.dir-toggle .chev { transition: transform .18s; }

.dir-toggle.is-open .chev { transform: rotate(180deg); }

.dir-toggle:hover { color: #0E7568; }

.dir-body {
  white-space: pre-line; font-size: 13px; color: #4A4D55; line-height: 1.8;
  letter-spacing: -0.2px; background: var(--surface-2);
  border-radius: 10px; padding: 12px 14px;
}

/* ===== PC (데스크톱, 1024px+) 레이아웃 ===== */
@media (min-width: 1024px) {
  :root { --maxw: 980px; --pad: 36px; }

  /* 갤러리: 낮고 넓은 배너 비율로 */
  .gallery__img { aspect-ratio: 21 / 8; }

  /* 시설정보 / Q&A: 읽기 좋은 폭으로 중앙 정렬 */

  /* 예약 탭: 2단 그리드 — 좌측 공간 선택(sticky), 우측 날짜/시간/인원/환불 */
  .tabpanel[data-panel="booking"]:not([hidden]) {
    display: grid; grid-template-columns: 400px minmax(0, 1fr);
    column-gap: 48px; align-items: start;
  }
  .tabpanel[data-panel="booking"] > section { min-width: 0; grid-column: 2; }
  .tabpanel[data-panel="booking"] > section:first-child {
    grid-column: 1; grid-row: 1 / span 4;
    position: sticky; top: 104px;
    max-height: calc(100vh - 190px); overflow-y: auto;
    padding-right: 4px;
  }
  .tabpanel[data-panel="booking"] > section:nth-child(2) { border-top: 0; }

  /* 방 사진: 데스크톱에서는 그리드로 전부 펼침 (가로 스크롤 불필요) */
  .room__photos { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; overflow: visible; scroll-snap-type: none; }
  .room__photos > picture { width: auto; height: 130px; }

  /* 달력: 과도하게 넓어지지 않게 */
  .cal { max-width: 540px; }

  /* 시간 슬롯: 4열 → 6열 */
  .slots { grid-template-columns: repeat(6, 1fr); }

  /* 하단 결제바: 페이지 폭 + 살짝 떠 있는 카드 느낌 */
  .paybar {
    border-radius: 12px 12px 0 0;
    box-shadow: 0 -6px 24px rgba(20,24,31,0.08);
    border-left: 1px solid var(--line-soft);
    border-right: 1px solid var(--line-soft);
  }
}

.chatw__avatar img {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: contain; display: block; background: #fff;
  padding: 7px; box-sizing: border-box;
}

/* 모바일: 인사말 텍스트 숨김 → 아바타만 있는 원형 버튼 */
@media (max-width: 1023px) {
  .chatw__greet { display: none; }
  .chatw__launcher { padding: 0; width: 56px; height: 56px; justify-content: center; }
  .chatw__avatar { width: 100%; height: 100%; font-size: 20px; }
}

/* ---------- PC: FAQ 리디자인 (섹션 헤더 + 라인 아코디언 + 답변 하이라이트) ---------- */
@media (min-width: 1024px) {
  #panel-faq .section__title { font-size: 19px; letter-spacing: -0.5px; padding-bottom: 14px; border-bottom: 2px solid #1A1C20; margin-bottom: 0; }
  .faq-list { display: block; }
  .faq-item { border: 0; border-bottom: 1px solid var(--line-soft); border-radius: 0; background: transparent; }
  .faq-item__q { padding: 20px 6px; font-size: 15px; font-weight: 600; transition: color .12s; }
  .faq-item__q:hover { color: #0E7568; }
  .faq-item.is-open .faq-item__q { color: #0B5F55; }
  .faq-item__badge { display: none; }
  .faq-item__chev { width: 18px; height: 18px; }
  .faq-item__a {
    margin: 0 6px 18px; padding: 16px 18px; border-top: 0;
    background: var(--surface-2); border-left: 3px solid var(--yellow);
    border-radius: 0 10px 10px 0; font-size: 14px; line-height: 1.75;
  }
}

/* PC: 탭바 제거 (모든 콘텐츠가 한 페이지 + 우측 레일로 제공됨) */
@media (min-width: 1024px) {
  .tabs { display: none; }
  .topbar__link { display: none; }  /* PC: 예약링크 버튼 숨김 */
}

/* ---------- PC 히어로 + 예약 레일 ---------- */
.bookrail { display: none; }

/* FAQ: 모바일은 faq1.html 로 분리 → 숨김, PC 본문에서만 노출 */
#panel-faq { display: none; }

/* 공간 목록: 모바일은 예약 탭(booking.html)에서 → 숨김, PC 본문에서만 노출 */
#roomListSec { display: none; }

@media (min-width: 1024px) {
  #panel-faq { display: block; }
  #roomListSec { display: block; }
  /* PC: 지점 갤러리(사진+로고+소개글)가 상단 히어로 */
  .gallery { display: block; margin: 16px var(--pad) 4px; border-radius: 14px; overflow: hidden; }
  .roomlist { border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
  .rl-item:last-child { border-bottom: 0; }
  .rl-item {
    display: flex; align-items: center; gap: 12px; width: 100%; text-align: left;
    padding: 12px 14px; background: transparent; border: 0; border-bottom: 1px solid var(--line-soft);
    cursor: pointer; font: inherit;
  }
  .rl-item:hover { background: var(--surface-2); }
  .rl-item.is-sel { background: rgba(24,196,177,0.08); box-shadow: inset 3px 0 0 var(--yellow); }
  .rl-item__thumb { width: 76px; height: 56px; border-radius: 8px; overflow: hidden; background: var(--surface-2); flex-shrink: 0; }
  .rl-item__thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
  .rl-item__info { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
  .rl-item__name { font-size: 13.5px; font-weight: 700; letter-spacing: -0.3px; }
  .rl-item__cap { font-size: 11.5px; color: var(--text-mute); letter-spacing: -0.2px; }
  .rl-item__price { text-align: right; flex-shrink: 0; }
  .rl-item__price b { font-size: 13px; font-weight: 800; }
  .rl-item__price i { display: block; font-style: normal; font-size: 10.5px; color: var(--text-mute); }

  /* 본문: 좌 콘텐츠 + 우 예약 레일 */
  .body { display: grid; grid-template-columns: minmax(0,1fr) 320px; column-gap: 40px; }
  .body > .tabpanel { grid-column: 1; }
  .body > .biz-footer { grid-column: 1 / -1; }
  .bookrail {
    display: flex; flex-direction: column; gap: 4px;
    grid-column: 2; grid-row: 1 / span 2;
    position: sticky; top: 66px; align-self: start;
    border: 1px solid var(--line); border-radius: 14px; background: #fff; overflow: hidden;
    box-shadow: 0 6px 22px rgba(20,24,31,0.08); padding-bottom: 14px;
  }
  .bookrail__thumb { position: relative; height: 150px; background: var(--surface-2); overflow: hidden; }
  .bookrail__slides { display: flex; height: 100%; overflow-x: auto; scroll-snap-type: x mandatory; scroll-behavior: smooth; scrollbar-width: none; }
  .bookrail__slides::-webkit-scrollbar { display: none; }
  .bookrail__slides picture { flex: 0 0 100%; scroll-snap-align: start; height: 100%; }
  .bookrail__slides img { width: 100%; height: 100%; object-fit: cover; display: block; }
  .bookrail__pnav {
    position: absolute; top: 50%; transform: translateY(-50%);
    width: 30px; height: 30px; border-radius: 999px; border: 0; cursor: pointer;
    background: rgba(255,255,255,0.92); color: #1A1C20;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
    display: flex; align-items: center; justify-content: center; z-index: 3;
  }
  .bookrail__pnav[hidden] { display: none; }
  .bookrail__pnav:hover { background: #fff; }
  .bookrail__pnav.prev { left: 8px; } .bookrail__pnav.next { right: 8px; }
  .bookrail__pnav svg { width: 15px; height: 15px; }
  .bookrail__pcount {
    position: absolute; right: 8px; bottom: 8px;
    background: rgba(0,0,0,0.55); color: #fff; font-size: 10.5px;
    padding: 2px 8px; border-radius: 999px;
  }
  .bookrail__pcount:empty { display: none; }
  .bookrail__name { padding: 12px 14px 0; font-size: 15px; font-weight: 800; letter-spacing: -0.3px; }
  .bookrail__cap { padding: 2px 14px 0; font-size: 12px; color: var(--text-mute); letter-spacing: -0.2px; }
  .bookrail__price { padding: 8px 14px 10px; font-size: 19px; font-weight: 800; letter-spacing: -0.5px; }
  .bookrail__price small { font-size: 12.5px; font-weight: 600; color: var(--text-dim); }
  .bookrail { max-height: calc(100vh - 90px); overflow-y: auto; }
  .bookrail__detail { padding: 0 14px 12px; border-bottom: 1px solid var(--line-soft); margin-bottom: 12px; flex: 1; min-height: 0; overflow-y: auto; }
  .bookrail__thumb, .bookrail__book, .bookrail__talk { flex-shrink: 0; }
  .bookrail__desc { margin: 0 0 10px; font-size: 12.5px; color: var(--text-dim); letter-spacing: -0.2px; line-height: 1.6; }
  .bookrail__spec { border-top: 1px solid var(--line-soft); padding-top: 10px; }
  .bookrail__spec-kit { font-size: 12.5px; font-weight: 700; letter-spacing: -0.2px; margin-bottom: 6px; }
  .bookrail__spec-row { display: flex; gap: 8px; font-size: 12px; letter-spacing: -0.2px; padding: 3px 0; }
  .bookrail__spec-row b { flex-shrink: 0; width: 48px; color: var(--text-mute); font-weight: 600; }
  .bookrail__spec-row span { color: var(--text-dim); }
  .bookrail__facts { margin-top: 10px; border-top: 1px solid var(--line-soft); }
  .bookrail__fact { display: flex; justify-content: space-between; gap: 10px; padding: 8px 0; font-size: 12.5px; letter-spacing: -0.2px; border-bottom: 1px solid var(--line-soft); }
  .bookrail__fact:last-child { border-bottom: 0; padding-bottom: 0; }
  .bookrail__fact .k { color: var(--text-dim); }
  .bookrail__fact .v { font-weight: 600; }
  .bookrail__book {
    margin: 0 14px 8px; appearance: none; border: 0; border-radius: 10px;
    background: var(--yellow); color: #fff; font: inherit; font-size: 14px; font-weight: 800;
    padding: 13px; cursor: pointer;
  }
  .bookrail__book:hover { background: var(--yellow-press); }
  .bookrail__talk {
    margin: 0 14px; appearance: none; border: 1px solid var(--line); border-radius: 10px;
    background: #fff; color: var(--text); font: inherit; font-size: 13.5px; font-weight: 700;
    padding: 12px; cursor: pointer;
    display: flex; align-items: center; justify-content: center; gap: 7px;
  }
  .bookrail__talk svg { width: 16px; height: 16px; color: var(--text-dim); }
  .bookrail__talk:hover { border-color: var(--text-dim); }
}
