/* Base Reset */
body, html {
  margin: 0;
  padding: 0;
  height: 100%;
  font-family: 'Helvetica Neue', Arial, sans-serif;
  background-color: #d9715a;
}

/* Header */
/* Add these styles at the end of your styles.css file */

#header {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 15px;
  background-color: #ffffff;
  border-bottom: 1px solid #e0e0e0;
  height: 60px;
  border-radius: 8px;
  position: relative;
}

#back-button {
  position: absolute;
  left: 10px;
  width: 40px;
  height: 40px;
  border: none;
  background-color: #d9715a;
  color: #ffffff;
  border-radius: 50%;
  font-size: 20px;
  cursor: pointer;
  transition: background 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

#back-button:hover {
  background-color: #a92e04;
}

#back-button.hidden {
  display: none;
}

#logo {
  width: 200px;
  height: auto;
}


/* Language Selector */
#language-selector {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  margin: 10px 0;
}

.lang-button {
  margin: 5px;
  padding: 5px 10px;
  border: 1px solid #e0e0e0;
  border-radius: 5px;
  cursor: pointer;
  background-color: #ffffff;
  transition: background 0.3s ease;
}

.lang-button:hover {
  background-color: #d9715a;
  color: #ffffff;
}

/* Chat Container */
#chat-container {
  width: 100%;
  max-width: 1000px;
  margin: 20px auto;
  height: calc(100vh - 40px);
  background-color: white;
  box-shadow: 0 0 15px rgba(0, 0, 0, 0.1);
  border-radius: 8px;
  display: flex;
  flex-direction: column;
}

/* Chat Window */
#chat-window {
  flex: 1;
  overflow-y: auto;
  padding: 20px;
  background-color: #f7f8fa;
  border-radius: 8px;
}

/* Loading Spinner */
#loading-spinner {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

.spinner {
  border: 8px solid #f3f3f3;
  border-top: 8px solid #d9715a;
  border-radius: 50%;
  width: 60px;
  height: 60px;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* Hidden Class */
.hidden {
  display: none;
}

/* Messages Container */
#messages {
  display: flex;
  flex-direction: column;
}

.message {
  margin: 2px 0;
  padding: 5px 10px;
  border-radius: 10px;
  max-width: 80%;
  word-wrap: break-word;
  overflow-wrap: break-word;
  word-break: break-word;
}

.message.user {
  align-self: flex-end;
  background: #ef4c28;
  color: #ffffff;
}

.message.bot {
  align-self: flex-start;
  background-color: #e6e6e6;
  color: #000000;
}

/* Input Container */
#input-container {
  display: flex;
  padding: 15px;
  background-color: #fafafa;
  border-top: 1px solid #e0e0e0;
  flex-shrink: 0;
  align-items: flex-end;
}

/* Textarea Field */
#message-input {
  flex: 1;
  padding: 10px;
  border: 1px solid #e0e0e0;
  border-radius: 20px;
  font-size: 16px;
  resize: none;
  font-family: 'Helvetica Neue', Arial, sans-serif;
  overflow-y: hidden;
  height: 40px;
  box-sizing: border-box;
  line-height: 20px;
}

/* Send Button with Arrow */
#send-button {
  width: 40px;
  height: 40px;
  border: none;
  background: linear-gradient(45deg, #e47023, #a92e04);
  color: white;
  border-radius: 50%;
  margin-left: 10px;
  cursor: pointer;
  font-size: 16px;
  transition: background 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

#send-button:hover {
  background: linear-gradient(45deg, #a92e04, #e47023);
}

#send-button::before {
  content: '➤';
  font-size: 20px;
}

#question-title {
  padding: 20px;
  font-size: 30px;
  color: #464646;
  text-align: center; /* Centered */
}

#ai-notice {
  padding: 5px 20px;
  font-size: 10px;
  color: #464646;
  text-align: left;
}

#question-templates {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  padding: 10px;
  background-color: #f7f8fa;
}

.template-button {
  width: 30%;
  margin: 5px;
  padding: 15px;
  border: 1px solid #e0e0e0;
  font-size: 16px;
  background-color: white;
  color: #000000;
  border-radius: 8px;
  cursor: pointer;
  transition: box-shadow 0.3s ease;
  text-align: left;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
  display: flex;
  align-items: flex-start;
}



.template-button:hover {
  background: #ef4c28;
  color: #ffffff;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

/* Media Queries for Responsiveness */
@media (max-width: 600px) {
  .template-button {
    width: 100%;
  }
  #language-selector {
    justify-content: flex-start;
  }
  #chat-container {
    height: 100vh;
    margin: 0;
    border-radius: 0;
  }

  #message-input {
    font-size: 14px;
  }

  #send-button {
    padding: 8px 16px;
    font-size: 14px;
  }
}
