:root {
  --primary-color: #f74780;
  --primary-light: #f85990;
  --primary-dark: #e73971;
  --accent-color: #ffc0cb;
  --text-light: #ffffff;
  --text-dark: #333333;
  --bg-light: #f8f9fa;
  --bg-gray: #f1f1f1;
}

#chatWindow {
  font-size: 13px;
}

/* Chat Button */
.chat-button {
  position: fixed;
  bottom: 20px;
  right: 20px;
  width: 100px;
  height: 100px;
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  cursor: pointer;
  z-index: 100;
  transition: all 0.3s ease;
}

.chat-button:hover {
  transform: scale(1.05);
  box-shadow: 0 5px 15px rgba(247, 71, 128, 0.4);
}

.chat-button img {
  transition: all 0.3s ease;
}

/* Main Chat Container */
/* .chat-container {
  width: 320px;
  border-radius: 18px;
  overflow: hidden;
  box-shadow: 0 8px 30px rgba(247, 71, 128, 0.25);
  transition: all 0.3s ease;
  background-color: white;
  position: absolute;
  bottom: 85px;
  right: 20px;
  max-height: 500px;
  display: flex;
  flex-direction: column;
  border: 1px solid rgba(247, 71, 128, 0.1);
} */

.chat-container {
    width: 320px;
    border-radius: 18px;
    overflow: hidden;
    box-shadow: 0 8px 30px rgba(247, 71, 128, 0.25);
    transition: all 0.3s ease;
    background-color: white;
    position: absolute;
    bottom: 120px;
    right: 20px;
    max-height: 600px;
    min-height: 500px;
    display: flex
;
    flex-direction: column;
    border: 1px solid rgba(247, 71, 128, 0.1);
}

@media (max-width: 400px) {
  .chat-container {
    width: 300px;
    right: 10px;
    bottom: 130px;
    max-height: 450px;
  }

  .chat-input {
    padding: 8px;
    gap: 6px;
  }

  .chat-input input {
    padding: 8px 12px;
    height: 35px;
  }

  .chat-input button {
    padding: 8px 12px;
    height: 40px;
    min-width: 80px;
    font-size: 12px;
  }
}

.chat-header {
  background: linear-gradient(
    135deg,
    #f74780,
    #e73971
  );
  color: var(--text-light);
  padding: 14px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 2px solid var(--accent-color);
  font-family: 'Plus Jakarta Sans', sans-serif;
}

.chat-header .close-button {
  color: white;
  background: none;
  border: none;
  font-size: 1.2rem;
  cursor: pointer;
  opacity: 0.8;
  transition: opacity 0.2s;
}

.chat-header .close-button:hover {
  opacity: 1;
}

.logo-wrapper {
  display: flex;
  align-items: center;
}

.logo-icon {
  background-color: var(--text-light);
  color: #f74780;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  margin-right: 12px;
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.15);
  border: 2px solid rgba(255, 255, 255, 0.8);
}

.logo-text {
  font-weight: bold;
  font-size: 1.1rem;
}

.logo-subtitle {
  font-size: 0.7rem;
  opacity: 0.9;
}

.chat-messages {
  flex: 1;
  height: 500px;
  overflow-y: auto;
  padding: 15px;
  background-color: white;
}

.message {
  margin-bottom: 15px;
  max-width: 80%;
  padding: 10px 15px;
  border-radius: 15px;
  position: relative;
  clear: both;
  word-wrap: break-word;
}

.user-message {
  background-color: var(--primary-light);
  color: var(--text-light);
  float: right;
  border-bottom-right-radius: 5px;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.bot-message {
  background-color: #f1f1f1;
  color: var(--text-dark);
  float: left;
  border-bottom-left-radius: 5px;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.message-time {
  font-size: 0.65rem;
  color: inherit;
  opacity: 0.7;
  margin-top: 5px;
  text-align: right;
}

.user-message .message-time {
  color: var(--text-light);
}

/* Input Area */
.chat-input {
  display: flex;
  padding: 12px;
  background-color: var(--bg-gray);
  border-top: 1px solid #e0e0e0;
  align-items: center;
  gap: 10px;
  flex-wrap: nowrap;
}

.chat-input input, .chat-input textarea {
  flex-grow: 1;
  border: 1px solid #e0e0e0;
  padding: 10px 15px;
  border-radius: 30px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
  transition: all 0.3s ease;
  font-size: 12px;
  width: 100%;
}

.chat-input input {
  height: 45px;
}

.chat-input textarea {
  resize: none; /* Disable manual resizing */
  overflow: hidden; /* Hide scrollbar */
  min-height: 45px; /* Initial height - same as single line input */
  max-height: 120px; /* Maximum height before scrolling */
  line-height: 1.5;
}

.chat-input input:focus, .chat-input textarea:focus {
  outline: none;
  border-color: var(--primary-light);
  box-shadow: 0 2px 8px rgba(247, 71, 128, 0.2);
}

.chat-input button {
  background-color: var(--primary-color);
  color: var(--text-light);
  border: none;
  border-radius: 30px;
  padding: 10px 20px;
  cursor: pointer;
  transition: all 0.3s ease;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
  height: 45px;
  min-width: 100px;
  white-space: nowrap;
}

.chat-input button:hover {
  background-color: var(--primary-dark);
  transform: translateY(-2px);
  box-shadow: 0 3px 6px rgba(0, 0, 0, 0.15);
}

.chat-input button i {
  margin-right: 5px;
  font-size: 12px;
}

/* Typing Indicator */
.typing-indicator {
  display: none;
  align-items: center;
  margin-bottom: 15px;
  float: left;
  clear: both;
  background-color: rgba(241, 241, 241, 0.7);
  padding: 6px 12px;
  border-radius: 15px;
}

.typing-indicator span {
  height: 7px;
  width: 7px;
  background-color: var(--primary-color);
  border-radius: 50%;
  display: inline-block;
  margin: 0 2px;
  animation: typing 1s infinite;
}

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

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

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

/* Chat Window Toggle */
.chat-window {
  position: fixed;
  bottom: 0;
  right: 0;
  z-index: 99;
  transition: all 0.4s ease-in-out;
  opacity: 1;
  transform: translateY(0);
}

.chat-window.hidden {
  opacity: 0;
  transform: translateY(20px);
  pointer-events: none;
}

/* Format WhatsApp messages with proper styling */
.bot-message a,
.user-message a {
  color: inherit;
  text-decoration: underline;
}

.bot-message code,
.user-message code {
  background-color: rgba(0, 0, 0, 0.05);
  padding: 2px 4px;
  border-radius: 3px;
  font-family: monospace;
  display: block;
  white-space: pre-wrap;
  margin: 5px 0;
  padding: 8px;
}

.bot-message pre,
.user-message pre {
  background-color: rgba(0, 0, 0, 0.05);
  padding: 10px;
  border-radius: 5px;
  overflow-x: auto;
  margin: 5px 0;
}
