/* ============================================================
   VHome AI Chat Widget — redesigned, responsive, flexible
   ============================================================ */

:root {
  --vhome-accent: #2563eb;
  --vhome-accent-dark: #1d4ed8;
  --vhome-surface: #ffffff;
  --vhome-bg: #f8fafc;
  --vhome-text: #0f172a;
  --vhome-muted: #64748b;
  --vhome-border: #e2e8f0;
  --vhome-bot-bubble: #f1f5f9;
  --vhome-user-bubble: #2563eb;
  --vhome-shadow: 0 24px 80px rgba(0, 0, 0, 0.18);
  --vhome-radius: 24px;
  --vhome-safe-bottom: env(safe-area-inset-bottom, 0px);
  --vhome-safe-top: env(safe-area-inset-top, 0px);
}

/* ---------- FAB ---------- */
#vhome-chat-fab {
  position: fixed;
  bottom: calc(24px + var(--vhome-safe-bottom));
  right: 24px;
  width: 58px;
  height: 58px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--vhome-accent), var(--vhome-accent-dark));
  color: #fff;
  border: none;
  box-shadow: 0 10px 30px rgba(37, 99, 235, 0.38), 0 4px 10px rgba(0, 0, 0, 0.08);
  cursor: pointer;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.2s ease, opacity 0.2s ease;
}

#vhome-chat-fab:hover {
  transform: scale(1.08);
  box-shadow: 0 14px 40px rgba(37, 99, 235, 0.5), 0 6px 14px rgba(0, 0, 0, 0.1);
}

#vhome-chat-fab:active { transform: scale(0.96); }

#vhome-chat-fab.open {
  background: #334155;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.22);
}

#vhome-chat-fab svg {
  width: 26px;
  height: 26px;
  fill: currentColor;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

#vhome-chat-fab .vhome-fab-icon-close { display: none; }
#vhome-chat-fab.open .vhome-fab-icon-chat { display: none; }
#vhome-chat-fab.open .vhome-fab-icon-close { display: block; }

#vhome-chat-badge {
  position: absolute;
  top: -3px;
  right: -3px;
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  border-radius: 10px;
  background: #ef4444;
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  display: none;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.25);
  border: 2px solid #fff;
}

/* ---------- Chat window ---------- */
#vhome-chat-window {
  position: fixed;
  bottom: calc(92px + var(--vhome-safe-bottom));
  right: 24px;
  width: 400px;
  height: min(640px, calc(100vh - 120px));
  max-height: calc(100vh - 120px);
  max-width: calc(100vw - 48px);
  background: var(--vhome-surface);
  border-radius: var(--vhome-radius);
  box-shadow: var(--vhome-shadow);
  z-index: 9998;
  display: none;
  flex-direction: column;
  overflow: hidden;
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  border: 1px solid rgba(226, 232, 240, 0.8);
  transition: width 0.3s ease, height 0.3s ease, bottom 0.3s ease, right 0.3s ease, border-radius 0.3s ease, transform 0.3s ease;
}

#vhome-chat-window.open {
  display: flex;
  animation: vhome-chat-in 0.28s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes vhome-chat-in {
  from { opacity: 0; transform: translateY(20px) scale(0.96); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

/* Maximized state: desktop right-half panel, mobile full-screen */
#vhome-chat-window.vhome-maximized {
  top: 0;
  right: 0;
  bottom: 0;
  left: auto;
  width: 50vw;
  height: 100vh;
  max-width: 50vw;
  max-height: 100vh;
  transform: none;
  border-radius: 0;
  box-shadow: -12px 0 48px rgba(0, 0, 0, 0.18);
}

/* Hide the sticky FAB when the chat is in fullscreen/maximized mode */
#vhome-chat-window.vhome-maximized ~ #vhome-chat-fab {
  display: none !important;
}

/* Compact when viewport is short */
@media (max-height: 720px) {
  #vhome-chat-window:not(.vhome-maximized) {
    height: calc(100vh - 120px);
  }
}

@media (max-width: 640px) {
  #vhome-chat-window {
    right: 12px;
    left: 12px;
    width: auto;
    bottom: calc(80px + var(--vhome-safe-bottom));
    height: calc(100vh - 96px - var(--vhome-safe-bottom) - var(--vhome-safe-top));
    max-height: calc(100vh - 96px - var(--vhome-safe-bottom) - var(--vhome-safe-top));
    max-width: none;
    border-radius: 20px;
  }

  #vhome-chat-window.vhome-maximized {
    right: 0;
    left: 0;
    top: var(--vhome-safe-top);
    bottom: var(--vhome-safe-bottom);
    width: auto;
    height: auto;
    max-width: none;
    max-height: none;
    transform: none;
    border-radius: 0;
  }

  #vhome-chat-fab {
    right: 16px;
    bottom: calc(16px + var(--vhome-safe-bottom));
    width: 54px;
    height: 54px;
  }

  #vhome-chat-fab svg { width: 24px; height: 24px; }
}

/* ---------- Header ---------- */
.vhome-chat-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  background: linear-gradient(90deg, #ef4444 0%, #a855f7 25%, #3b82f6 50%, #a855f7 75%, #ef4444 100%);
  background-size: 200% 100%;
  animation: vhome-header-gradient 8s linear infinite;
  color: #fff;
  flex-shrink: 0;
}

@keyframes vhome-header-gradient {
  0% { background-position: 0% 50%; }
  100% { background-position: 200% 50%; }
}

.vhome-chat-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 14px;
  border: 2px solid rgba(255, 255, 255, 0.25);
  flex-shrink: 0;
}

.vhome-chat-header-info { flex: 1; min-width: 0; }
.vhome-chat-header-name { font-weight: 600; font-size: 15px; letter-spacing: -0.2px; }
.vhome-chat-header-status { font-size: 12px; opacity: 0.9; display: flex; align-items: center; gap: 6px; }
.vhome-chat-header-status::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #22c55e;
  box-shadow: 0 0 0 2px rgba(34, 197, 94, 0.3);
}

.vhome-header-btn {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.12);
  border: none;
  color: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s ease, transform 0.15s ease;
  flex-shrink: 0;
}

.vhome-header-btn:hover { background: rgba(255, 255, 255, 0.24); }
.vhome-header-btn:active { transform: scale(0.94); }
.vhome-header-btn svg { width: 18px; height: 18px; fill: currentColor; }

/* ---------- Views ---------- */
.vhome-chat-view {
  display: none;
  flex-direction: column;
  flex: 1;
  overflow: hidden;
  position: relative;
}

.vhome-chat-view.active { display: flex; }

/* ---------- Home view ---------- */
.vhome-home-content {
  flex: 1;
  padding: 24px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
}

.vhome-home-hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 14px;
  margin: auto 0 20px;
}

.vhome-home-logo {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--vhome-accent), var(--vhome-accent-dark));
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 22px;
  box-shadow: 0 10px 28px rgba(37, 99, 235, 0.28);
}

.vhome-home-hero h3 { font-size: 19px; font-weight: 700; color: var(--vhome-text); margin: 0; }
.vhome-home-hero p { font-size: 14px; color: var(--vhome-muted); margin: 0; line-height: 1.55; max-width: 260px; }

.vhome-home-status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border-radius: 999px;
  background: #dcfce7;
  color: #166534;
  font-size: 12px;
  font-weight: 600;
}

.vhome-suggestions {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 8px;
}

.vhome-suggestion {
  padding: 13px 16px;
  border-radius: 14px;
  border: 1px solid var(--vhome-border);
  background: var(--vhome-bg);
  color: var(--vhome-text);
  font-size: 13.5px;
  font-weight: 500;
  text-align: left;
  cursor: pointer;
  transition: all 0.15s ease;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.vhome-suggestion::after {
  content: "›";
  color: var(--vhome-muted);
  font-size: 18px;
  line-height: 1;
}

.vhome-suggestion:hover {
  border-color: var(--vhome-accent);
  background: #eff6ff;
  color: var(--vhome-accent-dark);
  transform: translateX(2px);
}

.vhome-suggestion:hover::after { color: var(--vhome-accent); }

/* Agent card on chat home */
.vhome-agent-card {
  padding: 16px;
  border-radius: 20px;
  background: linear-gradient(135deg, #eff6ff 0%, #f5f3ff 100%);
  margin-bottom: 18px;
}
.vhome-agent-main {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
}
.vhome-agent-avatar-wrap {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  overflow: hidden;
  flex-shrink: 0;
  background: #fff;
  border: 2px solid #fff;
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.12);
  position: relative;
}
.vhome-agent-photo {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.vhome-agent-fallback {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--vhome-accent), #7c3aed);
  color: #fff;
  font-weight: 700;
  font-size: 18px;
}
.vhome-agent-info { flex: 1; min-width: 0; }
.vhome-agent-name {
  font-size: 16px;
  font-weight: 700;
  color: var(--vhome-text);
  line-height: 1.2;
}
.vhome-agent-title {
  font-size: 12px;
  color: var(--vhome-muted);
  margin-top: 2px;
}
.vhome-agent-phone {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 13px;
  font-weight: 600;
  color: var(--vhome-accent-dark);
  margin-top: 4px;
  text-decoration: none;
}
.vhome-agent-phone:hover { text-decoration: underline; }
.vhome-agent-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.vhome-agent-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid var(--vhome-border);
  background: #fff;
  color: var(--vhome-text);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.15s ease;
}
.vhome-agent-btn:hover { background: #f8fafc; border-color: var(--vhome-accent); color: var(--vhome-accent-dark); }
.vhome-agent-btn.primary {
  background: var(--vhome-accent);
  color: #fff;
  border-color: var(--vhome-accent);
}
.vhome-agent-btn.primary:hover { background: var(--vhome-accent-dark); }
.vhome-agent-btn svg { width: 16px; height: 16px; fill: currentColor; }

.vhome-section-title {
  font-size: 12px;
  font-weight: 700;
  color: var(--vhome-muted);
  text-transform: uppercase;
  letter-spacing: 0.4px;
  margin: 18px 0 10px;
}

.vhome-faq-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-bottom: 4px;
}

.vhome-faq-chip {
  padding: 11px 12px;
  border-radius: 12px;
  border: 1px solid var(--vhome-border);
  background: var(--vhome-surface);
  color: var(--vhome-text);
  font-size: 12.5px;
  font-weight: 500;
  text-align: left;
  cursor: pointer;
  transition: all 0.15s ease;
  line-height: 1.35;
}
.vhome-faq-chip:hover {
  border-color: var(--vhome-accent);
  background: #eff6ff;
  color: var(--vhome-accent-dark);
}

@media (max-width: 360px) {
  .vhome-faq-grid { grid-template-columns: 1fr; }
}

.vhome-widget-bottom {
  padding: 16px;
  border-top: 1px solid var(--vhome-border);
  display: flex;
  flex-direction: column;
  gap: 12px;
  background: var(--vhome-bg);
  flex-shrink: 0;
}

.vhome-human-btn {
  width: 100%;
  padding: 12px;
  border-radius: 12px;
  border: 1px solid var(--vhome-border);
  background: var(--vhome-surface);
  color: var(--vhome-text);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.vhome-human-btn:hover { background: #fff; border-color: var(--vhome-accent); color: var(--vhome-accent-dark); }
.vhome-human-btn svg { width: 16px; height: 16px; fill: currentColor; }

.vhome-home-input-area {
  display: flex;
  gap: 8px;
  align-items: center;
  padding: 4px;
  border: 1px solid var(--vhome-border);
  border-radius: 26px;
  background: var(--vhome-surface);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}

.vhome-home-input {
  flex: 1;
  border: none;
  background: transparent;
  padding: 11px 16px;
  font-size: 14px;
  outline: none;
  color: var(--vhome-text);
}

.vhome-home-input::placeholder { color: #94a3b8; }

.vhome-home-send {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: none;
  background: var(--vhome-accent);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
  transition: background 0.15s ease, transform 0.15s ease;
}

.vhome-home-send:hover:not(:disabled) { background: var(--vhome-accent-dark); transform: scale(1.05); }
.vhome-home-send:disabled { background: #cbd5e1; cursor: not-allowed; }
.vhome-home-send svg { width: 18px; height: 18px; fill: currentColor; }

/* ---------- Chat view messages ---------- */
.vhome-chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  background: var(--vhome-surface);
}

.vhome-msg {
  display: flex;
  flex-direction: column;
  gap: 5px;
  max-width: 84%;
  animation: vhome-msg-in 0.22s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes vhome-msg-in {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

.vhome-msg.user { align-self: flex-end; }
.vhome-msg.bot { align-self: flex-start; }

.vhome-msg.user .vhome-msg-header,
.vhome-msg.user .vhome-msg-time {
  justify-content: flex-end;
  text-align: right;
}

.vhome-msg-header.vhome-user-header {
  justify-content: flex-end;
}

.vhome-msg-header {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  color: var(--vhome-muted);
  font-weight: 500;
}

.vhome-msg-avatar {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--vhome-border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  font-weight: 700;
  color: #475569;
  flex-shrink: 0;
}

.vhome-msg.user .vhome-msg-avatar { background: var(--vhome-user-bubble); color: #fff; }
.vhome-msg.bot .vhome-msg-avatar { background: #eff6ff; color: var(--vhome-accent); }

.vhome-msg-bubble {
  padding: 12px 15px;
  border-radius: 18px;
  font-size: 14px;
  line-height: 1.55;
  color: var(--vhome-text);
  word-break: break-word;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}

.vhome-msg-bubble strong { font-weight: 600; }
.vhome-msg-bubble em { font-style: italic; }
.vhome-msg-bubble a { color: var(--vhome-accent); text-decoration: underline; }
.vhome-msg-bubble br { display: block; content: ""; margin-bottom: 6px; }

.vhome-msg.user .vhome-msg-bubble {
  background: var(--vhome-user-bubble);
  color: #fff;
  border-bottom-right-radius: 5px;
}

.vhome-msg.bot .vhome-msg-bubble {
  background: var(--vhome-bot-bubble);
  border-bottom-left-radius: 5px;
  border: 1px solid rgba(226, 232, 240, 0.8);
}

.vhome-msg-time {
  font-size: 10px;
  color: #94a3b8;
  margin-top: 1px;
}

.vhome-typing {
  display: flex;
  align-items: center;
  gap: 2px;
  padding: 5px 7px;
}

.vhome-typing-dot {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: #94a3b8;
  animation: vhome-typing 1.4s infinite ease-in-out both;
}

.vhome-typing-dot:nth-child(1) { animation-delay: -0.32s; }
.vhome-typing-dot:nth-child(2) { animation-delay: -0.16s; }

@keyframes vhome-typing {
  0%, 80%, 100% { transform: scale(0.6); opacity: 0.5; }
  40% { transform: scale(1); opacity: 1; }
}

/* ---------- Chat input ---------- */
.vhome-chat-input-area {
  display: flex;
  gap: 10px;
  padding: 12px 16px 16px;
  border-top: 1px solid var(--vhome-border);
  align-items: flex-end;
  background: var(--vhome-bg);
  flex-shrink: 0;
}

.vhome-chat-input {
  flex: 1;
  border: 1px solid var(--vhome-border);
  border-radius: 20px;
  padding: 11px 16px;
  font-size: 14px;
  resize: none;
  max-height: 100px;
  min-height: 44px;
  outline: none;
  font-family: inherit;
  background: var(--vhome-surface);
  color: var(--vhome-text);
  line-height: 1.4;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.vhome-chat-input:focus { border-color: var(--vhome-accent); box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12); }

.vhome-chat-send {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: none;
  background: var(--vhome-accent);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
  transition: background 0.15s ease, transform 0.15s ease;
}

.vhome-chat-send:hover:not(:disabled) { background: var(--vhome-accent-dark); transform: scale(1.05); }
.vhome-chat-send:disabled { background: #cbd5e1; cursor: not-allowed; }
.vhome-chat-send svg { width: 18px; height: 18px; fill: currentColor; }

/* ---------- History view ---------- */
.vhome-history-list {
  flex: 1;
  overflow-y: auto;
  padding: 12px;
  background: var(--vhome-surface);
}

.vhome-hist-item {
  display: flex;
  gap: 12px;
  padding: 12px;
  border-radius: 14px;
  cursor: pointer;
  transition: background 0.15s ease, transform 0.15s ease;
  border: 1px solid transparent;
}

.vhome-hist-item:hover { background: var(--vhome-bg); transform: translateX(2px); }
.vhome-hist-item.active { background: #eff6ff; border-color: rgba(37, 99, 235, 0.18); }

.vhome-hist-icon {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--vhome-bot-bubble);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  flex-shrink: 0;
}

.vhome-hist-info { flex: 1; min-width: 0; }
.vhome-hist-preview {
  font-size: 13px;
  color: var(--vhome-text);
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.vhome-hist-meta { font-size: 11px; color: #94a3b8; margin-top: 4px; }

.vhome-history-empty {
  text-align: center;
  padding: 56px 24px;
  color: var(--vhome-muted);
  font-size: 14px;
}

.vhome-new-chat-btn {
  margin: 12px;
  padding: 13px;
  border-radius: 14px;
  border: none;
  background: var(--vhome-accent);
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  flex-shrink: 0;
  transition: background 0.15s ease, transform 0.15s ease;
}

.vhome-new-chat-btn:hover { background: var(--vhome-accent-dark); }
.vhome-new-chat-btn:active { transform: scale(0.98); }
.vhome-new-chat-btn svg { width: 18px; height: 18px; fill: currentColor; }

/* ---------- Human support overlay ---------- */
.vhome-support-overlay {
  position: absolute;
  inset: 0;
  background: var(--vhome-surface);
  z-index: 10;
  display: flex;
  flex-direction: column;
  animation: vhome-support-in 0.2s ease;
}

@keyframes vhome-support-in {
  from { opacity: 0; transform: translateX(20px); }
  to { opacity: 1; transform: translateX(0); }
}

.vhome-support-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--vhome-border);
  background: var(--vhome-bg);
  flex-shrink: 0;
}

.vhome-support-header h4 { margin: 0; font-size: 15px; font-weight: 700; color: var(--vhome-text); }
.vhome-support-header p { margin: 0; font-size: 12px; color: var(--vhome-muted); }

.vhome-support-status {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--vhome-muted);
}

.vhome-support-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #f59e0b;
}

.vhome-support-dot.online { background: #22c55e; }
.vhome-support-dot.offline { background: #ef4444; }

.vhome-support-messages {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  background: var(--vhome-surface);
}

.vhome-support-waiting {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 18px;
  color: var(--vhome-muted);
  font-size: 13px;
}

.vhome-support-waiting .vhome-spinner {
  width: 16px;
  height: 16px;
  border: 2px solid var(--vhome-border);
  border-top-color: var(--vhome-accent);
  border-radius: 50%;
  animation: vhome-spin 0.8s linear infinite;
}

@keyframes vhome-spin {
  to { transform: rotate(360deg); }
}

.vhome-support-input-area {
  padding: 12px 16px 16px;
  border-top: 1px solid var(--vhome-border);
  display: flex;
  gap: 10px;
  align-items: flex-end;
  background: var(--vhome-bg);
  flex-shrink: 0;
}

.vhome-support-input {
  flex: 1;
  border: 1px solid var(--vhome-border);
  border-radius: 20px;
  padding: 11px 16px;
  font-size: 14px;
  resize: none;
  max-height: 80px;
  min-height: 44px;
  outline: none;
  font-family: inherit;
  background: var(--vhome-surface);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.vhome-support-input:focus { border-color: var(--vhome-accent); box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12); }

.vhome-support-send {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: none;
  background: var(--vhome-accent);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
  transition: background 0.15s ease, transform 0.15s ease;
}

.vhome-support-send:hover:not(:disabled) { background: var(--vhome-accent-dark); transform: scale(1.05); }
.vhome-support-send:disabled { background: #cbd5e1; cursor: not-allowed; }

/* Scrollbar polish */
.vhome-chat-messages::-webkit-scrollbar,
.vhome-history-list::-webkit-scrollbar,
.vhome-home-content::-webkit-scrollbar,
.vhome-support-messages::-webkit-scrollbar {
  width: 6px;
}

.vhome-chat-messages::-webkit-scrollbar-thumb,
.vhome-history-list::-webkit-scrollbar-thumb,
.vhome-home-content::-webkit-scrollbar-thumb,
.vhome-support-messages::-webkit-scrollbar-thumb {
  background: rgba(148, 163, 184, 0.35);
  border-radius: 10px;
}

.vhome-chat-messages::-webkit-scrollbar-track,
.vhome-history-list::-webkit-scrollbar-track,
.vhome-home-content::-webkit-scrollbar-track,
.vhome-support-messages::-webkit-scrollbar-track {
  background: transparent;
}

/* ---------- Property cards in chat ---------- */
.vhome-property-cards {
  margin-top: 10px;
  width: 100%;
}

.vhome-cards-note {
  font-size: 11px;
  color: #64748b;
  margin-bottom: 6px;
  padding-left: 2px;
}

.vhome-cards-track {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding-bottom: 6px;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
}

.vhome-cards-track::-webkit-scrollbar {
  height: 5px;
}

.vhome-cards-track::-webkit-scrollbar-thumb {
  background: rgba(148, 163, 184, 0.4);
  border-radius: 10px;
}

.vhome-property-card {
  flex: 0 0 auto;
  width: 220px;
  background: #fff;
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid rgba(226, 232, 240, 0.9);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
  text-decoration: none;
  color: inherit;
  scroll-snap-align: start;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.vhome-property-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.08);
}

.vhome-card-media-wrap {
  position: relative;
  width: 100%;
  height: 130px;
  background: #f1f5f9;
}

.vhome-card-media-box {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.vhome-card-media {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.vhome-card-placeholder {
  color: #94a3b8;
  font-size: 12px;
}

.vhome-card-play {
  position: absolute;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.55);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  pointer-events: none;
}

.vhome-card-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 24px;
  height: 24px;
  border: none;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.85);
  color: #334155;
  font-size: 16px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12);
  z-index: 2;
}

.vhome-card-nav.prev { left: 6px; }
.vhome-card-nav.next { right: 6px; }

.vhome-card-dots {
  position: absolute;
  bottom: 6px;
  left: 0;
  right: 0;
  display: flex;
  justify-content: center;
  gap: 4px;
  z-index: 2;
}

.vhome-card-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.6);
}

.vhome-card-dot.active {
  background: #fff;
}

.vhome-card-body {
  padding: 10px 12px 12px;
}

.vhome-card-price {
  font-size: 14px;
  font-weight: 700;
  color: #2563eb;
  margin-bottom: 3px;
}

.vhome-card-title {
  font-size: 13px;
  font-weight: 600;
  color: #0f172a;
  line-height: 1.35;
  margin-bottom: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.vhome-card-subtitle {
  font-size: 11px;
  color: #475569;
  line-height: 1.35;
  margin-bottom: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.vhome-card-location {
  font-size: 11px;
  color: #64748b;
  margin-bottom: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.vhome-card-meta {
  font-size: 10px;
  color: #94a3b8;
}

@media (max-width: 420px) {
  .vhome-property-card {
    width: 180px;
  }
  .vhome-card-media-wrap {
    height: 110px;
  }
}

.vhome-browse-all {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-top: 8px;
  font-size: 12px;
  font-weight: 600;
  color: #2563eb;
  text-decoration: none;
}

.vhome-browse-all:hover {
  text-decoration: underline;
}
