/* ── TAMAD Chatbot Widget ─────────────────────────────────────────────────── */
#tamad-chat-btn {
  position: fixed;
  bottom: 24px;
  left: 24px;
  z-index: 9998;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: #1e293b;
  border: 1px solid #334155;
  color: #e2e8f0;
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 0.5px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 16px rgba(0,0,0,0.5);
  transition: background 0.2s;
}
#tamad-chat-btn:hover { background: #273449; }

#tamad-chat-panel {
  position: fixed;
  z-index: 9999;
  width: 340px;
  height: 460px;
  background: #0f172a;
  border: 1px solid #1e293b;
  border-radius: 12px;
  display: flex;
  flex-direction: column;
  box-shadow: 0 8px 32px rgba(0,0,0,0.6);
  overflow: hidden;
  bottom: 84px;
  left: 24px;
}
#tamad-chat-panel.hidden { display: none; }

#tamad-chat-header {
  background: #1e293b;
  padding: 10px 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: grab;
  user-select: none;
  border-bottom: 1px solid #334155;
}
#tamad-chat-header:active { cursor: grabbing; }
#tamad-chat-header span { color: #94a3b8; font-size: 13px; font-weight: 600; letter-spacing: 0.5px; }

#tamad-chat-close,
#tamad-chat-reset {
  background: none;
  border: none;
  color: #64748b;
  font-size: 15px;
  cursor: pointer;
  line-height: 1;
  padding: 0 2px;
}
#tamad-chat-close:hover,
#tamad-chat-reset:hover { color: #e2e8f0; }

#tamad-chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  scrollbar-width: thin;
  scrollbar-color: #1e293b transparent;
}

.tcm-user, .tcm-bot {
  max-width: 88%;
  padding: 8px 11px;
  border-radius: 10px;
  font-size: 13px;
  line-height: 1.45;
  word-break: break-word;
}
.tcm-user {
  align-self: flex-end;
  background: #1d4ed8;
  color: #e0e7ff;
  border-bottom-right-radius: 3px;
}
.tcm-bot {
  align-self: flex-start;
  background: #1e293b;
  color: #cbd5e1;
  border-bottom-left-radius: 3px;
}
.tcm-typing {
  align-self: flex-start;
  color: #475569;
  font-size: 20px;
  padding: 4px 8px;
  letter-spacing: 3px;
}

#tamad-chat-input-row {
  display: flex;
  gap: 6px;
  padding: 10px;
  border-top: 1px solid #1e293b;
  background: #0f172a;
}
#tamad-chat-input {
  flex: 1;
  background: #1e293b;
  border: 1px solid #334155;
  border-radius: 8px;
  color: #e2e8f0;
  padding: 7px 10px;
  font-size: 13px;
  outline: none;
  resize: none;
}
#tamad-chat-input::placeholder { color: #475569; }
#tamad-chat-send {
  background: #1d4ed8;
  border: none;
  border-radius: 8px;
  color: #fff;
  padding: 7px 12px;
  font-size: 13px;
  cursor: pointer;
  transition: background 0.2s;
}
#tamad-chat-send:hover { background: #2563eb; }
#tamad-chat-send:disabled { background: #1e293b; color: #475569; cursor: default; }
