.hostel-chat {
  --hostel-chat-navy: #123b59;
  --hostel-chat-blue: #126b94;
  --hostel-chat-pale: #edf6fa;
  position: fixed;
  z-index: 900;
  right: max(20px, env(safe-area-inset-right));
  bottom: max(20px, env(safe-area-inset-bottom));
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 12px;
  width: min(400px, calc(100vw - 32px));
  max-width: calc(100vw - 32px);
  color: #17364b;
  font-family: inherit;
  font-size: 15px;
  line-height: 1.5;
  text-align: left;
  pointer-events: none;
  -webkit-text-size-adjust: 100%;
}
.hostel-chat *, .hostel-chat *::before, .hostel-chat *::after { box-sizing: border-box; }
.hostel-chat [hidden] { display: none !important; }
.hostel-chat button, .hostel-chat input, .hostel-chat a { font-family: inherit; }
.hostel-chat button { cursor: pointer; margin: 0; }
.hostel-chat a { text-decoration: none; }
.hostel-chat button:focus-visible, .hostel-chat a:focus-visible, .hostel-chat input:focus-visible, .hostel-chat__log:focus-visible {
  outline: 3px solid #e58d2d;
  outline-offset: 3px;
}
.hostel-chat__icon { width: 23px; height: 23px; flex: 0 0 auto; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.hostel-chat__launcher {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 11px;
  min-height: 56px;
  max-width: 100%;
  padding: 14px 21px;
  border: 1px solid rgba(255,255,255,.25);
  border-radius: 999px;
  background: var(--hostel-chat-navy);
  color: #fff;
  box-shadow: 0 7px 26px rgba(13,42,65,.24);
  font-size: 15px;
  font-weight: 700;
  line-height: 1.3;
  pointer-events: auto;
  transition: background-color .15s ease;
}
.hostel-chat__launcher:hover { background: var(--hostel-chat-blue); }
.hostel-chat__panel {
  display: flex;
  flex-direction: column;
  width: 100%;
  height: 630px;
  max-height: calc(100vh - 108px - env(safe-area-inset-bottom));
  max-height: calc(100dvh - 108px - env(safe-area-inset-bottom));
  overflow: auto;
  overscroll-behavior: contain;
  border: 1px solid #d9e5ec;
  border-radius: 22px;
  background: #fff;
  box-shadow: 0 15px 70px rgba(13,42,65,.22), 0 2px 10px rgba(13,42,65,.08);
  pointer-events: auto;
}
.hostel-chat__panel:focus { outline: none; }
.hostel-chat__header { display: flex; flex: 0 0 auto; align-items: flex-start; gap: 12px; padding: 20px 16px 19px 21px; background: var(--hostel-chat-navy); color: #fff; }
.hostel-chat__avatar { display: grid; place-items: center; width: 42px; height: 42px; flex: 0 0 42px; margin-top: 3px; border: 1px solid #ffffff60; border-radius: 50%; background: #d9edf4; color: var(--hostel-chat-navy); font-size: 24px; font-weight: 700; }
.hostel-chat__heading { flex: 1; min-width: 0; }
.hostel-chat__eyebrow { display: block; color: #b9e6f4; font-size: 10px; font-weight: 700; letter-spacing: .12em; line-height: 1.5; }
.hostel-chat__title { margin: 5px 0 7px; color: #fff; font-family: inherit; font-size: 21px; font-weight: 700; letter-spacing: -.025em; line-height: 1.16; }
.hostel-chat__description { margin: 0; color: #e4f0f7; font-size: 12px; line-height: 1.55; }
.hostel-chat__close { display: inline-flex; align-items: center; justify-content: center; width: 44px; min-width: 44px; height: 44px; padding: 0; border: 1px solid rgba(255,255,255,.28); border-radius: 50%; background: transparent; color: #fff; }
.hostel-chat__close:hover { background: rgba(255,255,255,.12); }
.hostel-chat__shortcuts { display: flex; flex-wrap: wrap; flex: 0 0 auto; gap: 6px; padding: 10px 17px; border-bottom: 1px solid #e2ebf0; background: #fff; }
.hostel-chat__shortcut { min-height: 44px; padding: 8px 10px; border: 1px solid #c9dfe9; border-radius: 10px; background: #fff; color: var(--hostel-chat-navy); font-size: 13px; font-weight: 650; line-height: 1.35; text-align: center; }
.hostel-chat__shortcut:hover { border-color: var(--hostel-chat-blue); background: var(--hostel-chat-pale); }
.hostel-chat__log { display: flex; flex: 1 1 auto; flex-direction: column; gap: 13px; min-height: 120px; padding: 18px 17px; overflow-y: auto; overscroll-behavior: contain; background: #f4f8fa; scrollbar-width: thin; }
.hostel-chat__message { flex: 0 0 auto; max-width: 95%; padding: 12px 14px; border: 1px solid #dfebf1; border-radius: 15px 15px 15px 4px; background: #fff; overflow-wrap: anywhere; }
.hostel-chat__message--user { align-self: flex-end; border-color: #d5e8f2; border-radius: 15px 15px 4px 15px; background: #e4f1f7; }
.hostel-chat__speaker { display: block; margin-bottom: 4px; color: #50697b; font-size: 11px; font-weight: 700; line-height: 1.4; }
.hostel-chat__text { margin: 0; color: #17364b; font-size: 14px; line-height: 1.6; white-space: pre-wrap; }
.hostel-chat__answer-links { display: flex; flex-direction: column; align-items: flex-start; gap: 3px; margin-top: 7px; }
.hostel-chat__answer-link { display: inline-flex; align-items: center; min-height: 44px; padding: 5px 0; color: #075d89; font-size: 14px; font-weight: 700; line-height: 1.45; text-decoration: underline !important; text-underline-offset: 3px; }
.hostel-chat__answer-link:hover { color: #17364b; }
.hostel-chat__choices { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 13px; }
.hostel-chat__choice { min-height: 44px; border: 1px solid #b7d3df; border-radius: 10px; background: #edf6fa; color: #123b59; padding: 8px 11px; font-size: 13px; line-height: 1.35; font-weight: 650; text-align: left; }
.hostel-chat__choice:hover { background: #dceef6; border-color: #126b94; }
.hostel-chat__form { display: flex; flex: 0 0 auto; align-items: center; gap: 8px; padding: 13px 17px; border-top: 1px solid #e2ebf0; background: #fff; }
.hostel-chat__input { flex: 1; min-width: 0; min-height: 46px; width: 100%; padding: 11px 12px; border: 1px solid #bacfda; border-radius: 11px; background: #fff; color: #17364b; font-size: 16px; line-height: 1.4; }
.hostel-chat__input::placeholder { color: #5a7180; opacity: 1; }
.hostel-chat__send { display: inline-flex; flex: 0 0 46px; align-items: center; justify-content: center; min-height: 46px; width: 46px; padding: 0; border: 0; border-radius: 11px; background: var(--hostel-chat-blue); color: #fff; }
.hostel-chat__send:hover { background: var(--hostel-chat-navy); }
.hostel-chat__handoff { flex: 0 0 auto; padding: 0 17px 15px; background: #fff; }
.hostel-chat__whatsapp { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 46px; padding: 10px 13px; border: 1px solid #c9dfe9; border-radius: 11px; background: var(--hostel-chat-pale); color: var(--hostel-chat-navy); font-size: 14px; font-weight: 700; line-height: 1.4; }
.hostel-chat__whatsapp:hover { border-color: var(--hostel-chat-blue); background: #dfedf4; }
.hostel-chat__whatsapp .hostel-chat__icon { width: 20px; height: 20px; }
.hostel-chat__note { margin: 8px 0 0; color: #526875; font-size: 11px; line-height: 1.5; }
.hostel-chat__sr-only { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
@media (max-width: 480px) {
  .hostel-chat { right: max(12px, env(safe-area-inset-right)); bottom: max(12px, env(safe-area-inset-bottom)); width: calc(100vw - 24px); max-width: calc(100vw - 24px); gap: 10px; }
  .hostel-chat__panel { max-height: calc(100vh - 90px - env(safe-area-inset-bottom)); max-height: calc(100dvh - 90px - env(safe-area-inset-bottom)); border-radius: 19px; }
  .hostel-chat__launcher { min-height: 52px; padding: 12px 17px; font-size: 14px; }
  .hostel-chat__header { padding: 16px 13px 16px 17px; }
  .hostel-chat__title { font-size: 19px; }
  .hostel-chat__shortcuts { padding: 12px 13px; }
  .hostel-chat__shortcut { padding: 7px 8px; font-size: 12px; }
  .hostel-chat__log { padding: 15px 13px; }
  .hostel-chat__form { padding: 12px 13px; }
  .hostel-chat__handoff { padding: 0 13px 13px; }
}
@media (prefers-reduced-motion: reduce) {
  .hostel-chat__launcher { transition: none; }
}
