:root {
  --body-bg: linear-gradient(135deg, #ffffff 0%, #ffffff 100%);
  --msger-bg: linear-gradient(45deg, #9bd1c7, transparent);
  /* --msger-bg: #f6f6f6; */

  --border: 2px solid #e6e6e6;
  --left-msg-bg: #f5f5f5;
  --right-msg-bg: black;
}

.card {
  border: 1px solid #ccc;
  border-radius: 10px;
  padding: 10px;
  width: 100%;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
  background-color: white;
}
.option {
  padding: 10px;
  margin: 5px 0;
  border: 1px solid #ccc;
  border-radius: 5px;
  cursor: pointer;
}
.option:hover {
  background-color: #f0f0f0;
}
.selected {
  background-color: #f1c5b1;
  border-color: #002A41;
}

body {
  display: flex;
  justify-content: center;
  align-items: center;
  height: 100vh;
  /* background-image: var(--body-bg); */
  font-family: "Roboto", Arial, sans-serif;
  margin: 0;
  padding: 0;
  box-shadow: 0 0 20px rgba(0, 0, 0, 0.5);
}

.msger {
  display: flex;
  flex-flow: column wrap;
  justify-content: space-between;
  width: 100%;
  /* height: 100%; */
  max-width: 450px;
  /* margin: 25px; */
  height: calc(100% - 50px);
  border: var(--border);
  border-radius: 10px;
  background: var(--msger-bg);
  box-shadow: 0 5px 10px rgba(0, 0, 0, 0.1);
  overflow: hidden;
  margin-top: 1%;
}

.msger-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px;
  border-bottom: var(--border);
  background: #44c639;
  color: #fff;
  font-weight: bold;
  border-top-left-radius: 10px;
  border-top-right-radius: 10px;
}

.msger-header-icon-div {
  width: 60px;
  height: 60px;
  background-color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  cursor: pointer;
  position: relative;
  justify-content: center;
}

.msger-header-icon-div::after {
  content: "";
  width: 15px;
  height: 15px;
  background-image: url("../img/active.png");
  background-size: cover;
  position: absolute;
  top: 45px;
  right: 5px;
  left: 40px;
  border-radius: 50%;
  z-index: 12;
}

.msger-header-icon {
  width: 70%;
  height: 70%;
  object-fit: contain;
  color: white;
}

.msger-header-title {
  flex-grow: 1;
  margin-left: 10px;
  font-family: "Roboto", sans-serif;
  font-size: 22px;
  font-weight: 800;
  letter-spacing: .03em;
  line-height: 1.1923076923;
  text-rendering: optimizeLegibility;
}

.msg-text {
  font-family: "Roboto", sans-serif;
  font-size: 15px;
  line-height: 1.5;
}

.msg-text-right {
  font-family: "Roboto", sans-serif;
  font-size: 14px;
  color: white;
}

.bot-msg-text-right{
  font-family: "Roboto", sans-serif;
  font-size: 14px;
  color: black;
}

.msger-chat {
  flex: 1;
  overflow-y: auto;
  scroll-behavior: smooth;
  padding: 15px;
  background: white;
}

.msger-chat::-webkit-scrollbar {
  width: 6px;
}

.msger-chat::-webkit-scrollbar-track {
  background: #e6e6e6;
}

.msger-chat::-webkit-scrollbar-thumb {
  background: #bdbdbd;
}

.msg {
  display: flex;
  align-items: flex-end;
}

.msg:last-of-type {
  margin: 0;
}

.msg-bubble-time-div {
  display: flex;
  flex-direction: column;
}

/* Base message image container - SINGLE SOURCE OF TRUTH */
.msg-img {
  width: 45px !important;
  height: 45px !important;
  display: flex;
  justify-content: center;
  align-items: center;
  margin-right: 10px;
  border-radius: 50%;
  background-color: #ffffff;
  align-self: flex-start;
  /* margin-top: 20px; */
}

/* Base icon styles - SINGLE SOURCE OF TRUTH */
.left-msg-icon,
.right-msg-icon {
  width: 40px !important;
  height: 40px !important;
  object-fit: contain;
}

.msg-bubble {
  max-width: 400px;
  padding: 10px;
  border-radius: 15px;
  font-size: 0.9em;
  color: black;
  overflow-wrap: break-word;
}

.msg-bubble-time-div {
  display: flex;
  flex-direction: column;
}

.msg-info {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-left: 45px;
}

.msg-info-name {
  margin-right: 10px;
  font-weight: 900;
  color: #304361;
  font-size: 0.83em;
}

.msg-info-time {
  font-size: 0.6rem;
  color: #939191;
  margin-left: 10px;
  margin-top: 5px;
  display: flex;
  justify-content: flex-start;
  margin-right: 45px;
}

.msg.right-msg .msg-info-time {
  font-size: 0.6rem;
  color: #939191;
  margin-right: 10px;
  margin-top: 5px;
  display: flex;
  justify-content: flex-end;
}

.left-msg .msg-bubble {
  border-bottom-left-radius: 0px;
  background: #eaf0f6;
  margin-left: 10px;
  margin-top: 10px;
}

/* Right message specific adjustments */
.right-msg {
  flex-direction: row-reverse;
  margin-right: 26px;
}

.right-msg .msg-bubble {
  background: #44c639;
  color: white;
  border-bottom-right-radius: 0px;
  margin-left: 10px;
  margin-top: 10px;
}

.right-msg .msg-img {
  margin: 10px 0 0 10px;
}

.left-msg .msg-img {
  margin: 0 0 0 10px;
  margin-top: 5px;
}

.msger-inputarea {
  padding: 13px;
  border-top: 1px solid #506880;
  background: white;
  width: 95%;
  font-family: "Roboto", sans-serif;
  padding-left: 3%;
}

.send-icon-div {
  display: flex;
  justify-content: row;
}

.send-icon {
  width: 100%;
  height: 100%;
  margin-top: 25%;
}

.msger-inputarea * {
  border: none;
  border-radius: 4px;
  font-size: 1em;
  font-family: "Roboto", sans-serif;
}

.msger-input {
  flex: 1;
  background: #eaf0f6;
  width: 83%;
  padding: 10px;
  border-radius: 10px;
  font-family: "Roboto", sans-serif;
}

.msger-send-btn {
  margin-left: 10px;
  background: none;
  color: #2fa77c;
  font-weight: bold;
  cursor: pointer;
  width: 8%;
  height: 8%;
  transition: background 0.3s;
  border: none;
  font-size: 25px;
  padding-left: 0px;
}

.msger-send-btn:hover {
  border: none;
}

.freeze {
  background: none;
}

.freeze:disabled {
  background: none;
}

.form-div {
  margin-bottom: 10px;
}

.loader {
  display: none;
  margin: 0 auto;
  width: 60px;
  text-align: center;
}

.loader span {
  display: inline-block;
  width: 10px;
  height: 10px;
  background-color: #ccc;
  border-radius: 50%;
  margin-right: 5px;
  animation: dotAnimation 1s infinite ease-in-out;
}

.loader span:nth-child(1) {
  animation-delay: 0s;
}

.loader span:nth-child(2) {
  animation-delay: 0.2s;
}

.loader span:nth-child(3) {
  animation-delay: 0.4s;
}

@keyframes dotAnimation {
  0% {
      transform: translateY(0);
  }
  50% {
      transform: translateY(-5px);
  }
  100% {
      transform: translateY(0);
  }
}

.send-container {
  position: relative;
  display: inline-block;
}

.clear-chat-icon {
  width: 30px;
  height: 30px;
  right: 2%;
}

.clear-chat {
  background: none;
  border: none;
  color: white;
  margin-right: 20px;
}

.fa fa-lightbulb-o {
  padding: 0;
  top: 5%;
}

.custom-hr {
  background-color: #000;
  margin: 20px 0;
}

.tooltip {
  position: relative;
}

.tooltip:before {
  content: "Examples";
  visibility: hidden;
  background-color: #616461;
  color: #fff;
  text-align: center;
  border-radius: 6px;
  padding: 5px 7px;
  font-size: 14px;
  position: absolute;
  z-index: 1;
  top: 90%;
  font-weight: bold;
  left: 130%;
  transform: translateX(-50%);
  opacity: 0;
  transition: opacity 0.3s;
}

.tooltip:hover:before {
  visibility: visible;
  opacity: 1;
}

.tooltip-chat {
  position: relative;
}

.tooltip-chat:before {
  content: "clear chat";
  visibility: hidden;
  background-color: #616461;
  color: #fff;
  text-align: center;
  border-radius: 6px;
  padding: 6px 0px;
  font-size: 14px;
  position: absolute;
  z-index: 1;
  top: 140%;
  font-weight: bold;
  right: 81%;
  transform: translateX(42%);
  opacity: 0;
  transition: opacity 0.3s;
  width: 81px;
}

.tooltip-chat:hover:before {
  visibility: visible;
  opacity: 1;
}

.bouncing-loader-container {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 2px 0;
}

.bouncing-loader {
  display: flex;
  justify-content: center;
  align-items: center;
}

.bouncing-loader .dot {
  width: 10px;
  height: 10px;
  margin: 0 4px;
  border-radius: 50%;
  background-color: #666;
  animation: bouncing-loader 0.6s infinite alternate;
}

.bouncing-loader .dot:nth-child(2) {
  animation-delay: 0.2s;
  background-color: #888;
}

.bouncing-loader .dot:nth-child(3) {
  animation-delay: 0.4s;
  background-color: #aaa;
}

@keyframes bouncing-loader {
  from {
      opacity: 1;
      transform: translateY(0);
  }
  to {
      opacity: 0.3;
      transform: translateY(-5px);
  }
}

.msg-text .bouncing-loader-container {
  min-height: 5px;
  margin: 3px 0;
}

.msg-text ul {
  margin: 10px 0;
  padding-left: 20px;
}

.msg-text li {
  margin: 5px 0;
  line-height: 1.4;
}

.msg-text br {
  margin-bottom: 8px;
  display: block;
  content: "";
}

.left-msg .msg-bubble,
.right-msg .msg-bubble {
  margin-top: 10px;
}

.msg-text a {
  color: #0066cc;
  text-decoration: none;
  word-break: break-word;
}

.msg-text a:hover {
  text-decoration: underline;
}

/* For links in right messages (user messages) */
.right-msg .msg-text a {
  color: #99ccff;  /* Lighter blue for dark background */
}

.right-msg .msg-text a:hover {
  color: #cce6ff;  /* Even lighter on hover */
}