/* Global Vars */
:root {
  --primary-color: rgba(150, 45, 255, 1);
  --text-color: rgba(255, 255, 255, 1);
}

/* ----------------- Global Styles ----------------- */

.image-responsive-chat {
  max-width: 100%;
  height: auto;
}



/* ----------------- Chat Bot Icon ----------------- */
.chat-bot-icon {
  position: fixed;
  bottom: 20px;
  /* right: 20px; */
  z-index: 1000;
}


/* ----------------- Chat Window ----------------- */
.chat-window {
  position: fixed;
  bottom: 110px;
  width: 345px;
  height: 600px;
  border-radius: 20px;
  overflow: auto;
  background-color: #ffffff;
  border: 1px solid #ccc;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  z-index: 999;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}


/* ----------------- Chat Header ----------------- */
.chat-header {
  background-color: #4CAF50;
  color: white;
  padding: 10px;
  font-weight: bold;
}


/* ----------------- Chat Body ----------------- */
.chat-body {
  padding: 10px;
  flex: 1;
  overflow-y: auto;
  background: #f9f9f9;
}
/* Custom Scrollbar */
.chat-body::-webkit-scrollbar {
  width: 5px;
}
.chat-body::-webkit-scrollbar-thumb {
  background-color: var(--primary-color);
  border-radius: 4px;
}
.chat-body::-webkit-scrollbar-track {
  background: transparent;
}



/* ----------------- Chat Input Section ----------------- */
.chat-input {
  display: flex;
  border-top: 1px solid #ccc;
}
.chat-input input {
  flex: 1;
  border: none;
  padding: 10px;
}
.chat-input button {
  border: none;
  background-color: #4CAF50;
  color: white;
  padding: 10px;
  cursor: pointer;
}


/* ----------------- Messages ----------------- */
.chat-messages {
  margin-top: 20px;
  padding-inline: 14px;
  width: 100%;
}

.chat-messages .message {
  width: 100%;
  display: flex;
  position: relative;
}

.chat-messages .message.user-message {
  justify-content: flex-end;
}

.chat-messages .message.bot-message {
  margin-bottom: 40px;
}

.message-text {
  padding: 10px;
  margin-bottom: 16px;
  font-size: 13px;
  border-radius: 25px;
  font-weight: 500;
}

.message-text a {
  color: var(--primary-color);
  font-weight: inherit;
}

.chat-messages .message.user-message .message-text {
  background: var(--primary-color);
  color: var(--text-color);
  border-top-right-radius: unset;
}

.bot-message-container {
  display: flex;
  align-items: end;
  gap: 8px;
  position: relative;
}

.message:hover .actions-feedback {
  transform: translateY(0);
  opacity: 1;
  pointer-events: auto;
}

.message-text.thinking {
  display: flex;
  align-items: center;
  gap: 7px;
  width: 100%;
}

.message-text.thinking img {
  width: 20px;
}

.message-text.thinking .typing-text {
  color: rgba(56, 56, 56, 0.6);
}

.chat-messages .message.bot-message .message-text {
  background: rgba(0, 0, 0, 0.04);
  border-bottom-left-radius: unset;
}


/* ----------------- Chat Bot Greeting Box ----------------- */
.chat-bot-greeting {
  position: absolute;
  width: 285px;
  background: #fff;
  top: -121px;
  filter: drop-shadow(1, 1, 5.5, rgba(119, 100, 229, 0.09));
  box-shadow: 1px 5px 5.5px 0px rgba(119, 100, 229, 0.09);
  border: 1.3px solid rgba(169, 169, 169, 0.2);
  border-radius: 8px;
  padding: 14px;
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.4s ease, transform 0.4s ease;
  pointer-events: none;
}
.chat-bot-greeting.show {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.chat-bot-greeting-close {
  position: absolute;
  right: 11px;
  top: 11px;
  cursor: pointer;
}
.chat-bot-greeting-close img {
  width: 10px !important;
  height: 10px !important;
}

.chat-bot-gteeting-header {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-bottom: 4px;
}
.chat-bot-gteeting-header img {
  width: 35px !important;
}
.chat-bot-gteeting-header .chat-bot-greeting-header-text {
  font-size: 16px;
  font-weight: 600;
  color: rgba(56, 56, 56, 1);
}
.chat-bot-greeting-text {
  font-size: 15px;
  color: rgba(56, 56, 56, 0.8);
  font-weight: 500;
}
.chat-bot-greeting::before {
  content: '';
  width: 370px;
  height: 165px;
  background: rgba(119, 100, 229, 0.18);
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  border-radius: 50%/50%;
  filter: blur(74px);
  z-index: -1;
}


/* ----------------- Starting Chat UI ----------------- */
.starting-chat {
  text-align: center;
  overflow-y: auto;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: space-around;
}
.starting-chat .starting-chat-icon {
  max-width: 328px;
  margin: 0 auto;
}
.starting-chat .welcome-image {
  max-width: 100%;
  height: 294px;
  object-fit: cover;
}
.starting-chat .starting-chat-text {
  text-align: center;
  max-width: 275px;
  margin: 0 auto 60px;
}
.starting-chat h2 {
  font-weight: 600;
  font-size: 24px;
  margin-bottom: 0px;
}
.starting-chat p {
  margin-top: 8px;
  line-height: 1.6;
}
.starting-chat-button {
  text-align: center;
  padding-inline: 35px;
  margin-bottom: 22px;
}
.starting-chat-button button {
  color: #fff;
  padding: 14px 20px;
  border: none;
  cursor: pointer;
  width: 100%;
  border-radius: 22px;
  font-size: 15px;
  text-transform: capitalize;
  font-weight: 600;
  max-width: 400px;
  margin: 0 auto;
  position: relative;
  overflow: hidden;
  transition: all 0.3s ease;
}


/* ----------------- Chat Section Layout ----------------- */
.chat-window .chat-section {
  display: flex;
  flex-direction: column;
  height: 100%;
  justify-content: space-between;
  align-items: center;
}

.chat-section-body .get-start-img {
  margin-top: 35px;
  position: relative;
}
.chat-section-body .get-start-img img {
  animation: bounce 2s infinite;
}
.chat-section-body .get-start-img::before {
  content: '';
  width: 83px;
  height: 9px;
  background: rgba(0, 0, 0, 0.2);
  position: absolute;
  bottom: -18px;
  left: 50%;
  transform: translateX(-50%);
  border-radius: 50% / 50%;
  filter: blur(4px);
  animation: shadow 2s infinite;
}


/* ----------------- Question Selection ----------------- */
.chat-section-header {
  display: flex;
  flex-direction: column;
  height: 100%;
  justify-content: space-between;
  align-items: center;
  overflow-y: auto;
  width: 100%;
}

/* Custom Scrollbar */
.chat-section-header::-webkit-scrollbar {
  width: 5px;
}
.chat-section-header::-webkit-scrollbar-thumb {
  background-color: var(--primary-color);
  border-radius: 4px;
}
.chat-section-header::-webkit-scrollbar-track {
  background: transparent;
}

.question-selection {
  margin-block: 50px;
  width: 100%;
}
.question-selection-text {
  display: flex;
  justify-content: flex-start;
  align-items: center;
  width: 100%;
  background: rgba(90, 58, 207, 0.05);
  padding: 10px;
  gap: 8px;
  border-radius: 5px;
  max-width: 94%;
  margin-inline: auto;
}
.question-selection-text h2 {
  margin: unset;
  font-size: 13px;
  font-weight: 500;
  color: rgba(32, 29, 47, 1);
  opacity: 0.7;
}

.question-selection-list {
  margin-top: 10px;
  width: 100%;
  background: rgba(90, 58, 207, 0.05);
  padding: 10px;
  border-radius: 5px;
  max-width: 94%;
  margin-inline: auto;
}
.question-selection-list-text {
  display: flex;
  justify-content: flex-start;
  align-items: center;
  gap: 5px;
}
.question-selection-list-text h3 {
  margin: unset;
  font-size: 13px;
  font-weight: 500;
  color: rgba(32, 29, 47, 1);
  opacity: 0.7;
}
.question-selection-list ul {
  list-style-type: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 11px;
  margin-top: 15px;
}
.question-selection-list ul li button {
  padding: 6px 10px;
  border: 1px solid var(--primary-color);
  border-radius: 20px;
  font-weight: 500;
  color: rgba(56, 56, 56, 0.8);
  font-size: 11px;
  cursor: pointer;
  background-color: transparent;
}


/* ----------------- Main Chat Section ----------------- */

.chat-section-header-close {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 13px;
  border-bottom: 1px solid rgba(85, 57, 202, 0.15);
  padding-right: 25px;
}


.chat-section-header-close .chat-settings {
  display: flex;
  align-items: center;
  gap: 9px;
}

.chat-section-header-close .chat-settings .chat-settings-text h3 {
  margin: 0;
  font-size: 13px;
  color: var(--primary-color);
  font-weight: 600;
}

.chat-section-header-close .chat-settings .chat-settings-text p {
  margin: 0;
  font-size: 11px;
  color: rgba(56, 56, 56, 0.6);
}

.chat-section-header-close .chat-close {
  cursor: pointer;
}


/* ----------------- Chat Footer ----------------- */
.chat-section-footer {
  width: 100%;
  display: flex;
  justify-content: center;
  padding-block: 18px;
  padding-inline: 12px;
  background: #fff;
  box-shadow: 0px 0 9px 0px rgba(0, 0, 0, 0.1);
  border-top-right-radius: 24px;
  border-top-left-radius: 24px;
  border-top: 1px solid rgba(85, 57, 202, 0.15);
  position: relative;
  flex-wrap: wrap;
}
.chat-section-footer input {
  all: unset;
  background: rgba(85, 57, 202, 0.06);
  font-family: inherit;
  box-sizing: border-box;
  padding: 10px 18px;
  font-size: 12px;
  width: 100%;
  color: #000;
  border-radius: 20px;
  padding-right: 67px;
}
.chat-section-footer-input {
  position: relative;
  width: 100%;
}
.chat-section-footer-input button[type="submit"] {
  color: var(--primary-color);
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  background: transparent;
  border: unset;
  outline: none;
  cursor: pointer;
}

/* ------------------- Feedback Icons --------------------------- */

.actions-feedback {
  display: flex;
  justify-content: center;
  gap: 10px;
  position: absolute;
  padding: 8px 12px;
  bottom: 0;
  left: 0;
  background-color: var(--primary-color);
  padding: 5px 9px;
  bottom: -19px;
  left: 37px;
  border-radius: 8px;
  z-index: 9;
  transform: translateY(-20px);
  opacity: 0;
  transition: all 0.3s ease;
  pointer-events: none;
}

.actions-feedback .thumb {
  width: 24px;
  height: 24px;
  cursor: pointer;
  background-color: transparent;
  border: none;
  outline: none;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  padding: 0px;
}

.actions-feedback .thumb-down {
  transform: rotate(180deg);
}

.thumb.active svg {
  fill: var(--text-color);
}



/* ----------------- Notification Sound (Hidden) ----------------- */
.notification-audio {
  display: none;
}


/* ----------------- Keyframes ----------------- */
@keyframes bounce {
  0%, 100% {
    transform: translateY(0);
    animation-timing-function: ease-in-out;
  }
  50% {
    transform: translateY(-7px);
    animation-timing-function: ease-in-out;
  }
}
@keyframes shadow {
  0%, 100% {
    width: 83px;
    height: 9px;
    opacity: 1;
    transform: translateX(-50%) scale(1);
    animation-timing-function: ease-in-out;
  }
  50% {
    width: 70px;
    height: 6px;
    opacity: 0.6;
    transform: translateX(-50%) scale(0.85);
    animation-timing-function: ease-in-out;
  }
}


/* ----------------- Media Queries ----------------- */

/* Medium short screens */
@media screen and (max-height: 700px) and (min-height: 525px) {
  .chat-window {
    height: 400px;
  }
}

.message-text div {
  display: block !important;
}

/* Very short screens (full window takeover) */
@media screen and (max-width: 562px),
      screen and (max-height: 525px) {
  [data-open-chat-bot="true"] .chat-bot-icon {
    display: none;
  }
  .chat-window {
    inset: 0;
    width: 100%;
    height: 100%;
    border-radius: 0;
    left: 0 !important;
    bottom: 0 !important;
    max-height: 100vh;
    max-width: 100vw;
    right: 0 !important;
  }
}



.input-counter {
  width: 100%;
  flex: 1;
}