/* Chat: guest window, host inbox, cards in the chat. */
/* chat: guest */
.chat-fab{position:fixed;z-index:65;inset-inline-end:20px;bottom:calc(20px + env(safe-area-inset-bottom,0px));display:inline-flex;align-items:center;gap:8px;background:var(--accent);color:var(--accent-ink);border:0;border-radius:999px;padding:12px 18px;font-size:15px;font-weight:600;box-shadow:0 10px 28px rgba(0,0,0,.22);cursor:pointer}
.chat-fab .ic{width:20px;height:20px}
.chat-fab:hover{filter:brightness(1.07)}
.fab-dot{position:absolute;top:0;inset-inline-end:0;width:14px;height:14px;border-radius:50%;background:var(--danger);border:2px solid var(--surface)}
html.has-dock .chat-fab{bottom:calc(84px + env(safe-area-inset-bottom,0px))}
@media (max-width:600px){.chat-fab span{display:none}.chat-fab{padding:15px}}
@media (max-width:900px){.has-mbar-page .chat-fab{bottom:calc(84px + env(safe-area-inset-bottom,0px))}}
#chat{position:fixed;z-index:75;inset-inline-end:20px;bottom:calc(20px + env(safe-area-inset-bottom,0px));width:min(390px,calc(100% - 24px));height:min(620px,calc(100vh - 110px))}
#chat[hidden]{display:none}
.chat{height:100%;display:flex;flex-direction:column;background:var(--surface);border:1px solid var(--line);border-radius:16px;box-shadow:0 18px 50px rgba(0,0,0,.25);overflow:hidden}
.chat-h{display:flex;align-items:center;gap:10px;padding:12px 14px;border-bottom:1px solid var(--line);background:var(--paper)}
.avatar.sm{width:40px;height:40px;font-size:22px;flex:none}
.chat-ht{flex:1;display:grid;min-width:0}
.chat-ht b{font-size:15px;font-weight:600}
.chat-ht span{font-size:12px;color:var(--ink-2)}
.chat-b{flex:1;overflow-y:auto;padding:14px;display:flex;flex-direction:column;gap:10px;overscroll-behavior:contain}
.chat-f{border-top:1px solid var(--line);padding:10px}
.chat-intro{display:grid;gap:10px}
.chat-intro p{margin:0;color:var(--ink-2);font-size:15px}
.chat-empty{text-align:center;margin:auto}
.compose{display:flex;gap:8px;align-items:flex-end}
.compose textarea{flex:1;resize:none;min-height:44px;max-height:140px;border-radius:22px;padding:10px 16px;line-height:1.45}
.send-btn{width:44px;height:44px;border-radius:50%;border:0;background:var(--accent);color:var(--accent-ink);display:grid;place-items:center;cursor:pointer;flex:none}
.send-btn[disabled]{opacity:.5;cursor:default}
.msg{display:grid;gap:2px;max-width:82%}
.msg.mine{align-self:flex-end}
.msg.theirs{align-self:flex-start}
.bubble{padding:9px 13px;border-radius:16px;white-space:pre-wrap;overflow-wrap:anywhere;font-size:15px;line-height:1.5}
.msg.mine .bubble{background:var(--accent);color:var(--accent-ink);border-end-end-radius:4px}
.msg.theirs .bubble{background:var(--stone);color:var(--ink);border-end-start-radius:4px}
.msg time{font-size:11px;color:var(--ink-2);padding:0 6px}
.msg.mine time,.msg.mine .tr-note{text-align:end}
.tr-note{background:none;border:0;padding:0 6px;font-size:11px;color:var(--ink-2);cursor:pointer;text-align:start;text-decoration:underline;text-underline-offset:2px}
@media (max-width:600px){#chat{inset:0;width:auto;height:auto}.chat{border-radius:0;border:0;padding-top:env(safe-area-inset-top,0px)}.chat-f{padding-bottom:calc(10px + env(safe-area-inset-bottom,0px))}}
/* chat: host inbox */
.dr.dr-wide{width:min(1000px,100%)}
.dr-wide .dr-body{padding:0;display:flex;overflow:hidden;min-height:0}
.inbox{flex:1;display:grid;grid-template-columns:320px minmax(0,1fr);min-height:0}
.ib-list{border-inline-end:1px solid var(--line);overflow-y:auto}
.ib-item{display:grid;gap:3px;width:100%;text-align:start;background:none;border:0;border-bottom:1px solid var(--line);padding:12px 16px;cursor:pointer;color:var(--ink)}
.ib-item:hover{background:var(--paper)}
.ib-item.is-sel{background:var(--accent-soft)}
.ib-top{display:flex;justify-content:space-between;gap:8px;align-items:baseline}
.ib-top b{font-weight:500}
.ib-top time{font-size:12px;color:var(--ink-2);flex:none}
.ib-item.is-unread .ib-top b{font-weight:700}
.ib-item.is-unread .ib-top time{color:var(--accent);font-weight:600}
.ib-prev{font-size:14px;color:var(--ink-2);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.ib-meta{display:flex;gap:8px;align-items:center;font-size:12px;color:var(--ink-2)}
.lang-tag{font-style:normal;font-weight:700;font-size:11px;background:var(--stone);color:var(--ink);padding:1px 6px;border-radius:4px;letter-spacing:.04em}
.ub{width:10px;height:10px;border-radius:50%;background:var(--accent);margin-inline-start:auto}
.ib-thread{display:flex;flex-direction:column;min-height:0;min-width:0}
.ib-th{display:flex;align-items:flex-start;gap:10px;padding:14px 18px;border-bottom:1px solid var(--line)}
.ib-who{flex:1;display:grid;gap:3px;min-width:0}
.ib-who span{font-size:13px;color:var(--ink-2)}
.ib-contact{display:flex;gap:12px;flex-wrap:wrap}
.ib-contact a{display:inline-flex;gap:5px;align-items:center;color:var(--accent);text-decoration:none;font-size:13px}
.ib-contact .ic{width:15px;height:15px}
.ib-msgs{flex:1;overflow-y:auto;padding:16px 18px;display:flex;flex-direction:column;gap:10px;background:var(--paper)}
.ib-f{border-top:1px solid var(--line);padding:10px 14px}
.ib-back{display:none}
.ib-empty,.ib-pick{padding:28px;text-align:center}
@media (max-width:760px){.inbox{grid-template-columns:1fr}.inbox .ib-thread{display:none}.inbox.show-thread .ib-list{display:none}.inbox.show-thread .ib-thread{display:flex}.ib-back{display:inline-grid}}
[dir="ltr"] [dir="rtl"] .ic.flip{transform:none}
[dir="ltr"] .hero-text h1{max-width:20ch;font-size:clamp(38px,4.6vw,64px)}
/* apartment card in the chat */
.ib-wrap{flex:1;display:flex;flex-direction:column;min-height:0}
.ib-health{padding:10px 14px 0}
.ib-health:empty{display:none}
.msg.is-card{width:min(300px,82%)}
.mcard{display:grid;gap:6px;background:var(--surface);color:var(--ink);border:1px solid var(--line);border-radius:14px;padding:12px;box-shadow:var(--shadow)}
.mc-k{font-size:12px;color:var(--ink-2)}
.mc-t{font-size:15px;line-height:1.35;font-weight:600}
.mc-d{font-size:13px;color:var(--ink-2)}
.mc-ph{aspect-ratio:3/2;border-radius:10px;overflow:hidden;background:var(--stone)}
.mc-ph img{width:100%;height:100%;object-fit:cover}
.mc-check{font-size:13px;margin:0;padding:6px 8px;border-radius:6px;display:flex;gap:6px;align-items:center}
.mc-check.ok{color:var(--accent);background:var(--accent-soft)}
.mc-check.warn{color:var(--danger);background:color-mix(in srgb,var(--danger) 10%,transparent)}
.mc-check .ic{width:15px;height:15px}
/* "typing…" */
.typing{display:flex;align-items:center;gap:8px;font-size:13px;color:var(--ink-2);padding:2px 4px;align-self:flex-start}
.dots{display:inline-flex;gap:3px;background:var(--stone);border-radius:12px;padding:8px 10px}
.dots i{width:6px;height:6px;border-radius:50%;background:var(--ink-2);animation:dotpulse 1.2s infinite ease-in-out}
.dots i:nth-child(2){animation-delay:.15s}
.dots i:nth-child(3){animation-delay:.3s}
@keyframes dotpulse{0%,80%,100%{opacity:.3;transform:translateY(0)}40%{opacity:1;transform:translateY(-3px)}}
.ib-prev.is-typing{color:var(--accent);font-style:italic}
/* customer service form */
.svc-cal{justify-self:center;font-size:14px}
.svc-cal .ic{width:16px;height:16px}
.mail-to bdi{font-weight:500;color:var(--ink)}
.chat-about{display:flex;align-items:center;gap:8px;font-size:13px;color:var(--ink-2);margin-bottom:8px}
.chat-about select{width:auto;min-width:0;flex:1;max-width:220px;padding:6px 10px;font-size:14px;border-radius:999px}
/* booking card, payment request and status lines in the chat */
.st-pill{justify-self:start;display:inline-flex;align-items:center;gap:5px;font-size:13px;font-weight:600;padding:3px 10px;border-radius:999px}
.st-pill .ic{width:14px;height:14px}
.st-pending{background:var(--warn);color:var(--ink)}
.st-confirmed{background:var(--accent-soft);color:var(--accent)}
.st-cancelled{background:color-mix(in srgb,var(--danger) 12%,transparent);color:var(--danger)}
.payc{gap:8px}
.pay-amt{font-family:var(--f-display);font-weight:400;font-size:34px;line-height:1}
.msg-status{align-self:center;display:flex;align-items:center;gap:6px;flex-wrap:wrap;justify-content:center;font-size:13px;color:var(--ink-2);background:var(--stone);border-radius:999px;padding:5px 12px;text-align:center}
.msg-status .ic{width:15px;height:15px;color:var(--accent)}
.msg-status.st-cancelled .ic{color:var(--danger)}
.msg-status time{font-size:11px;opacity:.8}
.ib-tools{display:flex;gap:12px;margin-bottom:6px}
.pay-form{display:grid;gap:10px;padding:12px;margin-bottom:10px;border:1px solid var(--line);border-radius:10px;background:var(--surface)}
.pay-form h4{margin:0;font-size:15px}
.pay-form[hidden]{display:none}
/* the reply area scrolls on its own, so the send button is always reachable */
.ib-f{max-height:70%;overflow-y:auto;overscroll-behavior:contain}
/* phone: the payment forms open as a sheet from the bottom of the screen */
@media (max-width:760px){
  .pay-form{position:fixed;z-index:96;inset-inline:0;bottom:0;max-height:88dvh;overflow-y:auto;margin:0;border-radius:18px 18px 0 0;border:0;padding:20px 16px calc(20px + env(safe-area-inset-bottom,0px));box-shadow:0 0 0 100vmax rgba(7,17,31,.55)}
  .pay-form .bk-act{position:sticky;bottom:calc(-20px - env(safe-area-inset-bottom,0px));background:var(--surface);padding-block:10px;margin-inline:-16px;padding-inline:16px;border-top:1px solid var(--line)}
  .pay-form .bk-act .btn{flex:1}
  .ib-msgs{padding:12px}
  .ib-f{max-height:none}
}
