@import url("https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.5.2/css/all.min.css");
@import url("https://fonts.googleapis.com/css2?family=Poppins:wght@400;500;600;700&display=swap");

/* =========================================================
   Urja Chatbot – redesigned UI
   Red #d82b27 · Poppins · rounded cards · list-style options
   ========================================================= */

/* ---------- Font Awesome ---------- */
#chatbotContainer i,
#chatbotContainer .fa,
#chatbotContainer .fas,
#chatbotContainer .far,
#chatbotContainer .fal,
#chatbotContainer .fad,
#chatbotContainer .fab {
  font-family: "Font Awesome 6 Free" !important;
  font-weight: 900 !important;
  display: inline-block;
  font-style: normal;
  line-height: 1;
  text-rendering: auto;
  -webkit-font-smoothing: antialiased;
}

/* ---------- Reset (protects from host-site/WordPress CSS) ---------- */
#chatbotContainer * {
/*  all: unset;
  display: revert;
  box-sizing: border-box; */
}

#chatbotContainer {
  all: initial;
  font-family: "Poppins", Arial, sans-serif;
  position: relative;
  z-index: 9999;
}

/* ---------- Launcher (floating mascot button) ---------- */
#chatbotContainer .chat-btn {
  position: fixed !important;
  bottom: 60px !important;
  right: 10px !important;
  z-index: 12555;
  display: flex;
  justify-content: center;
  align-items: center;
  width: 65px !important;
  height: 65px !important;
  background-color: transparent;
  border: none;
  cursor: pointer;
}
#chatbotContainer .chat-btn img {
  width: 110px;
  margin: 0 !important;
}
@media (max-width: 480px) {
  #chatbotContainer .chat-btn img { width: 95px; }
}

/* ---------- Chat window ---------- */
#chatbotContainer .chat_wrapper {
  position: fixed;
  right: 20px;
  bottom: 40px;
  z-index: 444444 !important;
  display: flex;
  width: 370px;
  height: 570px;
  margin: 0;
  background: #f3f4f6;
  border-radius: 24px;
  box-shadow: 0 10px 35px rgba(0, 0, 0, 0.28);
  transition: all 0.4s;
}

#chatbotContainer #chat_container {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: 100%;
  height: 100%;
  padding: 12px 12px 10px;
  background: transparent;
}

/* ---------- Header ---------- */
#chatbotContainer #chat_header {
  display: grid;
  grid-template-columns: 46px 1fr;
  column-gap: 12px;
  align-items: center;
  flex: 0 0 auto;
  width: 100%;
  padding: 10px 14px;
  background: #d82b27;
  color: #fff;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
  text-align: left !important;
}
#chatbotContainer #chat_header img {
  grid-row: 1 / span 2;
  width: 46px;
  height: 46px;
  padding: 6px;
  background: #fff;
  border-radius: 50%;
  object-fit: contain;
}
#chatbotContainer #chat_header div {
  font-size: 28px;
  font-weight: 700;
  line-height: 1.15;
  color: #fff;
}
#chatbotContainer #chat_header p {
  margin: 0;
  font-size: 13px;
  font-weight: 500;
  line-height: 1.2;
  color: #fff !important;
}

/* ---------- Conversation area ---------- */
#chatbotContainer #chat_body {
  flex: 1 1 auto;
  min-height: 0;
  width: 100%;
  padding: 12px 10px 4px;
  overflow-y: auto;
  background: #fff;
  border-radius: 12px;
  scrollbar-width: thin;
  scrollbar-color: #c4c7cc transparent;
}
#chatbotContainer #chat_body::-webkit-scrollbar { width: 6px; }
#chatbotContainer #chat_body::-webkit-scrollbar-thumb {
  background: #c4c7cc;
  border-radius: 6px;
}

#chatbotContainer .userSection,
#chatbotContainer .botSection {
  display: block;
  width: 100%;
  margin: 0 0 12px;
  float: none;
}
#chatbotContainer .botSection::after,
#chatbotContainer .userSection::after {
  content: "";
  display: table;
  clear: both;
}
#chatbotContainer .seperator { display: none; }

/* Bot avatar */
#chatbotContainer .reply_icon {
  float: left;
  width: 48px;
  height: 48px;
  margin: 0 8px 0 0;
  background: #fff url(https://www.mahadiscom.in/ChatBot/logo.png) center / 68% no-repeat;
  border: 1px solid #d5d8dd;
  border-radius: 50%;
}

/* Bubbles */
#chatbotContainer .messages {
  max-width: 80%;
  margin: 0;
  padding: 11px 14px;
  font-size: 15px;
  font-weight: 500;
  line-height: 1.5;
  border-radius: 12px;
  word-wrap: break-word;
}
#chatbotContainer .user-message {
  float: right;
  background: #d82b27;
  color: #fff;
  text-align: left;
  border-radius: 12px 12px 2px 12px;
}
#chatbotContainer .bot-reply {
  display: inline-block;
  float: none;
  max-width: calc(100% - 58px);
  vertical-align: top;
  background: #eceef1;
  color: #1f2937;
  text-align: left;
  border: 1px solid #d5d8dd;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
}
#chatbotContainer .bot-reply a {
  color: #1d4ed8;
  text-decoration: underline !important;
}
#chatbotContainer .messages i { margin-right: 6px !important; }

/* ---------- Option buttons (list style) ---------- */
#chatbotContainer .bot_btn_section { margin-left: 0; }

#chatbotContainer .botSection .btns {
  position: relative;
  display: block;
  width: 100%;
  max-width: 100%;
  margin: 0 0 10px;
  padding: 14px 16px 14px 52px;
  float: none;
  background: #fff;
  color: #1f2937;
  font-size: 15px;
  font-weight: 500;
  text-align: left;
  border: 1px solid #d9dce1;
  border-radius: 10px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
  cursor: pointer;
  transition: border-color 0.2s, background-color 0.2s, box-shadow 0.2s;
}
#chatbotContainer .botSection .btns:hover {
  background: #fff5f5;
  border-color: #d82b27;
  box-shadow: 0 3px 10px rgba(216, 43, 39, 0.15);
}
#chatbotContainer .botSection .btns i {
  position: absolute;
  left: 18px;
  top: 50%;
  width: 22px;
  margin: 0 !important;
  font-size: 16px;
  text-align: center;
  color: #1f2937;
  transform: translateY(-50%);
}
#chatbotContainer .botSection .btns:hover i { color: #d82b27; }

/* "More Options" – centered, no icon gutter */
#chatbotContainer .botSection .btns.other_option {
  padding: 14px 16px;
  text-align: center;
}
#chatbotContainer .botSection .btns.other_option i {
  position: static;
  width: auto;
  margin-left: 6px !important;
  transform: none;
}

/* "Chat With Us" – solid red call-to-action */
#chatbotContainer .botSection .btns.chat_with_us {
  padding: 14px 16px;
  background: #d82b27;
  color: #fff;
  font-weight: 700;
  text-align: center;
  border-color: #d82b27;
}
#chatbotContainer .botSection .btns.chat_with_us:hover {
  background: #b9211e;
  border-color: #b9211e;
}
#chatbotContainer .botSection .btns.chat_with_us i { color: #fff; }

#chatbotContainer .Options { width: 100%; }

/* ---------- Language pills (English / मराठी) ---------- */
#chatbotContainer .lang_row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
#chatbotContainer .lang_row button.language {
  display: inline-block;
  width: auto;
  margin: 0;
  padding: 5px 14px;
  background: #fff;
  color: #1f2937;
  font-size: 14px;
  font-weight: 500;
  text-align: center;
  border: 2px solid #d82b27;
  border-radius: 8px;
  box-shadow: none;
  cursor: pointer;
}
#chatbotContainer .lang_row button.language:hover {
  background: #d82b27;
  color: #fff;
}

/* ---------- Input row ---------- */
#chatbotContainer #inputArea5555 {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 0 0 auto;
  width: 100%;
  height: auto;
  margin: 0;
  background: transparent;
}
#chatbotContainer #userInput {
  flex: 1 1 auto;
  min-width: 0;
  height: 48px;
  margin: 0;
  padding: 0 16px;
  float: none;
  background: #fff;
  color: #1f2937;
  font-size: 15px;
  line-height: 48px;
  border: none;
  border-radius: 10px;
  box-shadow: 0 1px 5px rgba(0, 0, 0, 0.1);
}
#chatbotContainer #userInput::placeholder { color: #8b929c; }
#chatbotContainer #userInput:disabled { opacity: 0.7; }

#chatbotContainer #send112 {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 56px;
  width: 56px;
  height: 48px;
  margin: 0;
  padding: 0;
  float: none;
  background: #d82b27;
  color: #fff;
  font-size: 22px;
  border: none;
  border-radius: 10px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
  cursor: pointer;
  transition: background-color 0.2s;
}
#chatbotContainer #send112:hover { background: #b9211e; }

/* ---------- Bottom icon row (home / refresh / close) ---------- */
#chatbotContainer #inputArea2 {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 18px;
  flex: 0 0 auto;
  width: 100%;
  padding: 0 72px 0 0;
  background: transparent;
}
#chatbotContainer #inputArea2 button {
  position: static;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  margin: 0;
  padding: 0;
  background: transparent;
  color: #000;
  font-size: 21px;
  border: none;
  box-shadow: none;
  cursor: pointer;
  transition: color 0.2s, transform 0.2s;
}
#chatbotContainer #inputArea2 button:hover {
  color: #d82b27;
  transform: scale(1.12);
}

/* Mascot in the bottom-right corner — click to close the chat */
#chatbotContainer .chat-mascot {
  position: absolute;
  right: -10px;
  bottom: -14px;
  z-index: 2;
  width: 82px;
  cursor: pointer;
  animation: botFloat 2.5s ease-in-out infinite;
}

/* ---------- Loading dots ---------- */
#chatbotContainer #loading .messages { max-width: 100% !important; }
#chatbotContainer .jumping-dots span {
  position: relative;
  display: inline-block;
  margin-left: auto;
  margin-right: auto;
  animation: jump 1s infinite;
}
#chatbotContainer .jumping-dots .dot-1,
#chatbotContainer .jumping-dots .dot-2,
#chatbotContainer .jumping-dots .dot-3 {
  width: 10px;
  height: 10px;
  margin-right: 3px;
  background-color: grey;
  border-radius: 50%;
}
#chatbotContainer .jumping-dots .dot-1 { animation-delay: 200ms; }
#chatbotContainer .jumping-dots .dot-2 { animation-delay: 400ms; }
#chatbotContainer .jumping-dots .dot-3 { animation-delay: 600ms; }

@keyframes jump {
  0%   { bottom: 0; }
  20%  { bottom: 5px; }
  40%  { bottom: 0; }
}

/* ---------- Cards ---------- */
#chatbotContainer .rw-carousel-card-image {
  display: block;
  width: 100%;
  height: 150px;
  object-fit: cover;
  background-color: #b5b5b5;
  cursor: pointer;
}
#chatbotContainer .card-chat_body {
  padding: 22px !important;
  padding-bottom: 20px;
}
#chatbotContainer .card-text { font-size: 13px; }

/* ---------- Accessibility ---------- */
#chatbotContainer *:focus {
  outline: 3px solid #505750ff !important;
  outline-offset: 1px;
}

/* ---------- Small screens ---------- */
@media (max-width: 400px) {
  #chatbotContainer .chat_wrapper {
    width: calc(100vw - 30px) !important;
    right: 10px;
    bottom: 10px;
  }
}