:root {
  /* UI Design Specifications */
  --primary-color: #0D223F;
  --accent-color: #007D95;
  --white-color: #FFFFFF;
  --light-grey: #E8E8E8;
  --grey: #A6ACAF;
  --light-blue: #CFEBFA;
  
  /* Original variables with updated values */
  --body-bg: var(--white-color);
  --msger-bg: var(--white-color);
  --border: 1px solid var(--light-grey);
  --left-msg-bg: var(--light-grey);
  --right-msg-bg: var(--accent-color);
  
  /* Spacing variables */
  --spacing-sm: 16px;
  --spacing-md: 24px;
  
  /* Font variables */
  --font-primary: 'Roboto', 'Helvetica Neue', Helvetica, Arial, sans-serif;
}

.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;
  font-family: var(--font-primary);
  margin: 0;
  padding: 0;
  /* background-color: #F5F5F5; */
}

.msger {
  display: flex;
  flex-flow: column;
  justify-content: space-between;
  width: 100%;
  max-width: 450px;
  height: calc(100% - 40px);
  border: none;
  border-radius: 8px;
  background: var(--msger-bg);
  box-shadow: 0 0 8px 0 rgba(0, 0, 0, 0.25);
  overflow: hidden;
  margin: 0 auto;
}

.msger-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 var(--spacing-md);
  background: var(--accent-color);
  color: var(--white-color);
  height: 80px;
  box-sizing: border-box;
  border-top-left-radius: 8px;
  border-top-right-radius: 8px;
}

.msger-header-left {
  display: flex;
  align-items: center;
}

.msger-header-icon-div {
  width: 40px;
  height: 40px;
  background-color: var(--white-color);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-right: var(--spacing-sm);
  position: relative;
  overflow: visible;
}

.msger-header-icon {
  width: 32px;
  height: 32px;
  object-fit: contain;
}

.msger-header-checkmark {
  position: absolute;
  width: 16px;
  height: 16px;
  bottom: -3px;
  right: -3px;
  z-index: 2;
}

.msger-header-title {
  flex-grow: 1;
  font-family: var(--font-primary);
  font-size: 24px;
  font-weight: 800;
  color: var(--white-color);
}

.msger-header-options {
  display: flex;
  gap: var(--spacing-sm);
}

.clear-chat {
  background: transparent;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
}

.clear-chat-icon {
  width: 20px;
  height: 20px;
  filter: brightness(0) invert(1);
}

.tooltip-chat {
  position: relative;
}

.msg-text {
  font-family: var(--font-primary);
  font-weight: 400;
}

.msg-text-right {
  font-family: var(--font-primary);
  font-size: 16px;
  font-weight: 500;
  color: var(--white-color);
}

.bot-msg-text-right {
  font-family: var(--font-primary);
  font-size: 16px;
  font-weight: 500;
  color: var(--primary-color);
}

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

.msger-chat-content {
  display: flex;
  flex-direction: column;
  min-height: 0;
  width: 100%;
  padding-bottom: 0;
  margin-top: auto;
}

.msger-chat.has-overflow {
}

.msger-chat.has-overflow .msger-chat-content {
  margin-top: 0;
}

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

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

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

.msg {
  display: flex;
  margin-bottom: 24px;
  width: 100%;
}

.msg:last-child {
  margin-bottom: 0;
}

.msg-bubble-time-div {
  display: flex;
  flex-direction: column;
  width: fit-content;
  max-width: calc(100% - 50px);
}

.msg-img {
  width: 40px !important;
  height: 40px !important;
  display: flex;
  justify-content: center;
  align-items: center;
  margin-right: 16px;
  border-radius: 50%;
  background-color: var(--white-color);
  overflow: hidden;
}

.left-msg-icon,
.right-msg-icon {
  width: 30px !important;
  height: 30px !important;
  object-fit: contain;
  border-radius: 50%;
}

.msg-bubble {
  max-width: 100%;
  width: fit-content;
  padding: 16px;
  border-radius: 8px;
  font-size: 16px;
  line-height: 1.4;
  color: black;
  overflow-wrap: break-word;
  background-color: #E8E8E8;
  display: inline-block;
  min-height: 56px;
  box-sizing: border-box;
}

.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;
}

.right-msg {
  flex-direction: row-reverse;
  align-self: flex-end;
  max-width: calc(100% - 40px - 10px);
  align-items: flex-end;
}

.right-msg .msg-bubble-time-div {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  max-width: 100%;
  width: fit-content;
  margin-left: auto;
}

.right-msg .msg-info-time {
  text-align: right;
  margin-right: 0;
  margin-left: auto;
  font-size: 0.6rem;
  color: #939191;
  margin-top: 5px;
}

.right-msg .msg-bubble {
  background-color: #CFEBFA;
  color: black;
  border-radius: 8px;
}

.right-msg .msg-img {
  margin-right: 0;
  margin-left: 10px;
  background-color: #EAF0F6;
}

.left-msg {
  align-self: flex-start;
  width: 100%;
  align-items: flex-end;
}

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

.today-container {
  text-align: center;
  padding: 16px 0;
}

.today-label {
  display: inline-block;
  font-family: var(--font-primary);
  font-size: 14px;
  font-weight: 400;
  color: #A6ACAF;
  background-color: white;
  padding: 0 10px;
}

.msger-inputarea {
  display: flex;
  padding: var(--spacing-md) var(--spacing-md);
  background: var(--white-color);
  height: auto;
}

.send-icon-div {
  position: relative;
  width: 100%;
  display: flex;
  align-items: center;
}

.msger-input {
  flex: 1;
  background: var(--white-color);
  border: 1px solid var(--light-grey);
  border-radius: 8px;
  padding: 16px var(--spacing-sm);
  padding-right: 48px;
  font-family: var(--font-primary);
  font-size: 16px;
  font-weight: 500;
  color: #000000;
  outline: none;
  resize: none;
  min-height: 56px;
  max-height: 80px;
  overflow-y: hidden;
  line-height: 24px;
  white-space: pre-wrap;
  transition: border-color 0.2s ease, height 0.05s ease-out;
  box-sizing: border-box;
  will-change: height;
}

.msger-input::-webkit-scrollbar {
  width: 4px;
}

.msger-input::-webkit-scrollbar-track {
  background: transparent;
}

.msger-input::-webkit-scrollbar-thumb {
  background: var(--grey);
  border-radius: 4px;
}

.msger-input::placeholder {
  color: var(--grey);
  opacity: 1;
}

.msger-input:focus {
  border-color: var(--primary-color);
  box-shadow: 0 0 0 1px var(--primary-color);
  overflow-y: auto;
}

.msger-send-btn {
  position: absolute;
  right: 16px;
  top: 50%;
  transform: translateY(-50%);
  width: 32px;
  height: 32px;
  background-color: var(--grey);
  border-radius: 50%;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  z-index: 2;
  transition: background-color 0.2s ease;
}

.msger-input:not(:placeholder-shown) ~ .msger-send-btn {
  background-color: var(--primary-color);
}

.send-icon {
  width: 20px;
  height: 20px;
  filter: brightness(0) invert(1);
}

.msger-input:not(:placeholder-shown) {
  color: #000000;
  border-color: var(--primary-color);
}

.freeze {
  pointer-events: none;
}

.freeze:disabled {
  pointer-events: none;
}

.form-div {
  width: 100%;
}

.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;
}

.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.tooltip-close-bot:before {
  content: "close chat";
  width: auto;
  padding: 6px 8px;
}

.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 {
  border-radius: 8px;
}

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

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

/* Normalize any residual code/pre blocks to app font and styling */
.msg-text pre,
.msg-text code {
  font-family: var(--font-primary);
  background: transparent;
  border: 0;
  padding: 0;
  white-space: pre-wrap;
}

.right-msg .msg-text a {
  color: #99ccff;
}

.right-msg .msg-text a:hover {
  color: #cce6ff;
}

.msg-text p {
  margin: 0;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.fadeIn {
  animation: fadeIn 0.3s ease-in-out;
}

.right-msg-icon {
  filter: brightness(0) invert(0);
}

.left-msg .msg-bubble-time-div {
  max-width: 100%;
  width: fit-content;
}

.left-msg .msg-bubble {
}

/* Styling for the loader message to ensure vertical centering with icon */
.loader-msg .msg-text {
  display: flex; /* Allow easy centering of its content (the bouncing dots) */
  align-items: center; /* Vertically center the bouncing dots within this container */
  height: 40px; /* Match the height of the icon container for alignment */
  padding-left: 0; /* Remove any default padding if .msg-text normally has it */
  /* Add any other specific styling needed for the loader text container */
}

/* If the bouncing-loader-container itself needs adjustment within .msg-text */
.loader-msg .msg-text .bouncing-loader-container {
  margin: 0; /* Reset any top/bottom margins */
  margin-left: -4px; /* Counteract the first dot's 4px left margin */
  /* The bouncing loader is already display:flex and centered by its own CSS */
}