/* style.css */

/* 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;
  --subheading-color: #828282;
  --placeholder-color: #A6A6A6;
  --primary-color: #242424;
  --secondary-color: #383838;
  --secondary-hover-color: #444;
}
.light_mode {
  /* Light mode colors */
  --text-color: #222;
  --subheading-color: #A0A0A0;
  --placeholder-color: #6C6C6C;
  --primary-color: #FFF;
  --secondary-color: #E9EEF6;
  --secondary-hover-color: #DBE1EA;
}


body {
    font-family: sans-serif;    
    background-color: #333333;
}

.container {
    max-width: 900px;
    margin: 20px auto;
	margin-top: 5px;
    padding: 20px;
    background-color: #fff;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
    border-radius: 5px;
}

.header_chatbot {
  /*  text-align: center; */
    margin-bottom: 20px;
}

.header_chatbot :where(.title, .subtitle) {
  text-align: center;
  margin: 0 auto;
  color: var(--text-color);
  font-weight: 500;
 /*  line-height: 4rem; */
}

.header_chatbot .title {
  text-align: center;
  margin: 0 auto;
  width: fit-content;
  font-size: 1.6rem;
  background-clip: text;
  background: linear-gradient(to right, #4285f4, #d96570);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}
.header_chatbot .subtitle {
  font-size: 1.2rem;
  color: var(--subheading-color);
}

.subtitle {
    font-size: 1.2em;
    color: #555;
}

.suggestion-list {
    list-style: none;
    padding: 0px 0px -20px 0px; /*¡æ »ó 10px, ¿ì 20px, ÇÏ 30px, ÁÂ */
    margin: 5px 0;
    display: flex;
  /*  flex-wrap: wrap; */
    justify-content: space-around;
}

.suggestion {
    background-color: #f0f0f0;
    padding: 10px;
	padding-bottom: -10px;
    margin-bottom: 10px;
    border-radius: 5px;
    width: calc(25% - 10px); /* Adjust for responsive layout */
    box-shadow: 0 0 5px rgba(0, 0, 0, 0.05);
}


.suggestion .text {
    margin-bottom: 5px;
}

.suggestion .icon {
    font-size: 1.5em;
    vertical-align: middle;
}

.chat-list {
    height: 390px;  /* ÃÂº¿ Ãâ·Â ³ôÀÌ */
    overflow-y: auto;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 5px;
    margin-bottom: 10px;
}

.typing-area {
    padding: 10px;
}

.typing-form {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.input-wrapper {
    flex-grow: 1;
    margin-right: 10px;
}


.typing-input {
    width: 100%;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 5px;
}

#send-message-button {
    font-size: 1.5em;
    cursor: pointer;
    background:none;
    border:none;
}

.action-buttons {
    display: flex;
    gap: 10px;
}

.action-buttons .icon {
    font-size: 1.5em;
    cursor: pointer;
}

.disclaimer-text {
    font-size: 0.8em;
    color: #777;
    margin-top: 10px;
    text-align: center;
}


/* Responsive Design adjustments */
@media (max-width: 600px) {
    .suggestion {
        width: 100%;
    }
}

.typing-area .icon {
  width: 36px;
  height: 36px;
  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_chatbot :is(.title, .subtitle) {
    font-size: 2rem;
    line-height: 2.6rem;
  }
  .header_chatbot .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: 30px;
    width: 30px;
  }
  .typing-area .disclaimer-text {
    font-size: 0.75rem;
    margin-top: 0.5rem;
  }
}

.suggestion-list .suggestion .icon {
  width: 22px;
  height: 22px;
  display: flex;
  font-size: 1.3rem;
  margin-top: 0.5rem;
  align-self: flex-end;
  align-items: center;
  border-radius: 50%;
  justify-content: center;
  color: var(--text-color);
  background: var(--primary-color);
}

.chat-list .message .message-content {
  display: flex;
  gap: 1.5rem;
  width: 100%;
  align-items: center;
}

.chat-list .message .avatar {
  width: 20px;
  height: 20px;
  object-fit: cover;
  margin-bottom: -5px;	
  align-self: flex-start;
}

.chat-list .message.loading .text {
  display: none;
}

.chat-list .message.loading .avatar {
  animation: rotate 3s linear infinite;
}

.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;
  }
}

.message-content .avatar { margin-right:-10px; }
.message-content .text { margin-left:-10px; }