/* Standalone Chatbot Styles */
/* This file contains styles specific to the standalone chatbot page */

body[data-page-id="2577"] {
  #chatbot-badge {
    display: none;
  }

  h1 {
    font-size: 1.7em;
      font-weight: 600;
  }

  h2 {
    font-size: 1.4em;
    font-weight: 600;
  }

  @media only screen and (max-width: 650px) {
    h1 {
      font-size: 1.5em;
    }
    
    h2 {
      font-size: 1.3125em;
    }
  }
}

#chatbot-standalone-container {
  --expanded-offset: 115px;
  display: flex;
  flex-direction: column;
  height: 45vh;
  max-width: 800px; /* Maximum width for better readability */
  margin: 0 auto; /* Center the container */
  border: 1px solid #ddd;
  border-radius: 10px;
  background: #fff;
  transition: height 0.25s ease;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  overflow: hidden;
}

/* Messages area - takes up most of the space */
#chatbot-standalone-container #chatbot-messages {
  flex: 1;
  overflow-y: auto;
  padding: 20px;
  background: #f8f9fa;
  border-bottom: 1px solid #eee;
}

/* Input container - fixed at bottom */
#chatbot-standalone-container #chatbot-input-container {
  padding: 15px 20px;
  background: #fff;
  border-top: 1px solid #eee;
  display: flex;
  gap: 10px;
  align-items: center;
}

/* Input field styling */
#chatbot-standalone-container #chatbot-input {
  flex: 1;
  padding: 12px 15px;
  border: 1px solid #ddd;
  border-radius: 25px;
  font-size: 14px;
  outline: none;
  transition: border-color 0.3s ease;
}

#chatbot-standalone-container #chatbot-input:focus {
  border-color: #007bff;
  box-shadow: 0 0 0 2px rgba(0, 123, 255, 0.25);
}

/* Send button styling */
#chatbot-standalone-container #chatbot-send-btn {
  background: #007bff;
  color: white;
  border: none;
  border-radius: 50%;
  width: 45px;
  height: 45px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background-color 0.3s ease;
  font-size: 16px;
}

#chatbot-standalone-container #chatbot-send-btn:hover {
  background: #0056b3;
}

#chatbot-standalone-container #chatbot-send-btn:active {
  transform: scale(0.95);
}

/* Message styling - inherit from main chatbot.css but ensure proper spacing */
#chatbot-standalone-container .message {
  margin-bottom: 15px;
  line-height: 1.5;
}

#chatbot-standalone-container .user-message {
  text-align: right;
  background: #007bff;
  color: white;
  padding: 10px 15px;
  border-radius: 18px 18px 5px 18px;
  display: inline-block;
  max-width: 80%;
  margin-left: auto;
  word-wrap: break-word;
}

#chatbot-standalone-container .bot-message {
  text-align: left;
  background: #e9ecef;
  color: #333;
  padding: 10px 15px;
  border-radius: 18px 18px 18px 5px;
  display: inline-block;
  max-width: 80%;
  margin-right: auto;
  word-wrap: break-word;
}

/* Links in bot messages */
#chatbot-standalone-container .bot-message a {
  color: #007bff;
  text-decoration: none;
}

#chatbot-standalone-container .bot-message a:hover {
  text-decoration: underline;
}

/* Loading dots animation */
#chatbot-standalone-container .loading-dots {
  display: flex;
  gap: 4px;
  padding: 10px 0;
}

#chatbot-standalone-container .loading-dots span {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: #007bff;
  animation: loading-bounce 1.4s ease-in-out infinite both;
}

#chatbot-standalone-container .loading-dots span:nth-child(1) {
  animation-delay: -0.32s;
}

#chatbot-standalone-container .loading-dots span:nth-child(2) {
  animation-delay: -0.16s;
}

@keyframes loading-bounce {
  0%,
  80%,
  100% {
    transform: scale(0);
  }
  40% {
    transform: scale(1);
  }
}

/* Responsive design */
@media (max-width: 768px) {
  #chatbot-standalone-container {
    height: 60vh;
    margin: 10px;
    border-radius: 5px;
  }

  #chatbot-standalone-container #chatbot-messages {
    padding: 15px;
  }

  #chatbot-standalone-container #chatbot-input-container {
    padding: 10px 15px;
  }

  #chatbot-standalone-container .user-message,
  #chatbot-standalone-container .bot-message {
    max-width: 90%;
    font-size: 14px;
  }
}

@media (max-width: 480px) {
  #chatbot-standalone-container {
    height: 42vh;
    margin: 0 -10px;
  }

  #chatbot-standalone-container.chatbot-standalone--expanded {
    height: calc(42vh + var(--expanded-offset));
    max-height: 80vh;
  }

  #chatbot-standalone-container #chatbot-input {
    font-size: 16px; /* Prevents zoom on iOS */
  }
}
