





/* Import Google Font - Poppins */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;500;600&display=swap');

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: "Poppins", sans-serif;
}

:root {
  /* Dark mode colors */
  --text-color: #E3E3E3;
  --bot-response-color: red; /* Red text in dark mode */
  --subheading-color: #828282;
  --placeholder-color: #A6A6A6;
  --primary-color: #242424;
  --secondary-color: #383838;
  --secondary-hover-color: #444;
    /* Add a variable for text color in light mode */
  --light-mode-text-color: #000;
}

.light_mode {
  /* Light mode colors */
  --text-color: #000; /* Black text in light mode */
  --bot-response-color: #000; /* Black text for bot responses in light mode */
  --subheading-color: #A0A0A0;
  --placeholder-color: #6C6C6C;
  --primary-color: #FFF;
  --secondary-color: #E9EEF6;
  --secondary-hover-color: #DBE1EA;
}
/* New centralized color rule for all relevant text elements */
body, .header .title, .header .subtitle, .suggestion .text, .suggestion .icon, 
.chat-list .message .text, .typing-form .typing-input, .disclaimer-text a {
  color: var(--text-color);
}

body {
  background: var(--primary-color);
}

.header, .chat-list .message, .typing-form {
  margin: 0 auto;
  max-width: 980px;
}

.header {
  margin-top: 6vh;
  padding: 1rem;
  overflow-x: hidden;
}

body.hide-header .header {
  margin: 0;
  display: none;
}

.header :where(.title, .subtitle) {
  color: var(--text-color);
  font-weight: 500;
  line-height: 4rem;
}

.header .title {
  width: fit-content;
  font-size: 3rem;
  background-clip: text;
  background: linear-gradient(to right, #4285f4, #d96570);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.header .subtitle {
  font-size: 2.6rem;
  color: rgb(130, 130, 130);
}

.suggestion-list {
  width: 100%;
  list-style: none;
  display: flex;
  gap: 1.25rem;
  margin-top: 9.5vh;
  overflow: hidden;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
}

.suggestion-list .suggestion {
  cursor: pointer;
  padding: 1.25rem;
  width: 222px;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  border-radius: 0.75rem;
  justify-content: space-between;
  background: var(--secondary-color);
  transition: 0.2s ease;
}

.suggestion-list .suggestion:hover {
  background: var(--secondary-hover-color);
}

.suggestion-list .suggestion :where(.text, .icon) {
  font-weight: 400;
  color: var(--text-color);
}

.suggestion-list .suggestion .icon {
  width: 42px;
  height: 42px;
  display: flex;
  font-size: 1.3rem;
  margin-top: 2.5rem;
  align-self: flex-end;
  align-items: center;
  border-radius: 50%;
  justify-content: center;
  color: var(--text-color);
  background: var(--primary-color);
}

.chat-list {
  padding: 2rem 1rem 12rem;
  max-height: 100vh;
  overflow-y: auto; /* Ensures scrollbar appears */
  
  scrollbar-width: thin; /* For Firefox, makes scrollbar thinner */
  scrollbar-color: hsl(267, 7%, 26%) transparent; /* Custom colors for Firefox */
}

/* Custom scrollbar styling for WebKit browsers (e.g., Chrome, Safari) */
.chat-list::-webkit-scrollbar {
  width: 100vh;
  width: 8px; /* Adjust the width of the scrollbar */
}

.chat-list::-webkit-scrollbar-track {
  background: transparent; /* Track background */
  width: 100vh;
}

.chat-list::-webkit-scrollbar-thumb {
  background-color: #888; /* Scrollbar color */
  border-radius: 4px;
  border: 2px solid transparent; /* Transparent border for spacing */
}

/* Optional: Keep the same styling for incoming messages */
.chat-list .message.incoming {
  margin-top: 1.5rem;
}




/* For WebKit browsers (like Chrome and Safari) */
.chat-list::-webkit-scrollbar {
  width: 8px; /* Adjust scrollbar width */
}

.chat-list::-webkit-scrollbar-track {
  background: var(--secondary-color); /* Track color */
}

.chat-list::-webkit-scrollbar-thumb {
  background-color: #888; /* Scrollbar thumb color */
  border-radius: 4px;
  border: 2px solid var(--secondary-color); /* For rounded effect */
}

.chat-list .message.incoming {
  margin-top: 1.5rem;
}


.chat-list .message.incoming {
  margin-top: 1.5rem;
}

.chat-list .message .message-content {
  display: flex;
  gap: 1.5rem;
  width: 100%;
  align-items: center;
}



   Styling for bot response text color 
   .chat-list .message.incoming .text {
    color: #ff0000 !important; /* Fixed color for bot responses */
  }
  
  

/* Bot response default styling */
.chat-list .message.incoming .message-content {
  background-color: #33333300; /* Regular background color */
  padding: 10px;
  border-radius: 8px;
  max-width: 100%;
  margin: 5px 0;
  transition: background-color 0.3s ease; /* Smooth transition for hover */
}

/* Green hover effect for bot response */
.chat-list .message.incoming .message-content:hover {
  background-color: #005c14; /* Green background on hover */
  color: #fff9f9; /* Text color on hover for contrast */
}









.chat-list .message .text {
  color: var(--text-color);
  white-space: pre-wrap;
}

.chat-list .message.error .text {
  color: #e55865;
}

.chat-list .message.loading .text {
  display: none;
}

.chat-list .message .avatar {
  width: 40px;
  height: 40px;
  object-fit: cover;
  border-radius: 50%;
  align-self: flex-start;
}

.chat-list .message.loading .avatar {
  animation: rotate 3s linear infinite;
}

@keyframes rotate {
  100% {
    transform: rotate(360deg);
  }
}

.chat-list .message .icon {
  color: var(--text-color);
  cursor: pointer;
  height: 35px;
  width: 35px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: none;
  font-size: 1.25rem;
  visibility: hidden;
}


/* Apply margin to the copy button to shift the pair to the right */
.chat-list .message .icon:first-of-type {
  margin-left: 4rem; /* Adjust this value to move both buttons to the right */
}

/* Adjust gap between the two buttons */
.chat-list .message .icon + .icon {
  margin-left: 0.5rem; /* Set a smaller margin between the buttons */
}


.chat-list .message .icon.hide {
  visibility: hidden;
}

.chat-list .message:not(.loading, .error):hover .icon:not(.hide){
  visibility: visible;
}

.chat-list .message .icon:hover {
  background: var(--secondary-hover-color);
}

.chat-list .message .loading-indicator {
  display: none;
  gap: 0.8rem;
  width: 100%;
  flex-direction: column;
}

.chat-list .message.loading .loading-indicator {
  display: flex;
}

.chat-list .message .loading-indicator .loading-bar {
  height: 11px;
  width: 100%;
  border-radius: 0.135rem;
  background-position: -800px 0;
  background: linear-gradient(to right, #4285f4, var(--primary-color), #4285f4);
  animation: loading 3s linear infinite;
}

.chat-list .message .loading-indicator .loading-bar:last-child {
  width: 70%;
}

@keyframes loading {
  0% {
    background-position: -800px 0;
  }

  100% {
    background-position: 800px 0;
  }
}

.typing-area {
  position: fixed;
  width: 100%;
  left: 0;
  bottom: 0;
  padding: 1rem;
  background: var(--primary-color);

}

.typing-area :where(.typing-form, .action-buttons) {
  display: flex;
  gap: 0.75rem;
}

.typing-form .input-wrapper {
  width: 100%;
  height: 56px;
  display: flex;
  position: relative;
}

.typing-form .typing-input {
  height: 100%;
  width: 100%;
  border: none;
  outline: none;
  resize: none;
  font-size: 1rem;
  color: var(--text-color);
  padding: 1.1rem 4rem 1.1rem 1.5rem;
  border-radius: 100px;
  background: var(--secondary-color);
}

.typing-form .typing-input:focus {
  background: var(--secondary-hover-color);
}

.typing-form .typing-input::placeholder {
  color: var(--placeholder-color);
}

.typing-area .icon {
  width: 56px;
  height: 56px;
  flex-shrink: 0;
  cursor: pointer;
  border-radius: 50%;
  display: flex;
  font-size: 1.4rem;
  color: var(--text-color);
  align-items: center;
  justify-content: center;
  background: var(--secondary-color);
  transition: 0.2s ease;
}

.typing-area .icon:hover {
  background: var(--secondary-hover-color);
}

.typing-form #send-message-button {
  position: absolute;
  right: 0;
  outline: none;
  border: none;
  transform: scale(0);
  background: transparent;
  transition: transform 0.2s ease;
}

.typing-form .typing-input:valid ~ #send-message-button {
  transform: scale(1);
}

.typing-area .disclaimer-text {
  text-align: center;
  font-size: 0.85rem;
  margin-top: 1rem;
  color: var(--placeholder-color);
}

/* Responsive media query code for small screen */
@media (max-width: 768px) {
  .header :is(.title, .subtitle) {
    font-size: 2rem;
    line-height: 2.6rem;
  }

  .header .subtitle {
    font-size: 1.7rem;
  }

  .typing-area :where(.typing-form, .action-buttons) {
    gap: 0.4rem;
  }

  .typing-form .input-wrapper {
    height: 50px;
  }

  .typing-form .typing-input {
    padding: 1.1rem 3.5rem 1.1rem 1.2rem;
  }

  .typing-area .icon {
    height: 50px;
    width: 50px;
  }

  .typing-area .disclaimer-text {
    font-size: 0.75rem;
    margin-top: 0.5rem;
  }
}










/*background*/

/* Global reset */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'Quicksand', sans-serif;
}

/* Main Body Styling */
body {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  background: #000; /* Base black background */
  overflow: hidden; /* Prevents unwanted scrollbars */
}

/* Animated Background Section */
section {
  position: fixed; /* Covers the entire viewport */
  width: 100vw;
  height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 2px;
  flex-wrap: wrap;
  overflow: hidden;
  z-index: -1; /* Keeps it behind other content */
}

/* Gradient Animation */
section::before {
  content: '';
  position: absolute;
  width: 100%;
  height: 100%;
  background: linear-gradient(#000, #0f0, #000);
  animation: animate 5s linear infinite;
}

/* Animation Keyframes */
@keyframes animate {
  0% {
      transform: translateY(-100%);
  }
  100% {
      transform: translateY(100%);
  }
}

/* Individual Span Styling */
section span {
  position: relative;
  display: block;
  width: calc(6.25vw - 2px);
  height: calc(6.25vw - 2px);
  background: #181818;
  z-index: 2;
  transition: 1.5s;
}

/* Hover Effect for Span Elements */
section span:hover {
  background: rgb(21, 255, 0);
  transition: 0s;
}

/* Chatbot Container Styling */
.chat-container {
  position: relative;
  z-index: 1; /* Ensure it stays above the animated background */
  background: rgba(34, 34, 34, 0.85); /* Semi-transparent background for readability */
  padding: 20px;
  border-radius: 8px;
  width: 400px;
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.9);
  color: white;
  margin-top: 20px; /* Provides space from the top of the viewport */
}

/* Chatbot Header */
.chat-container h1 {
  text-align: center;
  color: #0f0;
}

/* Chat Box Styling */
.chat-box {
  padding: 1rem;
  height: 300px;
  overflow-y: auto;
  border-bottom: 1px solid #333;
  color: white;
  background: #222;
  margin-bottom: 10px;
}

/* Input Container */
.input-container {
  display: flex;
}

/* User Input Styling */
#user-input {
  flex: 1;
  padding: 1rem;
  border: none;
  outline: none;
  background: #333;
  color: #fff;
  border-radius: 4px 0 0 4px;
}

/* Send Button Styling */
#send-btn {
  padding: 1rem;
  background-color: rgb(34, 255, 0);
  color: #000;
  border: none;
  cursor: pointer;
  font-weight: bold;
  border-radius: 0 4px 4px 0;
}

/* Send Button Hover Effect */
#send-btn:hover {
  background-color: #0a0; /* Slightly darker green on hover */
}









.suggestion-list .suggestion .text {
  color: greenyellow; /* Change this to your preferred text color */
}

.suggestion-list .suggestion .icon {
  color: red; /* Change this to your preferred icon color */
}


.disclaimer-text a {
  color: #59ff00; /* Initial color of the link text */
  text-decoration: none; /* Remove underline */
}

.disclaimer-text a:hover {
  color: red; /* Change color on hover */
}



/* Light mode for background boxes */
.light_mode section span {
  background: #cac3c3; /* White boxes in light mode */
}

.light_mode section span:hover {
  background: #ff0000; /* Black hover effect in light mode */
}












.icon.material-symbols-rounded {
  /* Styling for speaker button */
  cursor: pointer;
  font-size: 1.25rem;
}

.icon.material-symbols-rounded:hover {
  color: #00f; /* Change color on hover, optional */
}
