/* LWAS Villa Engine: chat widget. Colours come from --lwas-ve-primary and --lwas-ve-accent. Restyle with your own CSS. */
:root { --lwas-ve-primary: #1f4e5f; --lwas-ve-accent: #e07a3f; --lwas-ve-line: #d9dde0; --lwas-ve-muted: #5c666c; }

.lwas-ve-chat-bubble, .lwas-ve-chat-panel, .lwas-ve-chat-panel * { box-sizing: border-box; }

.lwas-ve-chat-bubble {
  position: fixed; right: 1rem; bottom: 1rem; z-index: 1000000; display: flex; align-items: center; justify-content: center;
  gap: .55rem; min-height: 3.5rem; max-width: calc(100vw - 2rem); padding: .6rem 1.2rem .6rem 1rem; border: 0; border-radius: 1.75rem;
  background: var(--lwas-ve-primary); color: #fff; box-shadow: 0 4px 14px rgba(0, 0, 0, .25); cursor: pointer;
  font: inherit; font-size: 1rem; font-weight: 600; line-height: 1.25; text-align: left;
}
.lwas-ve-chat-bubble svg { flex: none; }
.lwas-ve-chat-bubble[aria-expanded="true"] .lwas-ve-chat-bubble-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.lwas-ve-chat-bubble[aria-expanded="true"] { padding: 0; width: 3.5rem; justify-content: center; border-radius: 50%; }
@media (max-width: 480px) { .lwas-ve-chat-bubble { font-size: .9rem; padding: .5rem 1rem .5rem .85rem; } }
.lwas-ve-chat-bubble:hover { filter: brightness(1.12); }
.lwas-ve-chat-bubble:focus-visible, .lwas-ve-chat-panel :focus-visible { outline: 3px solid var(--lwas-ve-accent); outline-offset: 2px; }

.lwas-ve-chat-panel {
  position: fixed; right: 1rem; bottom: 5.5rem; z-index: 1000001; display: flex; flex-direction: column;
  width: 22rem; max-width: calc(100vw - 2rem); height: 32rem; max-height: calc(100vh - 7rem);
  border: 1px solid var(--lwas-ve-line); border-radius: 8px; background: #fff; color: #1d2327;
  box-shadow: 0 8px 28px rgba(0, 0, 0, .25); font: inherit; font-size: .95rem; line-height: 1.4;
}
.lwas-ve-chat-panel[hidden] { display: none; }

.lwas-ve-chat-header { display: flex; align-items: center; justify-content: space-between; padding: .6rem .9rem; border-radius: 8px 8px 0 0; background: var(--lwas-ve-primary); color: #fff; }
.lwas-ve-chat-title { margin: 0; color: inherit; font-size: 1rem; font-weight: 700; }
.lwas-ve-chat-close { width: 2.25rem; height: 2.25rem; padding: 0; border: 0; border-radius: 4px; background: transparent; color: inherit; font-size: 1.6rem; line-height: 1; cursor: pointer; }
.lwas-ve-chat-close:hover { background: rgba(255, 255, 255, .18); }

.lwas-ve-chat-log { flex: 1; min-height: 0; padding: .75rem; overflow-y: auto; overscroll-behavior: contain; }
.lwas-ve-chat-msg { display: flex; flex-direction: column; max-width: 92%; margin: 0 0 .6rem; }
.lwas-ve-chat-text { margin: 0; padding: .5rem .7rem; border-radius: 8px; white-space: pre-wrap; overflow-wrap: anywhere; }
.lwas-ve-chat-text + .lwas-ve-chat-text { margin-top: .25rem; }
.lwas-ve-chat-bot .lwas-ve-chat-text { background: #f0f3f4; }
.lwas-ve-chat-guest { align-self: flex-end; align-items: flex-end; }
.lwas-ve-chat-guest .lwas-ve-chat-text { background: var(--lwas-ve-primary); color: #fff; }
.lwas-ve-chat-note .lwas-ve-chat-text { border: 1px solid var(--lwas-ve-line); background: #fff; color: var(--lwas-ve-muted); }
.lwas-ve-chat-typing .lwas-ve-chat-text { color: var(--lwas-ve-muted); font-style: italic; }

.lwas-ve-chat-cards { display: grid; gap: .5rem; margin: .4rem 0 0; padding: 0; list-style: none; }
.lwas-ve-chat-card { overflow: hidden; border: 1px solid var(--lwas-ve-line); border-radius: 8px; background: #fff; }
.lwas-ve-chat-card-image { display: block; width: 100%; height: 8.5rem; object-fit: cover; }
.lwas-ve-chat-card-body { padding: .6rem .7rem; }
.lwas-ve-chat-card-body p { margin: 0 0 .2rem; }
.lwas-ve-chat-card-title { font-weight: 700; }
.lwas-ve-chat-card-meta { color: var(--lwas-ve-muted); font-size: .85rem; }
.lwas-ve-chat-card-price { color: var(--lwas-ve-primary); font-weight: 700; }
.lwas-ve-chat-card-actions { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: .4rem !important; }

.lwas-ve-chat-link { display: inline-block; padding: .4rem .8rem; border: 1px solid var(--lwas-ve-primary); border-radius: 4px; background: #fff; color: var(--lwas-ve-primary); font-weight: 600; text-decoration: none; }
.lwas-ve-chat-link:hover { background: #f0f3f4; }
.lwas-ve-chat-link-primary { background: var(--lwas-ve-primary); color: #fff; }
.lwas-ve-chat-link-primary:hover { background: var(--lwas-ve-primary); filter: brightness(1.12); }
.lwas-ve-chat-note .lwas-ve-chat-link { margin-top: .1rem; }

.lwas-ve-chat-form { display: flex; gap: .5rem; padding: .6rem; border-top: 1px solid var(--lwas-ve-line); }
.lwas-ve-chat-input { flex: 1; min-width: 0; padding: .55rem .65rem; border: 1px solid var(--lwas-ve-line); border-radius: 4px; background: #fff; color: inherit; font: inherit; }
.lwas-ve-chat-send { padding: .55rem 1rem; border: 0; border-radius: 4px; background: var(--lwas-ve-primary); color: #fff; font: inherit; font-weight: 600; cursor: pointer; }
.lwas-ve-chat-send:hover { filter: brightness(1.12); }
.lwas-ve-chat-send[disabled], .lwas-ve-chat-input[readonly] { opacity: .55; cursor: not-allowed; }

@media (max-width: 479px) {
  .lwas-ve-chat-panel { inset: 0; width: auto; max-width: none; height: auto; max-height: none; border: 0; border-radius: 0; }
  .lwas-ve-chat-header { border-radius: 0; }
  .lwas-ve-chat-input { font-size: 1rem; }
}

@media (prefers-reduced-motion: no-preference) {
  .lwas-ve-chat-bubble { transition: filter .15s ease; }
}
