/* Customer-care chat of the guest pages (static/public/js/chat.js). Uses the listing.css tokens, with fallbacks. */
#lx-chat {
    --c-primary: var(--lx-primary, #0e6b5c);
    --c-primary-2: var(--lx-primary-hover, #0a5649);
    --c-soft: var(--lx-primary-soft, #e3f1ed);
    --c-ink: var(--lx-ink, #15202b);
    --c-ink-2: var(--lx-ink-2, #3f4a56);
    --c-muted: var(--lx-muted, #6b7280);
    --c-line: var(--lx-line, #e7e3dc);
    --c-bg: var(--lx-bg, #f8f7f4);
    --c-accent: var(--lx-accent, #b45309);
    --c-staff: #1d4ed8;
    position: fixed; right: 24px; bottom: 24px; z-index: 1060; /* above the sticky site header */
    font-family: inherit; color: var(--c-ink);
}
#lx-chat *, #lx-chat *::before, #lx-chat *::after { box-sizing: border-box; }
#lx-chat [hidden] { display: none !important; }

/* ---------------------------------------------------------------- the button */
.lxc-launch {
    position: relative; display: inline-flex; align-items: center; gap: 12px; height: 64px; padding: 0 26px 0 8px;
    border: 0; border-radius: 999px; cursor: pointer; color: #fff; font: inherit; font-size: 16px; font-weight: 700;
    background: linear-gradient(135deg, var(--c-primary) 0%, #138a75 100%);
    box-shadow: 0 10px 30px rgba(14, 107, 92, .35), 0 2px 6px rgba(0, 0, 0, .12);
    transition: transform .2s ease, box-shadow .2s ease;
}
.lxc-launch:hover { transform: translateY(-2px); box-shadow: 0 14px 36px rgba(14, 107, 92, .42), 0 2px 6px rgba(0, 0, 0, .12); }
.lxc-launch__icon {
    display: grid; place-items: center; width: 48px; height: 48px; border-radius: 50%;
    background: rgba(255, 255, 255, .18); font-size: 22px;
}
.lxc-launch::after {
    content: ""; position: absolute; inset: -6px; border-radius: 999px; border: 2px solid rgba(14, 107, 92, .35);
    animation: lxc-pulse 2.6s ease-out infinite; pointer-events: none;
}
#lx-chat.is-open .lxc-launch::after { animation: none; display: none; }
@keyframes lxc-pulse { 0% { opacity: .9; transform: scale(.96); } 70%, 100% { opacity: 0; transform: scale(1.12); } }
.lxc-badge {
    position: absolute; top: -4px; right: -2px; min-width: 24px; height: 24px; padding: 0 7px; border-radius: 999px;
    background: #e11d48; color: #fff; font-size: 12px; font-weight: 700; line-height: 24px; text-align: center; border: 2px solid #fff;
}
#lx-chat.is-open .lxc-launch { padding: 0 8px; }
#lx-chat.is-open .lxc-launch__text { display: none; }

.lxc-nudge {
    position: absolute; right: 0; bottom: 78px; width: max-content; max-width: 260px; padding: 12px 34px 12px 16px;
    border-radius: 16px 16px 4px 16px; background: #fff; color: var(--c-ink); font-size: 14px; font-weight: 600; cursor: pointer;
    box-shadow: 0 12px 32px rgba(21, 32, 43, .16); animation: lxc-in .3s ease;
}
.lxc-nudge__x { position: absolute; top: 6px; right: 8px; border: 0; background: none; color: var(--c-muted); font-size: 18px; line-height: 1; cursor: pointer; }

/* ---------------------------------------------------------------- the window */
.lxc-panel {
    position: absolute; right: 0; bottom: 80px; display: flex; flex-direction: column;
    width: min(660px, calc(100vw - 48px)); height: min(720px, calc(100vh - 150px)); border-radius: 20px; overflow: hidden;
    background: var(--c-bg); box-shadow: 0 24px 64px rgba(21, 32, 43, .24), 0 2px 8px rgba(21, 32, 43, .08);
    animation: lxc-in .22s ease;
}
@keyframes lxc-in { from { opacity: 0; transform: translateY(12px) scale(.98); } to { opacity: 1; transform: none; } }

.lxc-head {
    display: flex; align-items: center; gap: 12px; padding: 16px 16px 16px 18px; color: #fff;
    background: linear-gradient(135deg, var(--c-primary) 0%, #138a75 100%);
}
#lx-chat.is-staff .lxc-head { background: linear-gradient(135deg, #1e40af 0%, #2563eb 100%); }
.lxc-avatar {
    flex: none; display: grid; place-items: center; width: 44px; height: 44px; border-radius: 14px;
    background: rgba(255, 255, 255, .18); font-size: 21px;
}
.lxc-head__txt { flex: 1; min-width: 0; }
.lxc-head__txt b { display: block; font-size: 16.5px; line-height: 1.25; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lxc-head__txt small { display: flex; align-items: center; gap: 6px; margin-top: 2px; font-size: 12.5px; opacity: .9; }
.lxc-dot { width: 8px; height: 8px; border-radius: 50%; background: #4ade80; box-shadow: 0 0 0 3px rgba(74, 222, 128, .25); }
.lxc-head__btns { display: flex; align-items: center; gap: 4px; }
.lxc-icon {
    display: grid; place-items: center; width: 36px; height: 36px; border: 0; border-radius: 10px; cursor: pointer;
    background: transparent; color: #fff; font-size: 18px; text-decoration: none;
}
.lxc-icon:hover { background: rgba(255, 255, 255, .16); color: #fff; }
.lxc-menu { position: relative; }
.lxc-menu__list {
    position: absolute; right: 0; top: 42px; z-index: 2; min-width: 220px; padding: 6px; border-radius: 12px;
    background: #fff; box-shadow: 0 12px 32px rgba(21, 32, 43, .18);
}
.lxc-menu__list button {
    display: flex; align-items: center; gap: 10px; width: 100%; padding: 10px 12px; border: 0; border-radius: 8px;
    background: none; color: var(--c-ink); font: inherit; font-size: 14px; text-align: left; cursor: pointer;
}
.lxc-menu__list button:hover { background: var(--c-bg); }

/* ---------------------------------------------------------------- messages */
.lxc-body { flex: 1; overflow-y: auto; padding: 18px 16px 8px; display: flex; flex-direction: column; gap: 14px; overscroll-behavior: contain; }
.lxc-msg { display: flex; gap: 8px; align-items: flex-end; max-width: 100%; animation: lxc-in .2s ease; }
.lxc-msg.is-guest { justify-content: flex-end; }
.lxc-msg__av {
    flex: none; display: grid; place-items: center; width: 30px; height: 30px; border-radius: 10px; margin-bottom: 20px;
    background: var(--c-soft); color: var(--c-primary); font-size: 14px;
}
.lxc-msg.is-staff .lxc-msg__av { background: #e8f0fe; color: var(--c-staff); }
.lxc-msg__col { display: flex; flex-direction: column; gap: 8px; min-width: 0; max-width: 88%; }
.lxc-msg.is-guest .lxc-msg__col { align-items: flex-end; max-width: 80%; }
.lxc-msg__who { font-size: 12px; font-weight: 700; color: var(--c-staff); padding-left: 4px; }
.lxc-bubble {
    padding: 11px 15px; border-radius: 18px 18px 18px 6px; background: #fff; color: var(--c-ink);
    font-size: 15px; line-height: 1.55; overflow-wrap: anywhere; box-shadow: 0 1px 2px rgba(21, 32, 43, .06);
}
.lxc-bubble a { color: var(--c-primary); }
.lxc-msg.is-guest .lxc-bubble { border-radius: 18px 18px 6px 18px; background: var(--c-primary); color: #fff; }
.lxc-msg.is-guest .lxc-bubble a { color: #fff; }
.lxc-msg.is-staff .lxc-bubble { border: 1px solid #dbe5fb; }
.lxc-msg[data-pending] .lxc-bubble { opacity: .75; }
.lxc-msg__time { font-size: 11px; color: var(--c-muted); padding: 0 4px; }

.lxc-typing { align-items: center; } /* no time line under the typing bubble: the avatar sits level with it */
.lxc-typing .lxc-msg__av { margin-bottom: 0; }
.lxc-typing .lxc-bubble { display: inline-flex; gap: 5px; padding: 15px 16px; }
.lxc-typing .lxc-bubble i { width: 7px; height: 7px; border-radius: 50%; background: var(--c-muted); animation: lxc-dot 1.2s infinite ease-in-out; }
.lxc-typing .lxc-bubble i:nth-child(2) { animation-delay: .15s; }
.lxc-typing .lxc-bubble i:nth-child(3) { animation-delay: .3s; }
@keyframes lxc-dot { 0%, 80%, 100% { opacity: .3; transform: translateY(0); } 40% { opacity: 1; transform: translateY(-4px); } }

.lxc-sys {
    align-self: center; display: flex; align-items: center; flex-wrap: wrap; justify-content: center; gap: 8px;
    max-width: 92%; padding: 10px 14px; border-radius: 14px; background: var(--lx-ok-soft, #e4f4ea); color: var(--lx-ok, #157347);
    font-size: 13.5px; font-weight: 600; text-align: center;
}
.lxc-sys a { color: inherit; text-decoration: underline; white-space: nowrap; }
.lxc-sys.is-error { background: #fdecea; color: #b42318; }

/* quick replies */
.lxc-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.lxc-chip {
    display: inline-flex; align-items: center; gap: 7px; padding: 9px 14px; border: 1.5px solid var(--c-primary); border-radius: 999px;
    background: #fff; color: var(--c-primary); font: inherit; font-size: 14px; font-weight: 600; cursor: pointer; transition: background .15s, color .15s;
}
.lxc-chip:hover { background: var(--c-primary); color: #fff; }
.lxc-chips.is-used { display: none; }

/* rooms / tours */
.lxc-cards { display: flex; gap: 10px; overflow-x: auto; padding: 2px 2px 6px; scroll-snap-type: x mandatory; scrollbar-width: thin; }
.lxc-card {
    flex: 0 0 250px; scroll-snap-align: start; display: flex; flex-direction: column; overflow: hidden;
    border-radius: 16px; background: #fff; box-shadow: 0 1px 2px rgba(21, 32, 43, .06), 0 4px 14px rgba(21, 32, 43, .06);
}
.lxc-cards.is-single .lxc-card { flex-basis: 100%; }
.lxc-card__img { position: relative; flex: none; display: grid; place-items: center; height: 140px; overflow: hidden; background: var(--c-soft); color: var(--c-primary); font-size: 32px; }
#lx-chat .lxc-card__img img { position: absolute; inset: 0; width: 100%; height: 100%; max-width: none; object-fit: cover; display: block; }
.lxc-card__body { display: flex; flex-direction: column; gap: 4px; padding: 12px 14px 14px; flex: 1; }
.lxc-card__body b { font-size: 14.5px; line-height: 1.35; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.lxc-card__body small { color: var(--c-muted); font-size: 12.5px; }
.lxc-card__price { margin-top: 2px; color: var(--c-accent); font-weight: 700; font-size: 14px; }
.lxc-card__btns { display: flex; gap: 6px; margin-top: auto; padding-top: 10px; }
.lxc-card__btns .lxc-btn { flex: 1; }

.lxc-btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 9px 14px; border: 1.5px solid var(--c-primary);
    border-radius: 10px; background: var(--c-primary); color: #fff; font: inherit; font-size: 13.5px; font-weight: 700;
    text-decoration: none; cursor: pointer; white-space: nowrap;
}
.lxc-btn:hover { background: var(--c-primary-2); border-color: var(--c-primary-2); color: #fff; }
.lxc-btn--ghost { background: #fff; color: var(--c-primary); }
.lxc-btn--ghost:hover { background: var(--c-soft); color: var(--c-primary); }
.lxc-btn--block { width: 100%; padding: 12px 16px; font-size: 15px; }
.lxc-btn:disabled { opacity: .6; cursor: default; }

/* ---------------------------------------------------------------- forms in the chat */
.lxc-form {
    display: flex; flex-direction: column; gap: 12px; width: 100%; min-width: 300px; padding: 16px;
    border-radius: 18px; background: #fff; border: 1px solid var(--c-line); box-shadow: 0 4px 14px rgba(21, 32, 43, .06);
}
.lxc-form__head { display: flex; align-items: center; gap: 8px; font-size: 15.5px; font-weight: 700; }
.lxc-form__head i { color: var(--c-primary); font-size: 18px; }
.lxc-form__item { display: flex; flex-direction: column; gap: 2px; padding: 10px 12px; border-radius: 12px; background: var(--c-soft); }
.lxc-form__item b { font-size: 14px; }
.lxc-form__item small { color: var(--c-ink-2); font-size: 12.5px; }
.lxc-form__item span { color: var(--c-accent); font-weight: 700; font-size: 13.5px; }
.lxc-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.lxc-f { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.lxc-f > span, .lxc-step > span { font-size: 12.5px; font-weight: 600; color: var(--c-ink-2); }
.lxc-f input, .lxc-f textarea {
    width: 100%; padding: 10px 12px; border: 1px solid #d6d2ca; border-radius: 10px; background: #fff;
    font: inherit; font-size: 14.5px; color: var(--c-ink);
}
.lxc-f input:focus, .lxc-f textarea:focus, .lxc-input textarea:focus { outline: none; border-color: var(--c-primary); box-shadow: 0 0 0 3px rgba(14, 107, 92, .15); }
.lxc-f.is-bad input, .lxc-f.is-bad textarea, .lxc-pills.is-bad { border-color: #dc2626; box-shadow: 0 0 0 3px rgba(220, 38, 38, .12); }
.lxc-pills.is-bad { border-radius: 12px; }
.lxc-pills { display: flex; flex-wrap: wrap; gap: 6px; }
.lxc-pill {
    padding: 7px 12px; border: 1px solid #d6d2ca; border-radius: 999px; background: #fff; color: var(--c-ink-2);
    font: inherit; font-size: 13px; font-weight: 600; cursor: pointer;
}
.lxc-pill.is-on { border-color: var(--c-primary); background: var(--c-primary); color: #fff; }
.lxc-days .lxc-pills { flex-wrap: nowrap; overflow-x: auto; padding-bottom: 4px; scrollbar-width: thin; }
.lxc-days .lxc-pill { flex: none; display: flex; flex-direction: column; align-items: center; min-width: 54px; padding: 6px 8px; border-radius: 12px; }
.lxc-days .lxc-pill small { font-size: 11px; font-weight: 600; opacity: .8; }
.lxc-days .lxc-pill b { font-size: 14px; }
.lxc-step { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.lxc-steps { display: flex; flex-direction: column; gap: 8px; padding: 10px 12px; border-radius: 12px; background: var(--c-bg); }
.lxc-step__ctl { display: inline-flex; align-items: center; border: 1px solid #d6d2ca; border-radius: 10px; overflow: hidden; background: #fff; }
.lxc-step__ctl button { width: 34px; height: 34px; border: 0; background: none; font-size: 18px; color: var(--c-primary); cursor: pointer; }
.lxc-step__ctl input { width: 42px; height: 34px; border: 0; text-align: center; font: inherit; font-weight: 700; -moz-appearance: textfield; }
.lxc-step__ctl input::-webkit-inner-spin-button, .lxc-step__ctl input::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
.lxc-step__ctl input { padding: 0; }
/* in a two-column form row the counter fills its column and matches the inputs next to it */
.lxc-grid > .lxc-f > .lxc-step { flex: 1; flex-direction: column; align-items: stretch; gap: 5px; }
.lxc-grid > .lxc-f > .lxc-step .lxc-step__ctl { display: flex; flex: 1; }
.lxc-grid > .lxc-f > .lxc-step .lxc-step__ctl button { flex: none; width: 44px; height: auto; }
.lxc-grid > .lxc-f > .lxc-step .lxc-step__ctl input { flex: 1; width: auto; min-width: 0; height: auto; padding: 10px 0; font-size: 14.5px; line-height: normal; }
.lxc-pkgs { display: flex; flex-direction: column; gap: 6px; max-height: 196px; overflow-y: auto; }
.lxc-pkg { display: flex; align-items: center; gap: 10px; padding: 9px 12px; border: 1px solid #d6d2ca; border-radius: 12px; cursor: pointer; }
.lxc-pkg:has(input:checked) { border-color: var(--c-primary); background: var(--c-soft); }
.lxc-pkg input { accent-color: var(--c-primary); width: 17px; height: 17px; }
.lxc-pkg span { display: flex; flex-direction: column; }
.lxc-pkg b { font-size: 14px; }
.lxc-pkg small { font-size: 12.5px; color: var(--c-ink-2); }
.lxc-consent { display: flex; gap: 10px; align-items: flex-start; font-size: 13px; color: var(--c-ink-2); line-height: 1.45; cursor: pointer; }
.lxc-consent input { margin-top: 2px; width: 17px; height: 17px; accent-color: var(--c-primary); flex: none; }
.lxc-consent.is-bad { color: #b42318; }
.lxc-form__err { margin: 0; padding: 8px 12px; border-radius: 10px; background: #fdecea; color: #b42318; font-size: 13px; font-weight: 600; }
.lxc-hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.lxc-form.is-done { opacity: .7; }
.lxc-form.is-done .lxc-btn { background: var(--lx-ok, #157347); border-color: var(--lx-ok, #157347); }

/* ---------------------------------------------------------------- typing box */
.lxc-input { display: flex; align-items: flex-end; gap: 8px; padding: 12px 14px 6px; border-top: 1px solid var(--c-line); background: #fff; }
.lxc-input textarea {
    flex: 1; min-height: 46px; max-height: 120px; padding: 12px 14px; border: 1px solid #d6d2ca; border-radius: 14px; resize: none;
    font: inherit; font-size: 15px; line-height: 1.4; color: var(--c-ink); background: var(--c-bg);
}
.lxc-send {
    flex: none; display: grid; place-items: center; width: 46px; height: 46px; border: 0; border-radius: 14px; cursor: pointer;
    background: var(--c-primary); color: #fff; font-size: 18px;
}
.lxc-send:hover { background: var(--c-primary-2); }
.lxc-privacy { margin: 0; padding: 0 14px 10px; background: #fff; font-size: 11.5px; line-height: 1.4; color: var(--c-muted); }
.lxc-privacy i { color: var(--c-primary); }
.lxc-privacy a { color: inherit; text-decoration: underline; }

/* ---------------------------------------------------------------- phones: full screen */
@media (max-width: 639px) {
    #lx-chat { right: 16px; bottom: 16px; }
    .lxc-launch { height: 58px; font-size: 15px; padding-right: 20px; }
    .lxc-launch__icon { width: 44px; height: 44px; font-size: 20px; }
    #lx-chat.is-open .lxc-launch { display: none; }
    .lxc-panel { position: fixed; inset: 0; width: 100%; height: 100%; height: 100dvh; border-radius: 0; }
    .lxc-msg__col { max-width: 90%; }
    .lxc-form { min-width: 0; }
    .lxc-grid { grid-template-columns: 1fr; }
    .lxc-nudge { bottom: 70px; }
}
.lxc-card__by { color: var(--c-primary) !important; font-weight: 600; }
.lxc-card__by { color: var(--c-primary) !important; font-weight: 600; }
