/* Zavsons property assistant. Set these four brand values to match the site exactly. */
#zai-root {
  --zai-navy: #1b2a4a;
  --zai-gold: #c9a24b;
  --zai-cream: #faf6ee;
  --zai-ink: #1f2430;
  --zai-line: #e6dfd0;
  --zai-muted: #6b6558;
  position: fixed; right: 20px; bottom: 20px; z-index: 99999;
  font-family: "Poppins", system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 14px; line-height: 1.5; color: var(--zai-ink);
}
#zai-root *, #zai-root *::before, #zai-root *::after { box-sizing: border-box; }

.zai-launcher {
  display: flex; align-items: center; gap: 8px; margin-left: auto;
  padding: 12px 18px 12px 14px; border: 0; border-radius: 999px;
  background: var(--zai-navy); color: #fff; font: inherit; font-weight: 600; cursor: pointer;
  box-shadow: 0 6px 20px rgba(27, 42, 74, .35);
}
.zai-launcher svg { color: var(--zai-gold); }
.zai-open .zai-launcher { display: none; }

.zai-panel {
  display: flex; flex-direction: column;
  width: 380px; height: min(620px, calc(100vh - 40px));
  background: #fff; border-radius: 14px; overflow: hidden;
  box-shadow: 0 18px 50px rgba(27, 42, 74, .28);
}
.zai-panel[hidden] { display: none; }

.zai-head {
  display: flex; align-items: center; gap: 4px; padding: 14px 12px 14px 18px;
  background: var(--zai-navy); color: #fff; border-bottom: 3px solid var(--zai-gold);
}
.zai-head div { flex: 1; display: flex; flex-direction: column; }
.zai-head strong { font-size: 15px; font-weight: 600; }
.zai-head span { font-size: 12px; opacity: .75; }
.zai-icon { width: 34px; height: 34px; border: 0; border-radius: 8px; background: transparent; color: #fff; font-size: 20px; line-height: 1; cursor: pointer; }
.zai-icon:hover { background: rgba(255, 255, 255, .12); }

.zai-log { flex: 1; overflow-y: auto; padding: 16px 14px; background: var(--zai-cream); display: flex; flex-direction: column; gap: 10px; }
.zai-msg { max-width: 85%; padding: 9px 13px; border-radius: 12px; word-wrap: break-word; }
.zai-bot { align-self: flex-start; background: #fff; border: 1px solid var(--zai-line); border-bottom-left-radius: 4px; }
.zai-user { align-self: flex-end; background: var(--zai-navy); color: #fff; border-bottom-right-radius: 4px; }
.zai-msg a { color: inherit; text-decoration: underline; text-underline-offset: 2px; }

.zai-typing { display: flex; gap: 4px; padding: 13px; }
.zai-typing i { width: 6px; height: 6px; border-radius: 50%; background: var(--zai-gold); animation: zai-blink 1.2s infinite; }
.zai-typing i:nth-child(2) { animation-delay: .2s; }
.zai-typing i:nth-child(3) { animation-delay: .4s; }
@keyframes zai-blink { 0%, 80%, 100% { opacity: .25; } 40% { opacity: 1; } }

.zai-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.zai-chip {
  padding: 7px 13px; border: 1.5px solid var(--zai-navy); border-radius: 999px;
  background: #fff; color: var(--zai-navy); font: inherit; font-size: 13px; font-weight: 500; cursor: pointer; text-align: left;
}
.zai-chip:hover { background: var(--zai-navy); color: #fff; }

.zai-cards { display: flex; gap: 10px; overflow-x: auto; padding-bottom: 4px; scroll-snap-type: x mandatory; flex-shrink: 0; }
.zai-card { flex: 0 0 215px; scroll-snap-align: start; display: flex; flex-direction: column; background: #fff; border: 1px solid var(--zai-line); border-radius: 10px; overflow: hidden; }
.zai-card:hover { border-color: var(--zai-gold); }
.zai-card-link { color: var(--zai-ink); text-decoration: none; flex: 1; }
.zai-card img { width: 100%; height: 120px; object-fit: cover; display: block; }
.zai-card-body { padding: 10px 12px 6px; display: flex; flex-direction: column; gap: 2px; }
.zai-price { font-weight: 700; color: var(--zai-navy); }
.zai-title { font-size: 13px; }
.zai-facts { font-size: 12px; color: var(--zai-muted); }
.zai-card-btn { margin: 6px 12px 12px; padding: 7px; border: 0; border-radius: 8px; background: var(--zai-gold); color: var(--zai-navy); font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; }

.zai-lead { display: flex; flex-direction: column; gap: 9px; padding: 14px; background: #fff; border: 1px solid var(--zai-line); border-radius: 12px; flex-shrink: 0; }
.zai-field { display: flex; flex-direction: column; gap: 3px; font-size: 12px; color: var(--zai-muted); }
.zai-field input, .zai-field textarea { padding: 8px 10px; border: 1px solid var(--zai-line); border-radius: 8px; font: inherit; font-size: 14px; color: var(--zai-ink); resize: vertical; }
.zai-consent { display: flex; gap: 8px; align-items: flex-start; font-size: 12px; color: var(--zai-muted); }
.zai-consent input { margin-top: 3px; accent-color: var(--zai-navy); }
.zai-form-error { margin: 0; font-size: 13px; color: #a12b2b; }
.zai-submit { padding: 10px; border: 0; border-radius: 8px; background: var(--zai-navy); color: #fff; font: inherit; font-weight: 600; cursor: pointer; }
.zai-submit:disabled { opacity: .5; cursor: default; }
.zai-hp { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; opacity: 0; }

.zai-form { display: flex; gap: 8px; padding: 10px; border-top: 1px solid var(--zai-line); background: #fff; }
.zai-form input { flex: 1; min-width: 0; padding: 9px 12px; border: 1px solid var(--zai-line); border-radius: 10px; font: inherit; color: inherit; }
.zai-send { padding: 0 16px; border: 0; border-radius: 10px; background: var(--zai-gold); color: var(--zai-navy); font: inherit; font-weight: 600; cursor: pointer; }
.zai-note { margin: 0; padding: 0 12px 10px; background: #fff; font-size: 11px; color: var(--zai-muted); }
.zai-note a { color: inherit; }

#zai-root :focus-visible { outline: 2px solid var(--zai-gold); outline-offset: 2px; }

@media (max-width: 480px) {
  #zai-root { right: 12px; bottom: 12px; left: 12px; }
  .zai-panel { width: 100%; height: calc(100vh - 24px); }
}
@media (prefers-reduced-motion: reduce) { .zai-typing i { animation: none; opacity: .6; } }
