/* =========================
   HARD RESET (ISOLATION MODE)
========================= */
body.chatbot-only {
  all: unset;
  font-family: Arial, sans-serif;
}

/* Prevent theme bleed */
body.chatbot-only * {
  box-sizing: border-box;
}
/* =========================
   ISOLATION (CRITICAL FIX)
========================= */
#chatPanel,
#chatPanel * {
  box-sizing: border-box;
  font-family: Arial, sans-serif;
}

/* =========================
   PANEL (FORCED OVERRIDE)
========================= */
#chatPanel {
  position: fixed !important;
  top: 0 !important;
  right: -420px !important;
  width: 420px !important;
  height: 100vh !important;

  background: #ffffff !important;

  border-radius: 0 !important;
  box-shadow: -10px 0 30px rgba(0,0,0,0.2) !important;

  display: flex !important;
  flex-direction: column !important;

  z-index: 999999 !important;

  transition: right 0.35s ease !important;
}

#chatPanel.active {
  right: 0 !important;
}

/* =========================
   OVERLAY
========================= */
#chatOverlay {
  position: fixed !important;
  inset: 0 !important;
  background: rgba(0,0,0,0.45) !important;
  backdrop-filter: blur(4px) !important;
  z-index: 999998 !important;

  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}

#chatOverlay.active {
  opacity: 1;
  visibility: visible;
}

/* =========================
   FAQ SECTION
========================= */
#chatPanel .faq-section {
  padding: 18px;
  border-bottom: 1px solid #eee;
  max-height: 38%;
  overflow-y: auto;
  background: #fafafa;
}

#chatPanel .faq-section h3 {
  margin-bottom: 12px;
  font-size: 18px;
}

#chatPanel .faq-question {
  width: 100%;
  text-align: left;
  background: #f1f1f1;
  border: none;
  padding: 12px;
  margin-bottom: 8px;
  cursor: pointer;
  font-weight: bold;
  border-radius: 6px;
  transition: background 0.2s ease;
}

#chatPanel .faq-question:hover {
  background: #e7e7e7;
}

#chatPanel .faq-answer {
  display: none;
  padding: 10px;
  font-size: 14px;
  background: #ffffff;
  margin-bottom: 10px;
  border-left: 3px solid #ea1e28;
}

/* =========================
   CHAT SECTION
========================= */
#chatPanel .chat-section {
  flex: 1;
  display: flex;
  flex-direction: column;
  height: 100%;
}

/* HEADER */
#chatPanel .chat-header {
  background: #16325c;
  color: #fff;
  padding: 16px;
  font-weight: bold;
  position: relative;
}

#chatPanel .chat-header span {
  display: block;
  font-size: 12px;
  opacity: 0.8;
}

/* CLOSE */
#chatPanel .chat-close {
  position: absolute;
  right: 14px;
  top: 14px;
  cursor: pointer;
  font-size: 18px;
}

/* MESSAGES */
#chatPanel .chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
  background: #f9f9f9;
}

/* FORM */
#chatPanel .chat-form {
  padding: 12px;
  border-top: 1px solid #eee;
  display: flex;
  gap: 8px;
  background: #fff;
}

#chatPanel .chat-form input {
  flex: 1;
  padding: 12px;
  border: 1px solid #ddd;
  border-radius: 6px;
}

#chatPanel .chat-form button {
  background: #ea1e28;
  color: #fff;
  border: none;
  padding: 12px 16px;
  border-radius: 6px;
  cursor: pointer;
  font-weight: bold;
}

/* =========================
   FLOATING BUTTON
========================= */
#chatToggle {
  position: fixed !important;
  bottom: 25px !important;
  right: 25px !important;

  background: #ea1e28 !important;
  color: #fff !important;

  border: none !important;
  padding: 16px !important;
  border-radius: 50% !important;

  font-size: 20px !important;
  cursor: pointer !important;

  z-index: 1000000 !important;

  box-shadow: 0 6px 18px rgba(0,0,0,0.3);
  transition: transform 0.2s ease;
}

#chatToggle:hover {
  transform: scale(1.08);
}