* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
}

body {
  font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
  background-color: #dadbd3;
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  margin: 0;
  overflow: hidden;
  width: 100vw; /* Make body full width */
  height: 100vh; /* Make body full height */
}

.wa-container {
  width: 100%;
  max-width: 100vw; /* Make container full width */
  height: 100vh; /* Make container full height */
  background-color: #fff;
  display: flex;
  flex-direction: column;
  border-radius: 0; /* Remove border-radius for full screen */
  overflow: hidden;
  box-shadow: none; /* Remove box-shadow for full screen */
  margin: 0;
  padding-left: 24px;
  padding-right: 24px; /* Add left padding for desktop */
}

@media (max-width: 768px) {
  .wa-container {
    max-width: 100vw;
    height: 100vh;
    border-radius: 0;
    padding-left: 8px; /* Reduce left padding for mobile */
  }
}

.wa-header {
  background: #00ba8b;
  padding: 20px 30px;
  display: flex;
  align-items: center;
  gap: 20px;
}

@media (max-width: 768px) {
  .wa-header {
    padding: 16px;
    gap: 15px;
  }
}

.wa-avatar {
  width: 45px;
  height:auto;
  border-radius: 50%;
  object-fit: cover;
}

@media (max-width: 768px) {
  .wa-avatar {
    width: 40px;
    height: 40px;
  }
}

.wa-header-info {
  flex: 1;
}

.wa-chat-title {
  color: #fff;
  font-size: 1.1em;
  display: block;
}

.wa-chat-status {
  color: rgba(255, 255, 255, 0.8);
  font-size: 0.8em;
}

.wa-main {
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  overflow: hidden;
  background-color: #e5ddd5;
  background-image: url('https://www.transparenttextures.com/patterns/clean-textile.png');
  position: relative;
}

.wa-footer {
  display: flex;
  align-items: center;
  padding: 15px 30px;

  position: relative;
  z-index: 1;
  gap: 15px;
  justify-content: flex-start; /* Align items to the start */
}

@media (max-width: 768px) {
  .wa-footer {
    padding: 10px 20px;
    gap: 10px;
  }
}

@media (max-width: 768px) {
  .wa-footer {
    padding: 10px 20px;
    gap: 10px;
  }
}

.wa-input {
  flex-grow: 1;
  border: none;
  border-radius: 20px;
  padding: 9px 12px;
  margin: 5px 0;
  font-size: 15px;
  line-height: 20px;
  outline: none;
  background: #fff;
  box-shadow: 0 1px 2px rgba(0,0,0,0.05);
  max-height: 100px;
  min-height: 20px;
  resize: none;
}

.wa-input:focus,
.wa-image-url:focus {
  border-color: #075e54;
}

.wa-send-btn {
  background-color: #00ba8b;
  color: white;
  border: none;
  border-radius: 50%;
  width: 40px;
  height: 40px;
  display: flex;
  justify-content: center;
  align-items: center;
  cursor: pointer;
  transition: background-color 0.2s ease;
  padding: 0;
  flex-shrink: 0;
}

.wa-send-btn::before {
  content: '';
  width: 20px;
  height: 20px;
  background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="white"><path d="M1.101 21.757L23.8 12.028 1.101 2.3l.011 7.912 13.623 1.816-13.623 1.817-.011 7.912z"></path></svg>');
  background-size: contain;
  background-repeat: no-repeat;
  display: block;
}

.wa-send-btn:hover {
  background-color: #02916f;
}

/* Loading animation styles */
.loading-indicator {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 10px;
  margin-top: 10px;
}

.typing-indicator span {
  height: 10px;
  width: 10px;
  margin: 0 2px;
  background-color: #929292;
  border-radius: 50%;
  display: inline-block;
  animation: bubble 1.4s infinite ease-in-out both;
}

.typing-bubble {
  background-color: #ffffff;
  color: #303030;
  border-top-left-radius: 0;
  padding: 8px 12px;
  display: inline-block;
  max-width: 100%;
  box-shadow: 0 1px 0.5px rgba(0,0,0,0.13);
}

.typing-bubble::before {
  content: '';
  position: absolute;
  top: 0;
  left: -8px;
  width: 0;
  height: 0;
  border-right: 8px solid #ffffff;
  border-top: 0px solid transparent;
  border-bottom: 8px solid transparent;
}

.typing-indicator span:nth-child(1) { animation-delay: 0.2s; }
.typing-indicator span:nth-child(2) { animation-delay: 0.4s; }
.typing-indicator span:nth-child(3) { animation-delay: 0.6s; }

@keyframes bubble {
  0%, 80%, 100% { transform: scale(0); }
  40% { transform: scale(1); }
}

.hidden {
  display: none !important;
}

.message.error {
  background-color: #ffebee;
  color: #c62828;
  padding: 12px;
  margin: 10px auto;
  border-radius: 8px;
  border-left: 4px solid #c62828;
  max-width: 80%;
  text-align: center;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

/* Chat message styling */
.chat-message {
  display: flex;
  margin-bottom: 15px;
  position: relative;
  max-width: 60%;
  clear: both;
  padding: 0 15px;
}

@media (max-width: 768px) {
  .chat-message {
    max-width: 75%;
    padding: 0 5px;
    margin-bottom: 10px;
  }
}

.chat-message.user {
  align-self: flex-end;
  margin-left: auto;
  justify-content: flex-end; /* Ensure content is pushed to the right */
}

.chat-message.bot {
  margin-right: auto;
}

.message-bubble {
  padding: 8px 12px;
  border-radius: 7.5px;
  position: relative;
  word-wrap: break-word;
  font-size: 14px;
  line-height: 1.4;
  box-shadow: 0 1px 0.5px rgba(0,0,0,0.13);
}

.chat-message.user .message-bubble {
  background-color: #e1ffc7;
  color: #303030;
  border-top-right-radius: 0;
}

.chat-message.user .message-bubble::before {
  content: '';
  position: absolute;
  top: 0;
  right: -8px;
  width: 0;
  height: 0;
  border-left: 8px solid #e1ffc7;
  border-top: 0px solid transparent;
  border-bottom: 8px solid transparent;
}

.chat-message.bot .message-bubble {
  background-color: #ffffff;
  color: #303030;
  border-top-left-radius: 0;
}

.chat-message.bot .message-bubble::before {
  content: '';
  position: absolute;
  top: 0;
  left: -8px;
  width: 0;
  height: 0;
  border-right: 8px solid #ffffff;
  border-top: 0px solid transparent;
  border-bottom: 8px solid transparent;
}

.message-bubble img {
  max-width: 100%;
  height: auto;
  display: block;
  margin-top: 5px;
  border-radius: 5px;
}

/* Scrollbar styling for chatbox */
.wa-chat-box::-webkit-scrollbar {
  width: 6px;
}

.wa-chat-box::-webkit-scrollbar-track {
  background: #f1f1f1;
}

.wa-chat-box {
  flex: 1;
  overflow-y: auto;
  padding: 30px;
  height: calc(90vh - 140px);
  scrollbar-width: thin;
  scrollbar-color: rgba(0, 0, 0, 0.2) transparent;
}

@media (max-width: 768px) {
  .wa-chat-box {
    padding: 20px 20px 10px;
    height: calc(100vh - 130px);
  }
}

.wa-chat-box::-webkit-scrollbar-thumb {
  background: #888;
  border-radius: 3px;
}

.wa-chat-box::-webkit-scrollbar-thumb:hover {
  background: #555;
}

.copy-btn {
    background-color: #007bff;
    color: white;
    border: none;
    border-radius: 5px;
    padding: 5px 10px;
    margin-left: 10px;
    cursor: pointer;
    font-size: 0.8em;
    transition: background-color 0.3s ease;
}

.copy-btn:hover {
    background-color: #0056b3;
}

/* Responsive adjustments */
@media (max-width: 600px) {
  .wa-container {
    width: 100%;
    height: 100%;
    border-radius: 0;
  }

  .wa-header {
    padding: 10px;
  }

  .wa-main {
    padding: 5px;
  }

  .wa-input,
  .wa-image-url {
    padding: 6px 12px;
    font-size: 13px;
  }

  .wa-send-btn {
    width: 36px;
    height: 36px;
    font-size: 16px;
  }



}


/* Markdown lists spacing and left alignment */
.message-bubble ul,
.message-bubble ol {
  padding-left: 24px; /* Adds left indentation */
  margin: 8px 0;
}

.message-bubble li {
  margin-bottom: 6px;
  line-height: 1.5;
  list-style-position: outside;
}

/* Optional: style numbers differently for ordered lists */
.message-bubble ol {
  list-style-type: decimal;
}

.message-bubble ul {
  list-style-type: disc;
}

.animated-avatar {
  animation: pulseAvatar 2.5s ease-in-out infinite;
}

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


.jumping-avatar {
  animation: jumpAvatar 1.2s ease-in-out infinite;
}

@keyframes jumpAvatar {
  0%, 100% {
    transform: translateY(0);
  }
  30% {
    transform: translateY(-10px);
  }
  50% {
    transform: translateY(0px);
  }
  70% {
    transform: translateY(-6px);
  }
}

