/* General Body Styling */
body {
  margin: 0;
  padding: 0;
  font-family: Arial, sans-serif;
  display: flex;
  justify-content: center;
  align-items: center;
  height: 100vh;
  background-color: #f5f5f5;
}

/* Container Styling */
.container {
  text-align: center;
  background-color: #ffffff;
  padding: 20px;
  border-radius: 10px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
  max-width: 800px;
  width: 90%;
  transition: all 0.5s ease-in-out;
}

/* Logo Styling */
.logo {
  width: 80px;
  margin-bottom: 10px;
}

/* Message Section */
.message-container {
  margin-bottom: 20px;
  font-size: 1.2rem;
  color: #333;
  width: 100%; /* Ensure it takes up the full width */
  text-align: center; /* Align the text to the center */
}


#advisor-greeting {
  font-weight: bold; /* Make the text bold */
  white-space: nowrap; /* Prevent wrapping */
  overflow: hidden; /* Ensure the text stays within the container */
  text-overflow: ellipsis; /* Add ellipsis if the text overflows */
}

/* Button Container */
.button-container {
  display: flex;
  justify-content: center;
  gap: 15px;
}

/* Icon Buttons */
.icon-button {
  background: none;
  border: none;
  cursor: pointer;
  padding: 10px;
  border-radius: 50%;
  transition: background-color 0.3s ease;
}

.icon-button img {
  width: 50px;
  height: 50px;
}

.icon-button:hover {
  background-color: #e0e0e0;
}

.icon-button:active img {
  filter: brightness(0.8);
}

/* Transition Styling */
.transition-container {
  opacity: 0;
  transform: scale(0.9);
  animation: fadeIn 0.5s forwards;
}

@keyframes fadeIn {
  to {
    opacity: 1;
    transform: scale(1);
  }
}

/* Form Styling */
.form-container {
  text-align: center;
  font-size: 1rem;
  color: #333;
  margin-top: 20px;
}

h2 {
  font-size: 1.5rem;
  color: #444;
}

input[type="text"] {
  width: 80%;
  padding: 10px;
  margin: 10px 0;
  border: 1px solid #ccc;
  border-radius: 5px;
}

button.start-button {
  background-color: #007bff;
  color: #fff;
  border: none;
  padding: 10px 20px;
  margin-top: 20px;
  cursor: pointer;
  border-radius: 5px;
  transition: background-color 0.3s ease;
}

button.start-button:hover {
  background-color: #0056b3;
}



/* Conversation Screen Styling */
#conversation-screen {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  width: 100%;
  max-width: 600px;
  background-color: #fff;
  border: 1px solid #ddd;
  border-radius: 10px;
  padding: 20px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  position: relative;
}



/* Chat Container Styling */
#chat-container {
  position: relative; /* Position relative to allow absolute positioning of child elements */
  flex: 1;
  width: 100%;
  height: 800px;
  max-height: 1000px; /* Set a max height */
  background-color: #f7f9fc;
  border-radius: 8px;
  overflow-y: auto;
  padding: 10px;
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.1);
  margin-bottom: 20px;
  display: flex;
  flex-direction: column; /* Stack messages vertically */
  gap: 10px; /* Space between messages */
  background: url('../images/advisor-watermark.gif') no-repeat left center; /* Set the watermark as the background */
  background-size: 50%; /* Ensure the GIF covers the entire chat container */
}

/* Chat Content */
#chat-content {
  position: relative; /* Ensure content is positioned relative to the chat container */
  z-index: 1; /* Place chat content above the background */
  flex: 1; /* Chat content takes up remaining space */
  display: flex;
  flex-direction: column; /* Stack messages vertically */
  justify-content: flex-start;
  align-items: flex-start;
  width: 100%;
  padding: 10px; /* Add padding for content */
  overflow-y: auto; /* Allow scrolling for chat messages */
}

/* Message Styling */
#chat-container p {
  margin: 0;
  padding: 5px 10px;
  border-radius: 5px;
  max-width: 80%;
  word-wrap: break-word;
  background-color: rgba(255, 255, 255, 0.8); /* Slightly transparent background for messages */
}

/* User messages */
.user-message {
  align-self: flex-start;
  background-color: rgba(128, 188, 215, 0.8);
  color: #0d47a1;
  font-weight: normal;
}

/* Assistant messages */
.assistant-message {
  align-self: flex-end;
  background-color: rgba(255, 255, 255, 0.8);
  color: #333;
  font-weight: normal;
  border: 1px solid #ddd;
}

/* Scrolling for chat messages */
#chat-container::-webkit-scrollbar {
  width: 8px;
}

#chat-container::-webkit-scrollbar-thumb {
  background: #cfcfcf;
  border-radius: 4px;
}

/* Advisor Watermark Image */
.advisor-watermark {
  flex: 0 0 50px; /* Fix width of the watermark image */
  height: auto; /* Maintain aspect ratio */
  margin-right: 10px; /* Space between watermark and chat content */
  opacity: 1.0; /* Light watermark effect */
  pointer-events: none; /* Prevent interaction with the image */
}


.user-message {
  color: #333;
  font-weight: bold;
}


/* Controls Styling */
#controls {
  display: flex;
  gap: 20px;
  justify-content: center;
  align-items: center;
}

#controls button {
  background-color: transparent;
  border: none;
  cursor: pointer;
  display: flex;
  justify-content: center;
  align-items: center;
}

#controls button img {
  width: 60px;
  height: auto;
  transition: transform 0.3s, filter 0.3s;
}

#controls button:disabled img {
  filter: grayscale(100%);
  cursor: not-allowed;
}

#controls button:hover img {
  transform: scale(1.1);
  filter: brightness(0.8);
}

/* Responsive Design */
@media (max-width: 768px) {
  #conversation-screen {
    max-width: 90%;
  }

  #chat-container {
    height: 400px;
  }

  #controls button img {
    width: 50px;
  }
}

@media (max-width: 480px) {
  #controls button img {
    width: 40px;
  }

  #logo {
    width: 60px;
  }
}