@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 {
  /* Light mode colors */
  --text-color: #222;
  --subheading-color: #a0a0a0;
  --placeholder-color: #6c6c6c;
  --primary-color: #fff;
  --secondary-color: #e9eef6;
  --secondary-hover-color: #dbe1ea;
}
/*
.light_mode {*/
  /* Dark mode colors */
/*  --text-color: #e3e3e3;
  --subheading-color: #828282;
  --placeholder-color: #a6a6a6;
  --primary-color: #242424;
  --secondary-color: #383838;
  --secondary-hover-color: #444;
}*/

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: var(--subheading-color);
}

.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;
  scrollbar-color: #999 transparent;
}

.chat-list .message.incoming {
  margin-top: 1.5rem;
}

.chat-list .message .message-content {
  display: flex;
  gap: 1.5rem;
  width: 100%;
  align-items: center;
}

.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: flex;
  align-items: center;
  justify-content: center;
  background: none;
  font-size: 1.25rem;
  margin-left: 3.5rem;
  visibility: hidden;
}

.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);
}

/* ---------- TYPING INDICATOR ---------- */
.chat-list .message .typing-indicator {
  display: none;
  gap: 4px;
  padding: 12px 16px;
}

.chat-list .message.loading .typing-indicator {
  display: flex;
}

.chat-list .message .typing-indicator .dot {
  width: 8px;
  height: 8px;
  /* background: var(--subheading-color); */
  background: #faae36;
  border-radius: 50%;
  animation: typing 1s infinite ease-in-out;
}

.chat-list .message .typing-indicator .dot:nth-child(1) {
  animation-delay: 0.2s;
}

.chat-list .message .typing-indicator .dot:nth-child(2) {
  animation-delay: 0.3s;
}

.chat-list .message .typing-indicator .dot:nth-child(3) {
  animation-delay: 0.4s;
}

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

.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);
}

/* New styles for the hyperlink inside disclaimer text */
.typing-area .disclaimer-text a {
    color: #1E90FF;  /* Light blue color */
    text-decoration: none;  /* Removes underline */
    transition: color 0.3s ease;  /* Smooth color transition effect */
}

/* Hover effect for the hyperlink */
.typing-area .disclaimer-text a:hover {
    color: #fc977f;  /* Orange-Red color */
}

/* Responsive media query code for small screen */
@media (max-width: 768px) {
  /* Existing styles remain the same */
  .header :is(.title, .subtitle) {
    font-size: 2rem;
    line-height: 2.6rem;
  }

  .header .subtitle {
    font-size: 1.7rem;
  }

  /* Add these new styles for the suggestion list */
  .suggestion-list {
    flex-wrap: wrap; /* Allow items to wrap to next line */
    justify-content: center; /* Center items horizontally */
    gap: 1rem; /* Reduce gap between items */
  }

  .suggestion-list .suggestion {
    width: calc(50% - 0.5rem); /* Make each suggestion take up roughly half the width */
    min-width: 160px; /* Set a minimum width */
    padding: 1rem; /* Reduce padding */
  }

  .suggestion-list .suggestion .text {
    font-size: 0.9rem; /* Make text slightly smaller */
  }

  .suggestion-list .suggestion .icon {
    width: 35px; /* Make icon slightly smaller */
    height: 35px;
    font-size: 1.1rem;
    margin-top: 1.5rem; /* Reduce top margin */
  }
}
