/* Tavo Prints AI Assistant widget styles */
#tavo-ai-widget-root {
  --tavo-bg: #F4F5F7;
  --tavo-surface: #FFFFFF;
  --tavo-ink: #1F2328;
  --tavo-accent: #2E5AAC;
  --tavo-accent2: #C1783A;
  --tavo-muted: #6B7280;
  --tavo-radius-sm: 4px;
  --tavo-radius-md: 8px;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  position: fixed;
  z-index: 999999;
  right: 20px;
  bottom: 20px;
}

#tavo-ai-widget-root * { box-sizing: border-box; }

.tavo-launcher {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: var(--tavo-accent);
  color: #fff;
  border: none;
  cursor: pointer;
  box-shadow: 0 6px 20px rgba(31,35,40,0.25);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.tavo-launcher:hover { transform: scale(1.06); box-shadow: 0 8px 24px rgba(31,35,40,0.32); }
.tavo-launcher svg { width: 28px; height: 28px; }

.tavo-launcher .tavo-badge {
  position: absolute;
  top: -2px;
  right: -2px;
  background: var(--tavo-accent2);
  color: #fff;
  font-size: 11px;
  font-weight: 600;
  border-radius: 999px;
  min-width: 18px;
  height: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 4px;
  border: 2px solid #fff;
}

.tavo-panel {
  position: absolute;
  bottom: 76px;
  right: 0;
  width: 370px;
  max-width: calc(100vw - 32px);
  height: 560px;
  max-height: calc(100vh - 120px);
  background: var(--tavo-surface);
  border-radius: 12px;
  box-shadow: 0 12px 40px rgba(31,35,40,0.25);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  opacity: 0;
  transform: translateY(12px) scale(0.98);
  pointer-events: none;
  transition: opacity 0.18s ease, transform 0.18s ease;
}
.tavo-panel.tavo-open {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}

.tavo-header {
  background: var(--tavo-ink);
  color: #fff;
  padding: 14px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-shrink: 0;
}
.tavo-header-title {
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 700;
  font-size: 16px;
  display: flex;
  flex-direction: column;
  line-height: 1.3;
}
.tavo-header-title span.tavo-sub {
  font-family: 'Inter', sans-serif;
  font-weight: 400;
  font-size: 12px;
  color: rgba(255,255,255,0.7);
}
.tavo-header-actions button {
  background: transparent;
  border: none;
  color: rgba(255,255,255,0.85);
  cursor: pointer;
  padding: 4px;
  display: flex;
}
.tavo-header-actions button:hover { color: #fff; }

.tavo-body {
  flex: 1;
  overflow-y: auto;
  padding: 14px;
  background: var(--tavo-bg);
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.tavo-msg {
  max-width: 84%;
  padding: 9px 12px;
  border-radius: var(--tavo-radius-md);
  font-size: 13.5px;
  line-height: 1.45;
  white-space: pre-wrap;
  word-wrap: break-word;
}
.tavo-msg-bot {
  align-self: flex-start;
  background: var(--tavo-surface);
  color: var(--tavo-ink);
  border: 1px solid #E5E7EB;
  border-bottom-left-radius: 2px;
}
.tavo-msg-user {
  align-self: flex-end;
  background: var(--tavo-accent);
  color: #fff;
  border-bottom-right-radius: 2px;
}
.tavo-msg-error {
  align-self: flex-start;
  background: #FDECEC;
  color: #9B2C2C;
  border: 1px solid #F5C2C2;
}

.tavo-typing {
  align-self: flex-start;
  display: flex;
  gap: 4px;
  padding: 10px 12px;
  background: var(--tavo-surface);
  border: 1px solid #E5E7EB;
  border-radius: var(--tavo-radius-md);
  border-bottom-left-radius: 2px;
}
.tavo-typing span {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--tavo-muted);
  animation: tavo-bounce 1.2s infinite ease-in-out;
}
.tavo-typing span:nth-child(2) { animation-delay: 0.15s; }
.tavo-typing span:nth-child(3) { animation-delay: 0.3s; }
@keyframes tavo-bounce {
  0%, 60%, 100% { transform: translateY(0); opacity: 0.5; }
  30% { transform: translateY(-4px); opacity: 1; }
}

.tavo-quick-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 0 14px 10px;
  background: var(--tavo-bg);
  flex-shrink: 0;
}
.tavo-chip {
  background: var(--tavo-surface);
  border: 1px solid #D9DCE1;
  color: var(--tavo-ink);
  border-radius: 999px;
  padding: 6px 12px;
  font-size: 12px;
  cursor: pointer;
  transition: border-color 0.15s ease;
}
.tavo-chip:hover { border-color: var(--tavo-accent); color: var(--tavo-accent); }

.tavo-cta-row {
  padding: 8px 14px;
  background: var(--tavo-bg);
  border-top: 1px solid #E5E7EB;
  flex-shrink: 0;
}
.tavo-cta-btn {
  width: 100%;
  background: var(--tavo-accent2);
  color: #fff;
  border: none;
  border-radius: var(--tavo-radius-sm);
  padding: 9px 12px;
  font-family: 'Inter', sans-serif;
  font-weight: 600;
  font-size: 13px;
  cursor: pointer;
}
.tavo-cta-btn:hover { filter: brightness(0.94); }

.tavo-input-row {
  display: flex;
  gap: 8px;
  padding: 10px 12px;
  background: var(--tavo-surface);
  border-top: 1px solid #E5E7EB;
  flex-shrink: 0;
}
.tavo-input-row textarea {
  flex: 1;
  resize: none;
  border: 1px solid #D9DCE1;
  border-radius: var(--tavo-radius-sm);
  padding: 8px 10px;
  font-family: 'Inter', sans-serif;
  font-size: 13.5px;
  color: var(--tavo-ink);
  max-height: 70px;
}
.tavo-input-row textarea:focus { outline: none; border-color: var(--tavo-accent); }
.tavo-send-btn {
  background: var(--tavo-accent);
  border: none;
  color: #fff;
  border-radius: var(--tavo-radius-sm);
  width: 38px;
  flex-shrink: 0;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}
.tavo-send-btn:disabled { opacity: 0.5; cursor: default; }
.tavo-send-btn svg { width: 18px; height: 18px; }

/* Lead / quote form */
.tavo-form-wrap {
  padding: 14px;
  overflow-y: auto;
  flex: 1;
  background: var(--tavo-bg);
}
.tavo-form-wrap h3 {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 15px;
  margin: 0 0 4px;
  color: var(--tavo-ink);
}
.tavo-form-wrap p.tavo-form-sub {
  font-size: 12.5px;
  color: var(--tavo-muted);
  margin: 0 0 14px;
}
.tavo-field { margin-bottom: 10px; }
.tavo-field label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: var(--tavo-ink);
  margin-bottom: 4px;
}
.tavo-field input, .tavo-field select, .tavo-field textarea {
  width: 100%;
  border: 1px solid #D9DCE1;
  border-radius: var(--tavo-radius-sm);
  padding: 8px 10px;
  font-family: 'Inter', sans-serif;
  font-size: 13px;
  color: var(--tavo-ink);
  background: #fff;
}
.tavo-field textarea { resize: vertical; min-height: 60px; }
.tavo-field input:focus, .tavo-field select:focus, .tavo-field textarea:focus {
  outline: none; border-color: var(--tavo-accent);
}
.tavo-hp { position: absolute; left: -9999px; opacity: 0; height: 0; }
.tavo-form-submit {
  width: 100%;
  background: var(--tavo-accent);
  color: #fff;
  border: none;
  border-radius: var(--tavo-radius-sm);
  padding: 10px 12px;
  font-family: 'Inter', sans-serif;
  font-weight: 600;
  font-size: 13.5px;
  cursor: pointer;
  margin-top: 4px;
}
.tavo-form-submit:disabled { opacity: 0.6; cursor: default; }
.tavo-form-back {
  background: transparent;
  border: none;
  color: var(--tavo-muted);
  font-size: 12px;
  cursor: pointer;
  padding: 0 0 10px;
  text-decoration: underline;
}
.tavo-form-error {
  color: #9B2C2C;
  font-size: 12px;
  margin-top: 6px;
}
.tavo-form-success {
  text-align: center;
  padding: 30px 10px;
}
.tavo-form-success svg { width: 40px; height: 40px; color: var(--tavo-accent); margin-bottom: 10px; }
.tavo-form-success h3 { font-family: 'Space Grotesk', sans-serif; margin: 0 0 6px; }
.tavo-form-success p { font-size: 13px; color: var(--tavo-muted); margin: 0; }

@media (max-width: 480px) {
  #tavo-ai-widget-root { right: 12px; bottom: 12px; }
  .tavo-panel { width: calc(100vw - 24px); right: -8px; }
}
