/* Website live chat widget (templates/site/partials/chat_widget.php). Uses the theme's CSS variables. */
.dx-chat { position: fixed; right: 16px; bottom: calc(16px + env(safe-area-inset-bottom, 0px)); z-index: 60; font-family: var(--f-body, system-ui, sans-serif); }
.dx-chat-launch { position: relative; display: inline-flex; align-items: center; gap: .4rem; padding: .7rem 1.1rem; border: 0; border-radius: 999px; background: var(--c-primary, #1f5eff); color: var(--c-primary-text, #fff); font: inherit; font-weight: 600; cursor: pointer; box-shadow: 0 4px 14px rgba(0, 0, 0, .25); }
.dx-chat-launch:focus-visible, .dx-chat-close:focus-visible { outline: 3px solid var(--c-accent, #ffb703); outline-offset: 2px; }
.dx-chat-dot { position: absolute; top: .2rem; right: .35rem; width: .7rem; height: .7rem; border-radius: 50%; background: #d92d20; border: 2px solid #fff; }
.dx-chat-panel { position: absolute; right: 0; bottom: calc(100% + .6rem); display: flex; flex-direction: column; width: min(22rem, calc(100vw - 2rem)); max-height: min(36rem, calc(100vh - 6rem)); background: var(--c-surface, #fff); color: var(--c-text, #1c1c1c); border-radius: 12px; box-shadow: 0 10px 30px rgba(0, 0, 0, .3); overflow: hidden; }
.dx-chat-panel[hidden] { display: none; }
.dx-chat-head { position: relative; padding: .75rem 2.75rem .6rem 1rem; background: var(--c-primary, #1f5eff); color: var(--c-primary-text, #fff); }
.dx-chat-title { margin: 0; font-size: 1rem; line-height: 1.3; }
.dx-chat-status { margin: .1rem 0 0; font-size: .82rem; opacity: .95; }
.dx-chat-demo { display: inline-block; padding: 0 .45rem; border-radius: 999px; background: #fff3cd; color: #6b4d00; font-size: .72rem; font-weight: 700; vertical-align: middle; }
.dx-chat-close { position: absolute; top: .45rem; right: .5rem; width: 2rem; height: 2rem; border: 0; border-radius: 50%; background: transparent; color: inherit; font-size: 1.4rem; line-height: 1; cursor: pointer; }
.dx-chat-note { margin: .5rem .75rem 0; padding: .45rem .6rem; border-radius: 8px; background: #f3f4f6; color: #33383f; font-size: .85rem; }
.dx-chat-note[hidden] { display: none; }
.dx-chat-note-demo { background: #fff3cd; color: #5c4300; }
.dx-chat-log { position: relative; flex: 1 1 auto; min-height: 6rem; margin: 0; padding: .75rem; list-style: none; overflow-y: auto; display: flex; flex-direction: column; gap: .45rem; }
.dx-chat-msg { max-width: 85%; padding: .45rem .65rem; border-radius: 10px; font-size: .92rem; line-height: 1.4; white-space: pre-wrap; overflow-wrap: anywhere; }
.dx-chat-msg-staff { align-self: flex-start; background: #eef1f5; color: #1d2229; }
.dx-chat-msg-me { align-self: flex-end; background: var(--c-primary, #1f5eff); color: var(--c-primary-text, #fff); }
.dx-chat-msg-system { align-self: center; max-width: 95%; background: transparent; color: #555c66; font-size: .8rem; text-align: center; }
.dx-chat-who { display: block; font-size: .75rem; font-weight: 700; margin-bottom: .1rem; }
.dx-chat-vehicle { margin: 0 .75rem; font-size: .82rem; color: #444b55; }
.dx-chat-vehicle[hidden] { display: none; }
.dx-chat-form { position: relative; display: grid; gap: .4rem; padding: .6rem .75rem .75rem; border-top: 1px solid #e3e6ea; }
.dx-chat-form textarea, .dx-chat-contact input { width: 100%; box-sizing: border-box; padding: .45rem .55rem; border: 1px solid #b8bec7; border-radius: 6px; font: inherit; color: #1d2229; background: #fff; }
.dx-chat-form textarea { resize: vertical; min-height: 2.6rem; max-height: 8rem; }
.dx-chat-contact summary { cursor: pointer; font-size: .85rem; font-weight: 600; }
.dx-chat-contact label { display: block; margin-top: .3rem; font-size: .8rem; }
.dx-chat-save { margin-top: .4rem; padding: .3rem .7rem; border: 1px solid #b8bec7; border-radius: 6px; background: #fff; color: #1d2229; font: inherit; font-size: .82rem; cursor: pointer; }
.dx-chat-save[hidden] { display: none; }
.dx-chat-hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.dx-chat-error { margin: 0; color: #b42318; font-size: .85rem; }
.dx-chat-error[hidden] { display: none; }
.dx-chat-send { justify-self: end; }
.dx-chat-fine { margin: 0; font-size: .72rem; color: #5d646e; }
/* The back-to-top button sits above the chat button. */
.dx-chat ~ .back-to-top { bottom: calc(76px + env(safe-area-inset-bottom, 0px)); }
@media (max-width: 480px) {
  .dx-chat { right: .6rem; bottom: .6rem; }
  .dx-chat-panel { position: fixed; right: .5rem; left: .5rem; bottom: 4.2rem; width: auto; }
}
@media print { .dx-chat { display: none !important; } }
