/* Zeus Smart Chat */
.zsc { font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif; }

.zsc-floating { position: fixed; bottom: 20px; right: 20px; z-index: 99999; }

.zsc-launcher {
  width: 60px; height: 60px; border-radius: 50%;
  background: var(--zsc-primary, #d97757); color: var(--zsc-text, #fff);
  border: none; cursor: pointer;
  box-shadow: 0 4px 20px rgba(0,0,0,0.15);
  display: flex; align-items: center; justify-content: center;
  transition: transform 0.2s;
}
.zsc-launcher:hover { transform: scale(1.05); }
.zsc-launcher svg { width: 28px; height: 28px; }

.zsc-panel {
  position: absolute; bottom: 80px; right: 0;
  width: 380px; max-width: calc(100vw - 40px);
  height: 560px; max-height: calc(100vh - 120px);
  background: #fff; border-radius: 14px;
  box-shadow: 0 10px 40px rgba(0,0,0,0.2);
  display: flex; flex-direction: column; overflow: hidden;
  opacity: 0; transform: translateY(10px); pointer-events: none;
  transition: opacity 0.2s, transform 0.2s;
}
.zsc-panel.zsc-open { opacity: 1; transform: translateY(0); pointer-events: auto; }

.zsc-inline { max-width: 720px; margin: 20px auto; }
.zsc-inline .zsc-panel {
  position: static; width: 100%; height: 600px; max-height: none;
  opacity: 1; transform: none; pointer-events: auto;
  border: 1px solid #e5e7eb; box-shadow: none;
}
.zsc-inline .zsc-launcher { display: none; }

.zsc-header {
  background: var(--zsc-primary, #d97757); color: var(--zsc-text, #fff);
  padding: 14px 16px; display: flex; align-items: center; gap: 10px;
}
.zsc-header h3 { margin: 0; font-size: 15px; font-weight: 600; flex: 1; }
.zsc-header button {
  background: transparent; border: none; color: inherit; cursor: pointer;
  font-size: 13px; opacity: 0.85; padding: 4px 8px;
}
.zsc-header button:hover { opacity: 1; }
.zsc-header .zsc-end { font-size: 12px; border: 1px solid rgba(255,255,255,0.4); border-radius: 4px; }

.zsc-messages {
  flex: 1; overflow-y: auto; padding: 16px;
  display: flex; flex-direction: column; gap: 10px; background: #f9fafb;
}
.zsc-msg {
  padding: 10px 13px; border-radius: 12px; max-width: 85%;
  line-height: 1.45; font-size: 14px; word-wrap: break-word; white-space: pre-wrap;
}
.zsc-msg.user { background: var(--zsc-primary, #d97757); color: var(--zsc-text, #fff); align-self: flex-end; border-bottom-right-radius: 4px; }
.zsc-msg.bot { background: #fff; color: #1f2937; align-self: flex-start; border: 1px solid #e5e7eb; border-bottom-left-radius: 4px; }
.zsc-msg.typing { color: #6b7280; font-style: italic; }

.zsc-items { display: flex; flex-direction: column; gap: 8px; align-self: flex-start; max-width: 92%; }
.zsc-item {
  display: flex; gap: 10px; background: #fff; border: 1px solid #e5e7eb;
  border-radius: 10px; padding: 10px; text-decoration: none; color: inherit;
  transition: border-color 0.15s;
}
.zsc-item:hover { border-color: var(--zsc-primary, #d97757); }
.zsc-item img { width: 56px; height: 56px; object-fit: cover; border-radius: 6px; flex-shrink: 0; background: #f3f4f6; }
.zsc-item-info { flex: 1; min-width: 0; }
.zsc-item-title {
  font-size: 13px; font-weight: 600; color: #1f2937; margin: 0 0 2px;
  overflow: hidden; text-overflow: ellipsis;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
}
.zsc-item-meta { font-size: 12px; color: #6b7280; }
.zsc-item-price { color: var(--zsc-primary, #d97757); font-weight: 600; }

.zsc-input-row { display: flex; gap: 8px; padding: 10px; border-top: 1px solid #e5e7eb; background: #fff; }
.zsc-input-row textarea {
  flex: 1; resize: none; border: 1px solid #d1d5db; border-radius: 8px;
  padding: 8px 10px; font-family: inherit; font-size: 14px; max-height: 100px; box-sizing: border-box;
}
.zsc-input-row textarea:focus { outline: none; border-color: var(--zsc-primary, #d97757); }
.zsc-input-row button {
  background: var(--zsc-primary, #d97757); color: var(--zsc-text, #fff);
  border: none; border-radius: 8px; padding: 0 18px; font-weight: 600; font-size: 14px; cursor: pointer;
}
.zsc-input-row button:disabled { opacity: 0.5; cursor: not-allowed; }

/* Lead form at end */
.zsc-lead {
  padding: 20px 16px; background: #f9fafb; border-top: 1px solid #e5e7eb;
  overflow-y: auto;
}
.zsc-lead p { margin: 0 0 12px; font-size: 14px; color: #1f2937; }
.zsc-lead input[type="text"], .zsc-lead input[type="email"], .zsc-lead input[type="tel"] {
  width: 100%; padding: 10px 12px; margin-bottom: 10px;
  border: 1px solid #d1d5db; border-radius: 8px; font-size: 14px;
  font-family: inherit; box-sizing: border-box;
}
.zsc-lead input:focus { outline: none; border-color: var(--zsc-primary, #d97757); }
.zsc-checkbox { display: flex; gap: 8px; align-items: flex-start; font-size: 12px; color: #4b5563; margin: 6px 0 12px; }
.zsc-checkbox input { margin-top: 2px; }
.zsc-lead .zsc-actions { display: flex; gap: 8px; }
.zsc-lead button {
  border: none; border-radius: 8px; padding: 10px 16px;
  font-weight: 600; font-size: 14px; cursor: pointer; font-family: inherit;
}
.zsc-lead .primary { background: var(--zsc-primary, #d97757); color: var(--zsc-text, #fff); flex: 1; }
.zsc-lead .secondary { background: #e5e7eb; color: #374151; }
.zsc-err { color: #dc2626; font-size: 13px; margin: 0 0 8px; }

@media (max-width: 480px) {
  .zsc-panel { width: calc(100vw - 20px); right: -10px; height: calc(100vh - 100px); }
}
