* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: "Gilroy", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    sans-serif;
  font-weight: 400;
  font-size: 14px;
  background: transparent;
  line-height: 1.5;
}

.container {
  position: relative;
  width: 100%;
  height: 100vh;
  background: transparent;
}

/* CHATBOT CONTAINER */
.chatbot {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 1000;
  background: transparent;
}

/* CHATBOT SUPPORT WINDOW */
.chatbot__support {
  display: flex;
  flex-direction: column;
  background: #ffffff;
  width: 380px;
  height: 600px;
  max-width: calc(100vw - 48px);
  max-height: calc(100vh - 150px);
  border-radius: 16px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
  opacity: 0;
  visibility: hidden;
  transform: scale(0) translateY(50px) rotate(-5deg);
  transform-origin: bottom right;
  transition: all 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
  overflow: hidden;
  position: absolute;
  bottom: 80px;
  right: 0;
}

/* ACTIVE STATE */
.chatbot--active .chatbot__support {
  opacity: 1;
  visibility: visible;
  transform: scale(1) translateY(0) rotate(0deg);
}

/* Keep chat button visible when chatbot is active */
.chatbot--active .chatbot__trigger {
  opacity: 1;
  visibility: visible;
  transform: scale(1);
}

/* HEADER */
.chatbot__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
  height: 56px;
  background: #0F766E;
  color: white;
  border-radius: 16px 16px 0 0;
  transition: all 0.3s ease;
}

.chatbot__header-content {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 1;
}

.chatbot__avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  overflow: hidden;
  flex-shrink: 0;
  background: #ff6b35;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.chatbot__avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.chatbot__avatar:hover {
  transform: scale(1.05);
}

.chatbot__info {
  flex: 1;
}

.chatbot__title {
  color: rgba(255, 253, 249, 0.95);
  font-size: 1rem;
  padding: 0px 8px;
  font-weight: 500;
  display: inline-block;
  -webkit-box-align: center;
  align-items: center;
  overflow: hidden;
  white-space: nowrap;
  flex: 1 1 0px;
  text-overflow: ellipsis;
  margin: 0;
  animation: fadeInUp 0.6s ease-out 0.4s both;
  opacity: 0;
}



.chatbot__subtitle {
  font-size: 12px;
  color: #e0d9ff;
  line-height: 1.4;
}

.chatbot__close {
  background: none;
  border: none;
  color: #e0d9ff;
  cursor: pointer;
  padding: 4px;
  border-radius: 4px;
  transition: all 0.2s ease;
  flex-shrink: 0;
}

.chatbot__close:hover {
  transform: scale(1.1);
}

/* MESSAGES */
.chatbot__messages {
  flex: 1;
  padding: 20px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 16px;
  scroll-behavior: smooth;
}

.chatbot__messages::-webkit-scrollbar {
  width: 4px;
}

.chatbot__messages::-webkit-scrollbar-track {
  background: transparent;
}

.chatbot__messages::-webkit-scrollbar-thumb {
  background: #e0e0e0;
  border-radius: 2px;
}

.message-date {
  text-align: center;
  font-size: 12px;
  color: #666;
  margin: 8px 0;
}

.message {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  animation: fadeInUp 0.4s ease-out;
  transition: all 0.2s ease;
}

.message--user {
  flex-direction: row-reverse;
  animation: slideInRight 0.4s ease-out;
}

.message--user .message__avatar {
  display: none;
}

.message__avatar {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  overflow: hidden;
  flex-shrink: 0;
  background: #ff6b35;
  display: flex;
  align-items: center;
  justify-content: center;
}

.message__avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.message__content {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.message__bubble {
  background: #f1f3f5;
  padding: 12px 16px;
  border-radius: 18px;
  font-size: 16px;
  line-height: 1.4;
  color: #2d2d2d;
  word-wrap: break-word;
  overflow-wrap: break-word;
  width: fit-content;
  max-width: 280px;
  transition: all 0.2s ease;
  overflow: hidden;
  box-sizing: border-box;
}

.message--user .message__bubble {
  background: #0F766E;
  color: white;
  border-radius: 18px 18px 4px 18px;
  margin-left: auto;
}

.message--bot .message__bubble {
  border-radius: 4px 18px 18px 18px;
  animation: slideInLeft 0.4s ease-out;
}

/* Markdown content styling within message bubbles */
.message__bubble ul,
.message__bubble ol {
  margin: 8px 0;
  padding-left: 16px;
  padding-right: 8px;
  word-wrap: break-word;
  overflow-wrap: break-word;
  list-style-position: inside;
}

.message__bubble ul {
  list-style-type: disc;
}

.message__bubble ol {
  list-style-type: decimal;
}

.message__bubble li {
  margin: 4px 0;
  word-wrap: break-word;
  overflow-wrap: break-word;
  text-indent: -1em;
  padding-left: 1em;
}

.message__bubble h1,
.message__bubble h2,
.message__bubble h3,
.message__bubble h4,
.message__bubble h5,
.message__bubble h6 {
  margin: 8px 0 4px 0;
  font-weight: 600;
  word-wrap: break-word;
}

.message__bubble h3 {
  font-size: 16px;
}

.message__bubble p {
  margin: 4px 0;
  word-wrap: break-word;
  overflow-wrap: break-word;
}

.message__bubble strong {
  font-weight: 600;
}

.message__bubble em {
  font-style: italic;
}

.message__bubble code {
  background: rgba(0, 0, 0, 0.1);
  padding: 2px 4px;
  border-radius: 4px;
  font-family: "Monaco", "Consolas", monospace;
  font-size: 13px;
}

.message__bubble blockquote {
  border-left: 3px solid rgba(0, 0, 0, 0.2);
  margin: 8px 0;
  padding-left: 12px;
  font-style: italic;
}

/* Ensure all markdown content stays within bubble boundaries */
.message__bubble * {
  max-width: 100%;
  box-sizing: border-box;
}

.message--welcome {
  animation: fadeInScale 0.6s ease-out;
}

/* FOOTER */
.chatbot__footer {
  padding: 8px 12px 12px;
  border-top: 1px solid #f0f0f0;
}

.chatbot__input-container {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
}

.chatbot__input {
  flex: 1;
  padding: 12px 16px;
  border: 1px solid #e0e0e0;
  border-radius: 24px;
  font-size: 14px;
  outline: none;
  transition: all 0.3s ease;
  background: white;
  font-family: "Gilroy", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    sans-serif;
}

.chatbot__input:focus {
  border-color: #0F766E;
  box-shadow: 0 0 0 3px rgba(140, 104, 255, 0.1);
  transform: scale(1.01);
}

.chatbot__input::placeholder {
  color: #999;
}

.chatbot__send {
  width: 40px;
  height: 40px;
  border: none;
  background:#0F766E;
  color: white;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  flex-shrink: 0;
}

.chatbot__send:hover:not(:disabled) {
  transform: scale(1.05);
  box-shadow: 0 2px 8px rgba(140, 104, 255, 0.3);
}

.chatbot__send:active:not(:disabled) {
  transform: scale(0.95);
}

.chatbot__send img {
  filter: brightness(0) invert(1);
}

.chatbot__footer-info {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-size: 11px;
  color: #666;
}

.footer-text {
  color: #666;
}

.footer-logo {
  height: 16px;
  width: auto;
}

/* TRIGGER BUTTON */
.chatbot__trigger {
  display: flex;
  justify-content: flex-end;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  background: transparent;
}

.chatbot__button {
  width: 60px;
  height: 60px;
  border: none;
  background: #0F766E;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 16px rgb(26, 145, 160);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  overflow: hidden;
}

.chatbot__button:hover {
  width: 70px;
  height: 70px;
  transition: all 0.3s ease;
}

.chatbot__button:hover img {
  width: 42px;
  height: 42px;
  transition: all 0.3s ease;
}

.chatbot__button:active {
  transform: scale(0.98);
}

.chatbot__button img {
  width: 36px;
  height: 36px;
  filter: brightness(0) invert(1);
}

/* RESPONSIVE */
@media (min-width: 1025px) {
  .chatbot__support {
    max-height: calc(100vh - 120px);
    height: min(600px, calc(100vh - 120px));
  }
}

@media (max-width: 1024px) and (min-width: 769px) {
  .chatbot__support {
    width: 400px;
    height: min(650px, calc(100vh - 120px));
    max-height: calc(100vh - 120px);
  }
}

@media (max-width: 768px) {
  body.chatbot-open {
    overflow: hidden;
    margin: 0;
    padding: 0;
  }

  .chatbot {
    position: fixed;
    bottom: 0;
    right: 0;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    z-index: 9999;
    background: transparent;
  }

  .chatbot__support {
    width: 100%;
    height: 100%;
    max-width: none;
    max-height: none;
    border-radius: 0;
    position: fixed;
    bottom: 0;
    right: 0;
    top: 0;
    left: 0;
    margin: 0;
    transform: none;
  }

  .chatbot--active .chatbot__support {
    transform: none;
  }

  .chatbot__header {
    border-radius: 0;
    height: 64px;
    padding: 0 16px;
  }

  .chatbot__messages {
    padding: 16px;
  }

  .chatbot__footer {
    padding: 16px;
  }

  .chatbot__trigger {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 999;
  }

  .chatbot__button {
    width: 56px;
    height: 56px;
  }

  .chatbot__button img {
    width: 28px;
    height: 28px;
  }
}

@media (max-width: 480px) {
  .chatbot__header {
    height: 60px;
    padding: 0 12px;
  }

  .chatbot__messages {
    padding: 12px;
  }

  .chatbot__footer {
    padding: 12px;
  }

  .chatbot__trigger {
    bottom: 16px;
    right: 16px;
  }

  .chatbot__button {
    width: 52px;
    height: 52px;
  }

  .message__bubble {
    max-width: calc(100vw - 80px);
    font-size: 15px;
  }
}

/* TYPING INDICATOR */
.typing-indicator {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 12px 16px;
}

.typing-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #999;
  animation: typing 1.4s infinite ease-in-out;
}

.typing-dot:nth-child(2) {
  animation-delay: 0.2s;
}

.typing-dot:nth-child(3) {
  animation-delay: 0.4s;
}

@keyframes typing {
  0%,
  60%,
  100% {
    transform: translateY(0);
    opacity: 0.4;
  }
  30% {
    transform: translateY(-10px);
    opacity: 1;
  }
}

/* WELCOME MESSAGE STYLES */
.message--welcome {
  justify-content: center;
}

.message--welcome .message__content {
  align-items: center;
  width: 100%;
}

.message__bubble--welcome {
  background: transparent !important;
  padding: 24px 16px !important;
  text-align: center;
  max-width: 100% !important;
  width: 100%;
  border-radius: 0 !important;
}

.welcome-logo {
  margin-bottom: 16px;
  display: flex;
  justify-content: center;
}

.welcome-logo img {
  width: 72px;
  height: 72px;
  object-fit: contain;
  transition: all 0.3s ease;
  animation: fadeInScale 0.8s ease-out 0.2s both;
}

.welcome-logo:hover img {
  transform: scale(1.1) rotate(5deg);
}

.welcome-title {
  font-size: 18px;
  font-weight: 600;
  color: #2d2d2d;
  margin-bottom: 12px;
  animation: fadeInUp 0.6s ease-out 0.4s both;
  opacity: 0;
}

.welcome-text {
  font-size: 0.875rem;
  color: rgba(0, 0, 0, 0.6);
  text-align: center;
  padding: 0px 16px;
  line-height: 1.5;
  max-width: 280px;
  margin: 0 auto;
  animation: fadeInUp 0.6s ease-out 0.6s both;
  opacity: 0;
}

/* SMOOTH ANIMATIONS */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeInScale {
  from {
    opacity: 0;
    transform: scale(0.8);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes pulse {
  0%,
  100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.05);
  }
}

@keyframes slideInRight {
  from {
    opacity: 0;
    transform: translateX(30px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes slideInLeft {
  from {
    opacity: 0;
    transform: translateX(-30px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

/* MESSAGE ANIMATIONS */
.message {
  animation: fadeInUp 0.4s ease-out;
  transition: all 0.2s ease;
}

.message--user {
  animation: slideInRight 0.4s ease-out;
}

.message--bot {
  animation: slideInLeft 0.4s ease-out;
}

.message--welcome {
  animation: fadeInScale 0.6s ease-out;
}

/* BUTTON ANIMATIONS */
.chatbot__button {
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.chatbot__button:hover {
  width: 70px;
  height: 70px;
  transition: all 0.3s ease;
}

.chatbot__button:hover img {
  width: 42px;
  height: 42px;
  transition: all 0.3s ease;
}

.chatbot__button:active {
  transform: scale(0.98);
}

.chatbot__send {
  transition: all 0.2s ease;
}

.chatbot__send:hover:not(:disabled) {
  transform: scale(1.05);
  box-shadow: 0 2px 8px rgba(140, 104, 255, 0.3);
}

.chatbot__send:active:not(:disabled) {
  transform: scale(0.95);
}

.chatbot__close {
  transition: all 0.2s ease;
}

.chatbot__close:hover {
  transform: scale(1.1);
}

/* INPUT ANIMATIONS */
.chatbot__input {
  transition: all 0.3s ease;
}

.chatbot__input:focus {
  border-color: #0F766E;
  box-shadow: 0 0 0 3px rgba(140, 104, 255, 0.1);
  transform: scale(1.01);
}

/* BUBBLE ANIMATIONS */
.message__bubble {
  transition: all 0.2s ease;
}

.message__bubble:hover {
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

/* SMOOTH SCROLLING */
.chatbot__messages {
  scroll-behavior: smooth;
}

/* HEADER ANIMATIONS */
.chatbot__header {
  transition: all 0.3s ease;
}

.chatbot__avatar {

  transition: all 0.2s ease;
}

.chatbot__avatar:hover {
  transform: scale(1.05);
}

/* WELCOME LOGO ANIMATION */
.welcome-logo img {
  width: 100px;        /* or your size */
  height: 100px;       /* same as width */
  border-radius: 48%; /* makes it a circle */
  object-fit: cover;  /* prevents cutting/stretching */
  transition: all 0.3s ease;
  animation: fadeInScale 0.8s ease-out 0.2s both;
}

.welcome-logo:hover img {
  transform: scale(1.1) rotate(5deg);
}

.welcome-title {
  animation: fadeInUp 0.6s ease-out 0.4s both;
  opacity: 0;
}

.welcome-text {
  animation: fadeInUp 0.6s ease-out 0.6s both;
  opacity: 0;
}
/* CHATBOT REFRESH BTN */
.chatbot__refresh {
  background: none;
  border: none;
  color: #e0d9ff;
  cursor: pointer;
  padding: 4px;
  border-radius: 4px;
  transition: all 0.2s ease;
  margin-right: 8px; 
}

.chatbot__refresh:hover {
  transform: scale(1.1) rotate(15deg);
}