/* =========================================================================
 *  HotelDetailAiChat.css — HotelDetail 전용 AI 예약 상담사 (룰베이스, API 비용 0)
 *  - 모든 선택자를 #hdacRoot 하위로 스코프 → 사이트 스타일과 완전 격리(충돌 0)
 *  - JS(HotelDetailAiChat.js)가 #hdacRoot 를 body 에 주입
 * ========================================================================= */
#hdacRoot{
  --hd-blue:#E8612A; --hd-blue-dark:#C24E20; --hd-blue-soft:#F0EDE8;
  --hd-orange:#E8612A; --hd-orange-soft:#fff3e0;
  --hd-green:#2e9e6b; --hd-green-soft:#e7f6ee;
  --hd-ink:#1A1611; --hd-muted:#888888; --hd-line:#E8E4DE; --hd-bg:#F7F4EF;
  --hd-gold:#1A1611; --hd-gold-soft:#fff8db;
  font-family:'Pretendard',-apple-system,BlinkMacSystemFont,'Segoe UI','Apple SD Gothic Neo',Roboto,'Malgun Gothic',sans-serif;
}
#hdacRoot *{box-sizing:border-box;-webkit-tap-highlight-color:transparent}

/* ── 플로팅 버튼 ── */
#hdacRoot .hdac-fab{position:fixed;right:22px;bottom:calc(22px + max(env(safe-area-inset-bottom, 0px), var(--app-safe-bottom, 0px)));z-index:9990;display:flex;align-items:center;gap:8px;
  background:var(--hd-blue);color:#fff;border:none;border-radius:30px;padding:13px 20px;font-size:15px;font-weight:600;
  cursor:pointer;box-shadow:0 8px 24px rgba(26,22,17,.18);transition:transform .15s, box-shadow .15s}
#hdacRoot .hdac-fab:hover{transform:translateY(-2px);box-shadow:0 12px 28px rgba(26,22,17,.24)}
#hdacRoot .hdac-fab .dot{width:8px;height:8px;border-radius:50%;background:#7CFFb2;box-shadow:0 0 0 3px rgba(124,255,178,.3)}

/* ── 카카오 문의 배너(페이지 맨 아래, HotelDetail 전용 래퍼) ──
   position:fixed 요소가 아니라 페이지 마지막 콘텐츠라, 하단까지 스크롤했을 때 배너 자체가
   내비바에 가려짐 → 배너의 기존 padding-bottom(14px)에 안전영역만큼 더한다. 인라인 style보다
   우선하도록 !important. #hdAskBannerWrap 은 HotelDetail.jsp 에서만 감싸므로 다른 페이지 무영향. */
#hdAskBannerWrap section{padding-bottom:calc(14px + max(env(safe-area-inset-bottom, 0px), var(--app-safe-bottom, 0px))) !important}

/* ── 패널 ── */
#hdacRoot .hdac-panel{position:fixed;right:22px;bottom:calc(22px + max(env(safe-area-inset-bottom, 0px), var(--app-safe-bottom, 0px)));z-index:9991;width:390px;max-width:calc(100vw - 24px);height:640px;max-height:calc(100vh - 40px - max(env(safe-area-inset-bottom, 0px), var(--app-safe-bottom, 0px)));
  background:#fff;border-radius:18px;box-shadow:0 18px 50px rgba(20,28,60,.28);display:none;flex-direction:column;overflow:hidden;border:1px solid var(--hd-line);overscroll-behavior:contain}
#hdacRoot .hdac-panel.open{display:flex;animation:hdacUp .22s ease}
@keyframes hdacUp{from{opacity:0;transform:translateY(16px)}to{opacity:1;transform:none}}

#hdacRoot .hdac-head{background:var(--hd-blue);color:#fff;padding:14px 16px;display:flex;align-items:center;gap:11px}
#hdacRoot .hdac-head .ava{width:38px;height:38px;border-radius:50%;background:rgba(255,255,255,.18);display:flex;align-items:center;justify-content:center;font-size:20px}
#hdacRoot .hdac-head .tt{flex:1;min-width:0}
#hdacRoot .hdac-head .tt b{font-size:15px;display:block;line-height:1.2}
#hdacRoot .hdac-head .tt span{font-size:11.5px;opacity:.85;display:flex;align-items:center;gap:5px}
#hdacRoot .hdac-head .tt span i{width:7px;height:7px;border-radius:50%;background:#7CFFb2;display:inline-block}
#hdacRoot .hdac-head .hdac-close{background:rgba(255,255,255,.15);border:none;color:#fff;width:30px;height:30px;border-radius:8px;font-size:17px;cursor:pointer;line-height:1}
#hdacRoot .hdac-head .hdac-close:hover{background:rgba(255,255,255,.28)}

#hdacRoot .hdac-body{flex:1;overflow-y:auto;padding:16px 14px 18px;background:var(--hd-bg);position:relative;overscroll-behavior:contain;-webkit-overflow-scrolling:touch;touch-action:pan-y}
#hdacRoot .hdac-body::-webkit-scrollbar{width:7px}
#hdacRoot .hdac-body::-webkit-scrollbar-thumb{background:#E8E4DE;border-radius:4px}

/* 말풍선 */
#hdacRoot .hdac-row{display:flex;gap:9px;margin-bottom:13px;align-items:flex-start}
#hdacRoot .hdac-row .bava{width:30px;height:30px;border-radius:50%;background:var(--hd-blue-soft);display:flex;align-items:center;justify-content:center;font-size:16px;flex-shrink:0;margin-top:2px}
#hdacRoot .hdac-bubble{background:#fff;border:1px solid var(--hd-line);border-radius:4px 14px 14px 14px;padding:11px 13px;font-size:13.5px;line-height:1.62;max-width:84%;white-space:pre-line;color:var(--hd-ink)}
#hdacRoot .hdac-row.me{justify-content:flex-end}
#hdacRoot .hdac-row.me .hdac-bubble{background:var(--hd-blue);color:#fff;border:none;border-radius:14px 4px 14px 14px}

/* 선택 카드 */
#hdacRoot .hdac-cards{display:grid;gap:9px;margin:2px 0 6px 39px}
#hdacRoot .hdac-card{background:#fff;border:1px solid var(--hd-line);border-radius:12px;padding:12px 13px;cursor:pointer;display:flex;align-items:center;gap:11px;transition:.13s;text-align:left;width:100%}
#hdacRoot .hdac-card:hover{border-color:var(--hd-blue);background:var(--hd-blue-soft);transform:translateY(-1px)}
#hdacRoot .hdac-card .ic{font-size:21px;width:38px;height:38px;background:var(--hd-blue-soft);border-radius:10px;display:flex;align-items:center;justify-content:center;flex-shrink:0}
#hdacRoot .hdac-card .tx b{font-size:13.5px;display:block}
#hdacRoot .hdac-card .tx small{font-size:11.5px;color:var(--hd-muted)}

/* 프로모션 카드 */
#hdacRoot .hdac-promo{background:#fff;border:1px solid var(--hd-line);border-radius:12px;padding:11px 12px;cursor:pointer;transition:.13s;margin-bottom:8px}
#hdacRoot .hdac-promo:hover{border-color:var(--hd-orange);background:var(--hd-orange-soft)}
#hdacRoot .hdac-badge{display:inline-block;font-size:11px;font-weight:700;color:#fff;border-radius:11px;padding:2px 9px;vertical-align:middle}
#hdacRoot .hdac-b-orange{background:var(--hd-orange)}
#hdacRoot .hdac-b-green{background:var(--hd-green)}
#hdacRoot .hdac-promo .pn{font-weight:600;font-size:13px;margin-left:6px;vertical-align:middle}
#hdacRoot .hdac-promo .pd{font-size:11.5px;color:var(--hd-muted);margin-top:5px}

/* 결과(요금제) 카드 */
#hdacRoot .hdac-res{background:#fff;border:1px solid var(--hd-line);border-radius:12px;padding:11px 12px;margin-bottom:8px}
#hdacRoot .hdac-res.vip{border-color:#d9c46a;background:var(--hd-gold-soft)}
#hdacRoot .hdac-res .rt{display:flex;justify-content:space-between;align-items:flex-start;gap:8px}
#hdacRoot .hdac-res .room{font-weight:600;font-size:13.5px}
#hdacRoot .hdac-res .rate{font-size:11.5px;color:var(--hd-muted);margin-top:2px}
#hdacRoot .hdac-res .price{font-weight:700;font-size:14px;color:var(--hd-blue);white-space:nowrap}
#hdacRoot .hdac-res .price small{font-weight:500;font-size:10px;color:var(--hd-muted)}
/* 해외 호텔 원화 환산 — 금액 아래 줄(블록) / 예상가격 옆(인라인) */
#hdacRoot .krw{display:block;font-size:10.5px;color:var(--hd-muted);font-weight:500;margin-top:1px;white-space:nowrap}
#hdacRoot .krw-i{font-size:11px;color:#5a7a68;font-weight:500;white-space:nowrap}
#hdacRoot .hdac-vbadge{display:inline-block;background:var(--hd-gold);color:#fff;font-size:10.5px;font-weight:700;border-radius:20px;padding:2px 8px;margin-bottom:6px}
/* 결과 카드 조식/침대 메타 */
#hdacRoot .hdac-res-meta{display:flex;flex-wrap:wrap;gap:5px;margin-top:7px}
#hdacRoot .rm-chip{font-size:11px;background:#eef1f6;color:#475063;border:1px solid #E8E4DE;border-radius:6px;padding:3px 8px}
#hdacRoot .rm-chip.on{background:var(--hd-green-soft);color:#1c7a4d;border-color:#bfe6d2}
#hdacRoot .rm-chip.off{background:#f3f4f6;color:#8a9099;border-color:#E8E4DE}
#hdacRoot .hdac-tags{display:flex;flex-wrap:wrap;gap:5px;margin-top:8px}
#hdacRoot .hdac-tags span{font-size:11px;background:#fff4cf;color:#7a5a00;border:1px solid #ecd98a;border-radius:6px;padding:3px 7px}
#hdacRoot .hdac-res .book{display:inline-block;margin-top:9px;background:var(--hd-blue);color:#fff;font-size:12px;font-weight:600;border:none;border-radius:8px;padding:7px 13px;cursor:pointer;text-decoration:none}
#hdacRoot .hdac-res .book:hover{background:var(--hd-blue-dark)}

#hdacRoot .hdac-alert{border-radius:12px;padding:12px 13px;font-size:13px;line-height:1.6;margin-bottom:8px;white-space:pre-line}
#hdacRoot .hdac-alert.warn{background:var(--hd-orange-soft);border:1px solid #ffd9a8;color:#8a4b00}
#hdacRoot .hdac-alert.info{background:var(--hd-blue-soft);border:1px solid #c7d2f5;color:#E8612A}

/* 빠른 액션 */
#hdacRoot .hdac-quick{display:flex;flex-wrap:wrap;gap:7px;margin:4px 0 8px 39px}
#hdacRoot .hdac-quick button{background:#fff;border:1px solid var(--hd-line);border-radius:18px;padding:7px 13px;font-size:12px;cursor:pointer;color:var(--hd-ink)}
#hdacRoot .hdac-quick button:hover{border-color:var(--hd-blue);color:var(--hd-blue)}

#hdacRoot .hdac-foot{padding:8px 12px;border-top:1px solid var(--hd-line);background:#fff;text-align:center;font-size:10.5px;color:#aab0bd}

/* 유형 안내 링크 / 요청기재 / VIP 라벨 */
#hdacRoot .hdac-link{display:inline-block;font-size:12.5px;color:var(--hd-blue);font-weight:600;text-decoration:none;background:var(--hd-blue-soft);border:1px solid #c7d2f5;border-radius:8px;padding:7px 12px}
#hdacRoot .hdac-link:hover{background:#e2e8fb}
#hdacRoot .hdac-reqnote{margin-top:9px;font-size:11.5px;line-height:1.5;color:#8a4b00;background:var(--hd-orange-soft);border:1px solid #ffd9a8;border-radius:7px;padding:7px 9px}
#hdacRoot .hdac-tagslabel{font-size:10.5px;color:#7a5a00;font-weight:700;margin:8px 0 4px}

/* 요청형 처리 순서 스텝 + 가격 안내 */
#hdacRoot .hdac-steps{display:flex;flex-wrap:wrap;align-items:center;gap:5px;background:#fff;border:1px solid var(--hd-line);border-radius:10px;padding:10px}
#hdacRoot .hstep{display:flex;align-items:center;gap:5px;font-size:11.5px;font-weight:600;color:#475063;background:#f3f5f9;border-radius:16px;padding:5px 9px}
#hdacRoot .hstep-n{display:inline-flex;align-items:center;justify-content:center;width:16px;height:16px;border-radius:50%;background:#E8E4DE;color:#fff;font-size:10px;font-weight:700}
#hdacRoot .hstep.done{background:var(--hd-green-soft);color:#1c7a4d}
#hdacRoot .hstep.done .hstep-n{background:var(--hd-green)}
#hdacRoot .hstep-arr{color:#b0b6c2;font-size:12px}
#hdacRoot .hdac-pricenote{margin-top:9px;font-size:12px;line-height:1.55;color:#8a4b00;background:#fff8e1;border:1px solid #f0d98a;border-radius:8px;padding:9px 11px}

/* 추천 뱃지 */
#hdacRoot .hdac-rec{display:inline-block;background:#fff3cd;color:#8a6d00;border:1px solid #f0d98a;font-size:10.5px;font-weight:700;border-radius:20px;padding:2px 8px}
/* 비교표 */
#hdacRoot .hdac-table{width:100%;border-collapse:collapse;font-size:12px;background:#fff;border:1px solid var(--hd-line);border-radius:12px;overflow:hidden}
#hdacRoot .hdac-table th{background:var(--hd-blue-soft);color:#E8612A;font-weight:700;padding:8px 6px;text-align:center;font-size:11.5px}
#hdacRoot .hdac-table td{padding:8px 6px;border-top:1px solid var(--hd-line);text-align:center;vertical-align:middle}
#hdacRoot .hdac-table td:first-child{text-align:left}
#hdacRoot .hdac-table td.num{font-weight:700;color:var(--hd-blue);white-space:nowrap}
#hdacRoot .hdac-table .sub{color:#9aa0ac;font-size:10.5px}

/* 프로모션 요약(해당요금제/예약날짜/체크인-아웃) */
#hdacRoot .hdac-pinfo{background:var(--hd-blue-soft);border:1px solid #d7e0f7;border-radius:10px;padding:10px 12px}
#hdacRoot .pi-line{display:flex;gap:8px;font-size:12.5px;line-height:1.65}
#hdacRoot .pi-line+.pi-line{margin-top:3px}
#hdacRoot .pi-k{flex-shrink:0;color:#E8612A;font-weight:700;min-width:108px}
#hdacRoot .pi-v{color:var(--hd-ink);word-break:break-word}
/* 해당 요금제 강조 박스 */
#hdacRoot .pi-rate-box{background:#fff;border:1.5px solid #f0b97a;border-radius:9px;padding:10px 11px;margin-bottom:9px}
#hdacRoot .pi-rate-label{font-size:12px;color:#b85c00;font-weight:700;margin-bottom:7px}
#hdacRoot .pi-rate-vals{display:flex;flex-wrap:wrap;gap:6px}
#hdacRoot .pi-rate-chip{display:inline-block;background:#fff3e0;color:#b85c00;border:1px solid #f0b97a;border-radius:7px;padding:5px 11px;font-size:13.5px;font-weight:700}
#hdacRoot .pi-rate-chip.vip{background:#111;color:#fff;border-color:#111;border-radius:20px}
#hdacRoot .pi-rate-hint{font-size:11px;color:#a06a2a;margin-top:7px;line-height:1.5}

/* VIP 적용 가능 혜택 집계 박스 */
#hdacRoot .hdac-vipbox{background:var(--hd-gold-soft);border:1.5px solid #e0c96a;border-radius:10px;padding:10px 12px}
#hdacRoot .hdac-vipbox-label{font-size:12px;color:#7a5a00;font-weight:700;margin-bottom:7px}

/* 예약 2차 확인 카드 */
#hdacRoot .hdac-confirm{background:#fff;border:1.5px solid var(--hd-blue);border-radius:12px;padding:13px 14px}
#hdacRoot .hdac-confirm.cancelled{opacity:.55}
#hdacRoot .cf-title{font-size:13.5px;font-weight:700;color:var(--hd-blue-dark);margin-bottom:9px}
#hdacRoot .cf-row{display:flex;justify-content:space-between;gap:10px;font-size:12.5px;padding:5px 0;border-bottom:1px dashed var(--hd-line)}
#hdacRoot .cf-row span{color:var(--hd-muted);flex-shrink:0}
#hdacRoot .cf-row b{text-align:right}
#hdacRoot .cf-price{color:var(--hd-blue);font-size:14px}
#hdacRoot .cf-est{margin-top:10px;background:var(--hd-green-soft);border:1px solid #bfe6d2;border-radius:9px;padding:10px 11px}
#hdacRoot .cf-est-label{font-size:11.5px;font-weight:700;color:#1c7a4d;margin-bottom:4px}
#hdacRoot .cf-est-val{font-size:16px;font-weight:700;color:#1c7a4d}
#hdacRoot .cf-est-note{font-size:11px;color:#5a7a68;margin-top:5px;line-height:1.5}
#hdacRoot .cf-est-disc{font-size:12.5px;color:#1c7a4d;font-weight:500;margin-top:2px}
#hdacRoot .rm-est-disc{font-size:12px;color:#2f7a56;margin-top:3px}
#hdacRoot .rm-est-disc span{font-size:10.5px;color:#5a7a68}
/* 확인창 요청사항 안내 */
#hdacRoot .cf-req{margin-top:10px;font-size:11.5px;line-height:1.5;color:#8a4b00;background:var(--hd-orange-soft);border:1px solid #ffd9a8;border-radius:8px;padding:8px 10px}
/* 결과 카드 업그레이드 보장 안내 */
#hdacRoot .rm-upg{margin-top:9px;background:#eef4ff;border:1px solid #c7d8f5;border-radius:8px;padding:8px 10px;font-size:12.5px;line-height:1.55;color:#E8612A;white-space:pre-line}
#hdacRoot .rm-upg.warn{background:var(--hd-orange-soft);border-color:#ffd9a8;color:#8a4b00}
#hdacRoot .rm-upg-basis{font-size:11px;color:#6b82b8}
/* 결과 카드 1박무료 예상가격(예약 버튼 위) */
#hdacRoot .rm-est{margin-top:9px;background:var(--hd-green-soft);border:1px solid #bfe6d2;border-radius:8px;padding:7px 10px;font-size:12.5px;color:#1c7a4d}
#hdacRoot .rm-est b{font-size:13.5px}
#hdacRoot .rm-est span{font-size:11px;color:#5a7a68}
#hdacRoot .cf-vip{margin-top:9px;background:var(--hd-gold-soft);border:1px solid #ecd98a;border-radius:8px;padding:8px 10px}
#hdacRoot .cf-vip-label{font-size:11px;font-weight:700;color:#7a5a00;margin-bottom:5px}
#hdacRoot .cf-btns{display:flex;gap:8px;margin-top:12px}
#hdacRoot .cf-go{flex:1;background:var(--hd-blue);color:#fff;border:none;border-radius:9px;padding:10px;font-size:13px;font-weight:700;cursor:pointer}
#hdacRoot .cf-go:hover{background:var(--hd-blue-dark)}
#hdacRoot .cf-cancel{background:#fff;border:1px solid var(--hd-line);border-radius:9px;padding:10px 14px;font-size:13px;cursor:pointer;color:var(--hd-muted)}
#hdacRoot .cf-cancelled{font-size:12px;color:#999}

/* 프로모션 상세 내용(descKr 전체) */
#hdacRoot .hdac-promodesc{background:#fff;border:1px solid var(--hd-line);border-radius:10px;padding:11px 12px}
#hdacRoot .hdac-promodesc-label{font-size:12px;color:var(--hd-blue-dark);font-weight:700;margin-bottom:6px}
#hdacRoot .hdac-promodesc-body{font-size:12.5px;line-height:1.62;color:#333;white-space:pre-line;word-break:break-word}
#hdacRoot .hdac-promodesc-body a{color:#d33;font-weight:700}
#hdacRoot .hdac-promodesc-body img{max-width:100%;height:auto}

/* 로딩/안내 */
#hdacRoot .hdac-skel{font-size:13px;color:var(--hd-muted);padding:4px 0 0 39px}

@media (max-width:480px){
  #hdacRoot .hdac-panel{right:0;left:0;bottom:0;width:100vw;max-width:100vw;height:82vh;max-height:82vh;border-radius:18px 18px 0 0}
  #hdacRoot .hdac-fab{right:16px;bottom:calc(16px + max(env(safe-area-inset-bottom, 0px), var(--app-safe-bottom, 0px)))}
}
