html,
body {
  margin: 0;
  padding: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
}

#chat-window {
  width: 100%;
  height: 100%;
  background: white;
  position: relative;
  display: flex;
  flex-direction: column;
  font-family: Arial, sans-serif;
}

#chat-header {
  background: #4f46e5;
  color: white;
  display: flex;
  align-items: center;
  font-weight: 600;
  padding: 6px 8px;
}

.chat-header-title {
  font-size: 12px;
  font-weight: 700;
  line-height: 1;
}

.chatbot-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #4f46e5;
  color: #fff;
  padding: 10px 8px!important;
  font-weight: 600;
  font-size: 12px;
  line-height: 1.1;
}

.chatbot-panel-header h5 {
  margin: 0;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.1;
}

#chat-messages {
  flex: 1;
  padding: 10px;
  overflow-y: auto;
  font-size: 14px;
}

.message {
  margin-bottom: 6px;
}

.message.user {
  text-align: right;
  color: #1f2937;
}

.user-message-text {
  display: inline-block;
  max-width: calc(100% - 32px);
  vertical-align: middle;
  overflow-wrap: anywhere;
}

.user-resend-btn {
  width: 22px;
  height: 22px;
  margin-left: 6px;
  border: 1px solid #93c5fd;
  border-radius: 999px;
  background: #eff6ff;
  color: #1d4ed8;
  font-size: 12px;
  line-height: 1;
  cursor: pointer;
  vertical-align: middle;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.user-resend-btn:hover {
  background: #dbeafe;
  border-color: #60a5fa;
}

.message.bot {
  text-align: left;
  color: #374151;
}

.message.bot.processing-status {
  color: #475569;
}

.message.bot.done-status {
  color: #166534;
  font-weight: 700;
}

.status-done {
  color: #15803d;
}

.message.bot.question {
  color: #0f4c81;
  font-style: italic;
  font-weight: 600;
  background: #e0f2fe;
  border-left: 3px solid #0284c7;
  border-radius: 8px;
  padding: 8px 10px;
}

.temp-compare-block {
  margin-top: 4px;
  border: 1px solid #dbeafe;
  background: #f8fbff;
  border-radius: 10px;
  padding: 8px;
}

.temp-compare-title {
  font-weight: 700;
  color: #1e3a8a;
  margin-bottom: 4px;
}

.temp-compare-subtitle {
  color: #334155;
  font-size: 12px;
  line-height: 1.35;
  margin-bottom: 8px;
}

.temp-compare-subtitle em {
  font-style: italic;
}

.temp-compare-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
}

.temp-compare-table th,
.temp-compare-table td {
  border: 1px solid #dbeafe;
  padding: 6px;
  vertical-align: top;
}

.temp-compare-label,
.temp-compare-hour,
.temp-compare-address {
  background: #eff6ff;
  color: #1e3a8a;
  font-weight: 700;
}

.temp-compare-cell {
  color: #1f2937;
}

.temp-hot {
  color: #b91c1c;
  font-weight: 700;
}

.temp-typical {
  color: #0369a1;
  font-weight: 600;
}

.message-actions.yes-no-actions {
  display: flex;
  gap: 8px;
  margin: 6px 0 10px;
}

.yes-no-btn {
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  padding: 6px 12px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  background: #f8fafc;
  color: #1e293b;
}

.yes-no-btn.yes {
  border-color: #2563eb;
  color: #1d4ed8;
  background: #eff6ff;
}

.yes-no-btn.no {
  border-color: #dc2626;
  color: #b91c1c;
  background: #fef2f2;
}

.yes-no-btn:hover {
  filter: brightness(0.98);
}

.yes-no-btn:disabled {
  cursor: default;
  opacity: 0.65;
}

#chat-suggestions {
  padding: 8px;
  border-top: 1px solid #eee;
}

#chat-suggestions button {
  display: block;
  width: 100%;
  margin-bottom: 6px;
  font-size: 12px;
  cursor: pointer;
}

#chat-input {
  display: flex;
  align-items: flex-end;
  padding: 8px;
  border-top: 1px solid #eee;
  gap: 6px;
}

#chat-input textarea {
  flex: 1;
  min-height: 44px;
  padding: 8px 10px;
  resize: none;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  font: inherit;
  line-height: 1.35;
  box-sizing: border-box;
}

#clear-chat {
  width: 26px;
  height: 32px;
  padding: 0;
  border: 1px solid #dc2626;
  border-radius: 6px;
  background: #fee2e2;
  color: #b91c1c;
  cursor: pointer;
  font-size: 14px;
  font-weight: 600;
  line-height: 1;
  flex: 0 0 auto;
  box-shadow: 0 1px 2px rgba(127, 29, 29, 0.14);
}

#clear-chat:hover {
  background: #fecaca;
  border-color: #b91c1c;
  color: #991b1b;
}

#send {
  width: 32px;
  height: 32px;
  padding: 0;
  border: 1px solid #2563eb;
  border-radius: 6px;
  background: #2563eb;
  color: #ffffff;
  cursor: pointer;
  flex: 0 0 auto;
  box-shadow: 0 2px 4px rgba(30, 64, 175, 0.24);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

#send:hover {
  background: #1d4ed8;
  border-color: #1d4ed8;
  color: #ffffff;
}

#send svg {
  width: 16px;
  height: 16px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2.4;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.chat-modal {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 20;
}

.chat-modal.hidden {
  display: none;
}

.chat-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.35);
  backdrop-filter: blur(2px);
}

.chat-modal-card {
  position: relative;
  z-index: 1;
  width: calc(100% - 32px);
  max-width: 320px;
  border-radius: 18px;
  background: #ffffff;
  border: 1px solid rgba(148, 163, 184, 0.35);
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.22);
  padding: 16px;
}

.chat-modal-title {
  font-size: 14px;
  font-weight: 700;
  color: #0f172a;
  margin-bottom: 8px;
}

.chat-modal-text {
  font-size: 12px;
  line-height: 1.45;
  color: #475569;
  margin-bottom: 14px;
}

.chat-modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

.chat-modal-actions button {
  border: 0;
  border-radius: 10px;
  padding: 8px 12px;
  font-size: 12px;
  cursor: pointer;
}

#clear-chat-cancel {
  background: #e2e8f0;
  color: #0f172a;
}

#clear-chat-confirm {
  background: #ef4444;
  color: #fff;
}

#clear-chat-cancel:hover {
  background: #cbd5e1;
}

#clear-chat-confirm:hover {
  background: #dc2626;
}
