/*!
 * Phong Nha Travel Child — pn-assistant.css — v3.2.0
 * AI tour assistant widget. Colours = site tokens (green #1E5B43, amber #F2A93B, ink #14231C).
 */
#pn-ai { --ai-green: #1E5B43; --ai-green-d: #164532; --ai-amber: #F2A93B; --ai-ink: #14231C; --ai-muted: #4B5B53; --ai-line: #DDE5DF; --ai-soft: #F3F6F2;
  position: fixed; right: 20px; bottom: 20px; z-index: 99990; font-family: 'Be Vietnam Pro', system-ui, -apple-system, 'Segoe UI', sans-serif; color: var(--ai-ink); }
#pn-ai *, #pn-ai *::before, #pn-ai *::after { box-sizing: border-box; }
/* the theme styles every <button>/<input> (green pill); reset inside the assistant */
#pn-ai button { background: none; color: inherit; border: 0; border-radius: 0; padding: 0; margin: 0; min-width: 0; width: auto; height: auto; box-shadow: none;
  text-transform: none; letter-spacing: normal; line-height: normal; font-size: inherit; font-weight: inherit; transform: none; }
#pn-ai input { box-shadow: none; margin: 0; }
#pn-ai button, #pn-ai input { font-family: inherit; }
#pn-ai .pn-ai-sr { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* launcher */
#pn-ai .pn-ai-launch { position: relative; display: inline-flex; align-items: center; gap: 10px; border: 0; cursor: pointer; background: var(--ai-green); color: #fff;
  padding: 10px 18px 10px 10px; border-radius: 999px; font-weight: 800; font-size: 15px; box-shadow: 0 12px 30px rgba(14, 28, 21, .3); transition: transform .2s ease, background .2s ease; }
#pn-ai .pn-ai-launch:hover { background: var(--ai-green-d); transform: translateY(-2px); }
#pn-ai .pn-ai-launch:focus-visible { outline: 3px solid var(--ai-amber); outline-offset: 3px; }
#pn-ai .pn-ai-launch-ico { width: 38px; height: 38px; border-radius: 50%; background: var(--ai-amber); color: var(--ai-ink); display: inline-flex; align-items: center; justify-content: center; }
#pn-ai .pn-ai-dot { position: absolute; top: 4px; left: 36px; width: 12px; height: 12px; border-radius: 50%; background: #E5484D; border: 2px solid #fff; display: none; }
#pn-ai.has-unread .pn-ai-dot { display: block; }
#pn-ai.is-open .pn-ai-launch { display: none; }

#pn-ai .pn-ai-tip { position: absolute; right: 0; bottom: 70px; width: max-content; max-width: 260px; display: flex; align-items: center; gap: 8px; cursor: pointer;
  background: #fff; border: 1px solid var(--ai-line); border-radius: 14px 14px 4px 14px; padding: 10px 10px 10px 14px; font-size: 14px; font-weight: 600; box-shadow: 0 10px 24px rgba(14, 28, 21, .16); }
#pn-ai .pn-ai-tip-x { border: 0; background: var(--ai-soft); color: var(--ai-muted); width: 26px; height: 26px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; cursor: pointer; flex: 0 0 26px; }

/* panel */
#pn-ai .pn-ai-panel { position: absolute; right: 0; bottom: 0; width: 384px; height: min(640px, calc(100vh - 40px)); background: #fff; border-radius: 20px; overflow: hidden;
  display: flex; flex-direction: column; box-shadow: 0 24px 60px rgba(14, 28, 21, .32); }
#pn-ai .pn-ai-panel[hidden] { display: none; }
#pn-ai .pn-ai-head { display: flex; align-items: center; gap: 10px; padding: 12px 12px 12px 14px; background: var(--ai-green); color: #fff; flex: 0 0 auto; }
#pn-ai .pn-ai-ava { width: 40px; height: 40px; flex: 0 0 40px; border-radius: 50%; background: var(--ai-amber); color: var(--ai-ink); display: inline-flex; align-items: center; justify-content: center; }
#pn-ai .pn-ai-who { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; line-height: 1.25; }
#pn-ai .pn-ai-title { font-size: 15.5px; font-weight: 800; color: #fff; }
#pn-ai .pn-ai-sub { font-size: 12px; color: #CFE3D7; display: flex; align-items: center; gap: 6px; }
#pn-ai .pn-ai-sub::before { content: ''; width: 8px; height: 8px; border-radius: 50%; background: #7FD69B; flex: 0 0 8px; }
#pn-ai .pn-ai-hbtn { width: 36px; height: 36px; flex: 0 0 36px; border-radius: 50%; border: 0; background: rgba(255, 255, 255, .14); color: #fff !important; display: inline-flex; align-items: center; justify-content: center; cursor: pointer; text-decoration: none; }
#pn-ai .pn-ai-hbtn:hover { background: rgba(255, 255, 255, .26); }
#pn-ai .pn-ai-zalo { height: 34px; padding: 0 12px; border-radius: 999px; background: #fff; color: #0068FF !important; font-weight: 800; font-size: 13.5px; display: inline-flex; align-items: center; text-decoration: none; }
#pn-ai .pn-ai-testbar { background: #FCF0E3; color: #8A4B00; font-size: 12.5px; font-weight: 700; text-align: center; padding: 5px 8px; flex: 0 0 auto; }

#pn-ai .pn-ai-list { flex: 1 1 auto; overflow-y: auto; padding: 14px 12px 8px; display: flex; flex-direction: column; gap: 10px; background: var(--ai-soft); overscroll-behavior: contain; }
#pn-ai .pn-ai-msg { padding: 10px 13px; font-size: 14.5px; line-height: 1.55; word-break: break-word; }
#pn-ai .pn-ai-msg a { color: var(--ai-green); text-decoration: underline; }
#pn-ai .pn-ai-user { align-self: flex-end; max-width: 82%; background: var(--ai-green); color: #fff; border-radius: 16px 16px 4px 16px; }
#pn-ai .pn-ai-user a { color: #fff; }
#pn-ai .pn-ai-row { align-self: flex-start; max-width: 94%; display: flex; gap: 8px; align-items: flex-end; }
#pn-ai .pn-ai-col { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
#pn-ai .pn-ai-label { font-size: 11.5px; font-weight: 700; color: var(--ai-muted); }
#pn-ai .pn-ai-bot .pn-ai-msg { background: #fff; border: 1px solid var(--ai-line); border-radius: 16px 16px 16px 4px; }
#pn-ai .pn-ai-staff .pn-ai-msg { background: #FFF4E1; border: 1px solid #F0C998; border-radius: 16px 16px 16px 4px; }
#pn-ai .pn-ai-ava-s { width: 30px; height: 30px; flex: 0 0 30px; border-radius: 50%; background: var(--ai-amber); font-weight: 800; font-size: 13px; display: inline-flex; align-items: center; justify-content: center; }
#pn-ai .pn-ai-sys { align-self: center; background: #EAF5EE; color: var(--ai-green); border: 1px solid #BFDCCB; padding: 6px 12px; border-radius: 999px; font-size: 12.5px; font-weight: 700; text-align: center; }
#pn-ai .pn-ai-typing { align-self: flex-start; background: #fff; border: 1px solid var(--ai-line); padding: 9px 14px; border-radius: 16px; font-size: 13.5px; color: var(--ai-muted); }

/* tour cards */
#pn-ai .pn-ai-cards { display: flex; flex-direction: column; gap: 8px; }
#pn-ai .pn-ai-card { display: flex; background: #fff; border: 1px solid var(--ai-line); border-radius: 14px; overflow: hidden; }
#pn-ai .pn-ai-card-img { position: relative; width: 96px; flex: 0 0 96px; min-height: 104px; background: #5E8F7A; display: block; }
#pn-ai .pn-ai-card-img img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
#pn-ai .pn-ai-dur { position: absolute; left: 6px; bottom: 6px; background: rgba(20, 35, 28, .8); color: #fff; font-size: 11px; font-weight: 700; padding: 3px 7px; border-radius: 999px; }
#pn-ai .pn-ai-card-body { flex: 1 1 auto; min-width: 0; padding: 9px 10px; display: flex; flex-direction: column; gap: 5px; }
#pn-ai .pn-ai-card-name { font-weight: 700; font-size: 13.5px; line-height: 1.35; color: var(--ai-ink) !important; text-decoration: none; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; }
#pn-ai .pn-ai-card-price { font-size: 12.5px; color: var(--ai-muted); }
#pn-ai .pn-ai-card-price strong { color: var(--ai-green); font-size: 14px; }
#pn-ai .pn-ai-card-btns { display: flex; gap: 6px; }
#pn-ai .pn-ai-btn { flex: 1 1 0; display: inline-flex; align-items: center; justify-content: center; min-height: 36px; padding: 6px 10px; border-radius: 999px; border: 0; cursor: pointer;
  font-size: 13px; font-weight: 800; text-decoration: none !important; text-align: center; line-height: 1.2; }
#pn-ai .pn-ai-btn-line { background: var(--ai-soft); border: 1px solid var(--ai-line); color: var(--ai-green) !important; }
#pn-ai .pn-ai-btn-amber { background: var(--ai-amber); color: var(--ai-ink) !important; }
#pn-ai .pn-ai-btn-amber:hover { background: #E8992A; }
#pn-ai .pn-ai-btn-green { background: var(--ai-green); color: #fff !important; }
#pn-ai .pn-ai-btn-zalo { background: #0068FF; color: #fff !important; }
#pn-ai .pn-ai-acts { display: flex; gap: 8px; }
#pn-ai .pn-ai-acts .pn-ai-btn { min-height: 40px; font-size: 13.5px; }

/* booking form inside the chat */
#pn-ai .pn-ai-book { background: #fff; border: 1px solid var(--ai-line); border-radius: 14px; padding: 12px; display: flex; flex-direction: column; gap: 9px; }
#pn-ai .pn-ai-book-title { color: var(--ai-green); font-size: 14px; line-height: 1.35; }
#pn-ai .pn-ai-book label { display: flex; flex-direction: column; gap: 4px; font-size: 12.5px; font-weight: 700; margin: 0; }
#pn-ai .pn-ai-book input { height: 42px; border: 1px solid var(--ai-line); border-radius: 10px; padding: 0 10px; font-size: 15px; font-weight: 500; color: var(--ai-ink); background: #fff; width: 100%; }
#pn-ai .pn-ai-book input:focus, #pn-ai .pn-ai-ask input:focus { outline: 2px solid #9A6415; outline-offset: 1px; border-color: transparent; }
#pn-ai .pn-ai-steps { display: flex; flex-direction: column; gap: 6px; }
#pn-ai .pn-ai-step { display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 700; }
#pn-ai .pn-ai-step span { flex: 1 1 auto; }
#pn-ai .pn-ai-step button { width: 34px; height: 34px; border-radius: 50%; border: 1px solid var(--ai-line); background: var(--ai-soft); font-size: 18px; line-height: 1; cursor: pointer; color: var(--ai-ink); }
#pn-ai .pn-ai-step output { min-width: 22px; text-align: center; font-size: 15px; }
#pn-ai .pn-ai-total { font-size: 13px; color: var(--ai-muted); }
#pn-ai .pn-ai-total strong { color: var(--ai-green); }
#pn-ai .pn-ai-err { margin: 0; font-size: 12.5px; color: #9B1C1C; background: #FDECEC; padding: 7px 9px; border-radius: 8px; }
#pn-ai .pn-ai-submit { min-height: 44px; font-size: 15px; }
#pn-ai .pn-ai-submit[disabled] { opacity: .7; cursor: wait; }
#pn-ai .pn-ai-book small { font-size: 12px; color: var(--ai-muted); text-align: center; }

/* footer */
#pn-ai .pn-ai-foot { flex: 0 0 auto; background: #fff; border-top: 1px solid var(--ai-line); padding: 9px 10px 10px; display: flex; flex-direction: column; gap: 8px; }
#pn-ai .pn-ai-chips { display: flex; gap: 7px; overflow-x: auto; scrollbar-width: none; }
#pn-ai .pn-ai-chips::-webkit-scrollbar { display: none; }
#pn-ai .pn-ai-chip { flex: 0 0 auto; white-space: nowrap; padding: 7px 12px; border-radius: 999px; border: 1px solid var(--ai-green); background: #fff; color: var(--ai-green); font-weight: 700; font-size: 13px; cursor: pointer; }
#pn-ai .pn-ai-chip:hover { background: var(--ai-soft); }
#pn-ai .pn-ai-chip-staff { background: var(--ai-amber); border-color: var(--ai-amber); color: var(--ai-ink); }
#pn-ai .pn-ai-chip-staff:hover { background: #E8992A; }
#pn-ai .pn-ai-ask { display: flex; gap: 8px; align-items: center; margin: 0; }
#pn-ai .pn-ai-ask input { flex: 1 1 auto; min-width: 0; height: 44px; border: 1px solid var(--ai-line); border-radius: 22px; padding: 0 16px; font-size: 15px; background: var(--ai-soft); color: var(--ai-ink); }
#pn-ai .pn-ai-send { width: 44px; height: 44px; flex: 0 0 44px; border-radius: 50%; border: 0; background: var(--ai-green); color: #fff; display: inline-flex; align-items: center; justify-content: center; cursor: pointer; }
#pn-ai .pn-ai-send:hover { background: var(--ai-green-d); }
#pn-ai .pn-ai-note { margin: 0; font-size: 11.5px; color: var(--ai-muted); text-align: center; line-height: 1.4; }
#pn-ai[data-status="staff"] .pn-ai-chip-staff { display: none; }

/* phones: compact launcher above the bottom contact bar, chat full screen */
@media (max-width: 767.98px) {
  #pn-ai { right: 12px; bottom: 84px; }
  #pn-ai .pn-ai-launch { padding: 0; width: 56px; height: 56px; justify-content: center; }
  #pn-ai .pn-ai-launch-ico { width: 56px; height: 56px; background: var(--ai-amber); }
  #pn-ai .pn-ai-launch-txt { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  #pn-ai .pn-ai-dot { left: auto; right: 0; top: 0; }
  #pn-ai.is-open { inset: 0; right: 0; bottom: 0; z-index: 2147483000; }
  html.pn-ai-lock .pn-mobile-bar, html.pn-ai-lock #back-top, html.pn-ai-lock .buttonizer { display: none !important; }
  #pn-ai .pn-ai-panel { position: fixed; inset: 0; width: 100%; height: 100%; border-radius: 0; }
  #pn-ai .pn-ai-list { padding-bottom: 12px; }
  #pn-ai .pn-ai-foot { padding-bottom: max(10px, env(safe-area-inset-bottom)); }
  html body #back-top, html body.pn-redesign #back-top { bottom: 152px !important; right: 25px !important; }
  html.pn-ai-lock, html.pn-ai-lock body { overflow: hidden !important; }
}
/* the theme's "back to top" button sits bottom-right too: move it up while the assistant is on */
@media (min-width: 768px) {
  /* one tidy column at the bottom-right: chat (bottom) → Messenger → back-to-top */
  html body .buttonizer.buttonizer-group { left: auto !important; top: auto !important; right: 20px !important; bottom: 92px !important; }
  html body #back-top, html body.pn-redesign #back-top { left: auto !important; right: 20px !important; bottom: 150px !important; }
  /* the welcome tip opens to the left of the chat button so it never covers Messenger */
  #pn-ai .pn-ai-tip { right: calc(100% + 12px); bottom: 6px; border-radius: 14px 14px 4px 14px; }
  /* chat panel open: hide the other floating buttons */
  html.pn-ai-open .buttonizer, html.pn-ai-open #back-top { display: none !important; }
}
@media (prefers-reduced-motion: reduce) {
  #pn-ai .pn-ai-launch { transition: none; }
}
