/* Tito — bot simulator (3-pane: setup / WhatsApp chat / qualification) */

.sim-grid {
  display: grid;
  grid-template-columns: 320px 1fr 320px;
  gap: 16px;
  height: calc(100vh - 180px);
}

.sim-panel {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.sim-panel-head {
  padding: 14px 18px;
  border-bottom: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-shrink: 0;
}

.sim-panel-title {
  font-size: 13px;
  font-weight: 600;
}

.sim-panel-tag {
  font-family: var(--mono);
  font-size: 9px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--muted);
}

.sim-panel-body {
  flex: 1;
  overflow-y: auto;
  padding: 16px 18px;
}

/* ---- WhatsApp-style chat ---- */
.chat-thread {
  background: #ECE5DD;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='60' height='60' viewBox='0 0 60 60'%3E%3Cg fill='%23D4CDB8' fill-opacity='0.3'%3E%3Cpath d='M30 30c0-5.5 4.5-10 10-10s10 4.5 10 10-4.5 10-10 10c-5.5 0-10-4.5-10-10zM10 10c0-2.2 1.8-4 4-4s4 1.8 4 4-1.8 4-4 4-4-1.8-4-4z'/%3E%3C/g%3E%3C/svg%3E");
  display: flex;
  flex-direction: column;
}

.chat-head {
  background: #075E54;
  color: white;
  padding: 12px 18px;
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

.chat-head-avatar {
  width: 36px; height: 36px;
  background: var(--accent);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 14px;
}

.chat-head-info {
  flex: 1;
  min-width: 0;
}

.chat-head-name {
  font-weight: 500;
  font-size: 14px;
  margin-bottom: 2px;
}

.chat-head-status {
  font-size: 11px;
  color: rgba(255,255,255,0.7);
  display: flex;
  align-items: center;
  gap: 6px;
}

.typing-pulse {
  display: inline-block;
  width: 6px; height: 6px;
  background: #4FC04F;
  border-radius: 50%;
  animation: pulse 1.4s infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 0.4; }
  50% { opacity: 1; }
}

.chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.msg {
  max-width: 75%;
  padding: 8px 12px;
  border-radius: 8px;
  font-size: 13px;
  line-height: 1.4;
  position: relative;
  animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(4px); }
  to { opacity: 1; transform: translateY(0); }
}

.msg.in {
  background: white;
  align-self: flex-start;
  border-top-left-radius: 2px;
}

.msg.out {
  background: #DCF8C6;
  align-self: flex-end;
  border-top-right-radius: 2px;
}

.msg-time {
  font-size: 10px;
  color: rgba(0,0,0,0.45);
  margin-left: 8px;
  font-family: var(--mono);
}

.msg-typing {
  background: white;
  align-self: flex-start;
  padding: 12px 16px;
  border-radius: 8px;
  border-top-left-radius: 2px;
  display: flex;
  gap: 4px;
  align-items: center;
}

.typing-dot {
  width: 6px; height: 6px;
  background: #999;
  border-radius: 50%;
  animation: typing 1.4s infinite;
}

.typing-dot:nth-child(2) { animation-delay: 0.2s; }
.typing-dot:nth-child(3) { animation-delay: 0.4s; }

@keyframes typing {
  0%, 60%, 100% { transform: translateY(0); opacity: 0.5; }
  30% { transform: translateY(-4px); opacity: 1; }
}

.chat-input {
  background: #F0F0F0;
  padding: 10px 16px;
  display: flex;
  gap: 10px;
  align-items: center;
  flex-shrink: 0;
  border-top: 1px solid rgba(0,0,0,0.05);
}

.chat-input input {
  flex: 1;
  border: none;
  background: white;
  border-radius: 20px;
  padding: 10px 14px;
  font-size: 13px;
  outline: none;
}

.chat-input button {
  background: #075E54;
  color: white;
  border-radius: 50%;
  width: 36px; height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.chat-input button:hover { background: #054640; }

/* ---- Qualification panel ---- */
.qual-state {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.qual-item {
  padding: 12px;
  background: var(--bg-warm);
  border-radius: var(--radius-sm);
  border-left: 3px solid var(--border);
  transition: border-color 0.3s;
}

.qual-item.unanswered { border-left-color: var(--border); }
.qual-item.partial { border-left-color: var(--amber); }
.qual-item.confirmed { border-left-color: var(--green); }
.qual-item.flag { border-left-color: var(--red); }

.qual-item-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 4px;
}

.qual-item-title {
  font-size: 12px;
  font-weight: 600;
}

.qual-item-status {
  font-family: var(--mono);
  font-size: 9px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 2px 6px;
  border-radius: 3px;
  background: var(--bg-soft);
  color: var(--muted);
}

.qual-item.confirmed .qual-item-status { background: var(--green-soft); color: var(--green); }
.qual-item.partial .qual-item-status { background: var(--amber-soft); color: var(--amber); }
.qual-item.flag .qual-item-status { background: var(--red-soft); color: var(--red); }

.qual-item-detail {
  font-size: 11px;
  color: var(--muted);
  line-height: 1.5;
}

.qual-divider {
  border-top: 1px solid var(--border-soft);
  margin: 16px 0 12px;
  padding-top: 12px;
}

.escalation-card {
  background: linear-gradient(135deg, var(--accent-soft), var(--bg-warm));
  border: 1px solid var(--accent);
  border-radius: var(--radius);
  padding: 16px;
  margin-top: 12px;
  animation: glow 2s ease-in-out;
}

@keyframes glow {
  0% { box-shadow: 0 0 0 rgba(196,92,61,0); }
  50% { box-shadow: 0 0 20px rgba(196,92,61,0.3); }
  100% { box-shadow: 0 0 0 rgba(196,92,61,0); }
}

.escalation-label {
  font-family: var(--mono);
  font-size: 9px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--accent-deep);
  font-weight: 600;
  margin-bottom: 6px;
}

.escalation-text {
  font-size: 12px;
  color: var(--ink);
  line-height: 1.5;
  margin-bottom: 12px;
}

.escalation-actions {
  display: flex;
  gap: 6px;
}

.escalation-actions button {
  flex: 1;
  padding: 7px 10px;
  border-radius: 5px;
  font-size: 11px;
  font-weight: 500;
}

/* ---- Property card in left panel ---- */
.prop-card-mini {
  padding: 14px;
  background: var(--bg-warm);
  border-radius: var(--radius);
  margin-bottom: 16px;
}

.prop-card-mini h4 {
  font-family: var(--serif);
  font-size: 16px;
  font-weight: 500;
  margin-bottom: 4px;
}

.prop-card-mini .loc {
  font-size: 11px;
  color: var(--muted);
  margin-bottom: 12px;
}

.prop-card-mini .price {
  font-family: var(--serif);
  font-size: 22px;
  font-weight: 500;
  letter-spacing: -0.01em;
  color: var(--accent-deep);
  margin-bottom: 8px;
}

.prop-card-mini .feats {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 10px;
}

.feat-tag {
  font-size: 10px;
  background: white;
  padding: 3px 8px;
  border-radius: 10px;
  color: var(--ink-soft);
  border: 1px solid var(--border);
}

.scenario-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 12px;
}

.scenario-btn {
  text-align: left;
  padding: 10px 12px;
  background: white;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 12px;
  transition: all 0.15s;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.scenario-btn:hover {
  border-color: var(--accent);
  background: var(--accent-soft);
}

.scenario-btn strong {
  font-weight: 500;
  font-size: 12px;
}

.scenario-btn span {
  font-size: 10px;
  color: var(--muted);
}

