/* Container Styles */
.chat-container {
  max-width: 700px;
  margin: 40px auto;
  background: white;
  border: 1px solid #ddd;
  border-radius: 8px;
  padding: 20px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.chat-container h2,
.assistant-header {
  display: none; /* Hide header */
}

/* Chat Window */
.chat-window {
  border: 1px solid #ccc;
  height: 400px;
  overflow-y: auto;
  padding: 10px;
  margin-bottom: 10px;
  background: #f9f9f9;
  border-radius: 4px;
  display: flex;
  flex-direction: column;
}

/* Assistant Intro */
.assistant-intro {
  display: flex;
  align-items: flex-start;
  background-color: #eef4fb;
  padding: 12px;
  border-radius: 10px;
  margin-bottom: 12px;
}

.assistant-avatar {
  width: 40px;
  height: 40px;
  margin-right: 12px;
  border-radius: 50%;
  object-fit: cover;
}

.assistant-content {
  display: flex;
  flex: 1;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 20px;
}

.assistant-content > p {
  flex: 1 1 50%;
  margin: 0;
}

.example-questions {
  flex: 1 1 45%;
  font-size: 0.9em;
  color: #444;
}

.example-questions ul {
  padding-left: 16px;
  margin: 4px 0 0;
}

.example-questions li {
  margin-bottom: 4px;
}

/* Chat Message Rows */
.message-row {
  display: flex;
  align-items: flex-start;
  margin-bottom: 12px;
}

.message-row.assistant {
  justify-content: flex-start;
}

.message-row.user {
  justify-content: flex-end;
}

/* Avatars */
.avatar {
  width: 28px;
  height: 28px;
  margin-right: 10px;
  border-radius: 50%;
  object-fit: contain;
}

/* Message Bubbles */
.message {
  background-color: #f1f1f1;
  padding: 10px 14px;
  border-radius: 16px;
  max-width: 75%;
  word-wrap: break-word;
  font-size: 0.95em;
  line-height: 1.4;
  animation: fadeIn 0.3s ease-in;
}

.message.system {
  color: #b30000;
  font-style: italic;
  background-color: #fff0f0;
  border-left: 4px solid #b30000;
  padding: 8px;
  margin: 10px 0;
  border-radius: 4px;
}


.message.user {
  background-color: #1565c0;
  color: white;
  align-self: flex-end;
  border-bottom-right-radius: 4px;
}

.message.assistant {
  background-color: #e8f0fe;
  color: #1a73e8;
  align-self: flex-start;
  border-bottom-left-radius: 4px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.08);
}

/* Typing Animation */
.message.assistant.typing {
  animation: pulse 1.5s infinite;
  opacity: 0.7;
}

@keyframes pulse {
  0% { opacity: 0.7; }
  50% { opacity: 1; }
  100% { opacity: 0.7; }
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(5px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Input Section */
.chat-input {
  display: flex;
  gap: 10px;
  padding-top: 10px;
}

.chat-input input {
  flex: 1;
  padding: 10px;
  font-size: 1em;
  border: 1px solid #ccc;
  border-radius: 6px;
}

.chat-input button {
  padding: 10px 20px;
  background-color: #1a73e8;
  color: white;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  transition: background-color 0.3s;
}

.chat-input button:hover {
  background-color: #155ab6;
}


#quota-banner {
  padding: 8px 12px;
  margin: 10px 0;
  border-radius: 6px;
  font-weight: 500;
  font-family: system-ui, sans-serif;
}

.quota-green {
  background-color: #e6f4ea;
  color: #216e39;
  border-left: 4px solid #27ae60;
}

.quota-orange {
  background-color: #fff4e5;
  color: #8a4d00;
  border-left: 4px solid #e67e22;
}

.quota-red {
  background-color: #ffe6e6;
  color: #b30000;
  border-left: 4px solid #e74c3c;
}



.context-tip {
  margin-top: .75rem;
  padding: .6rem .75rem;
  border-left: 3px solid #4a90e2;
  background: #f7faff;
  border-radius: 6px;
  font-size: 0.9rem;
  line-height: 1.4;
}
.context-tip__icon { margin-right: .35rem; }
.btn-link {
  background: none;
  border: none;
  color: #4a90e2;
  text-decoration: underline;
  cursor: pointer;
  padding: 0;
  font: inherit;
}
.btn-link:hover { text-decoration: none; }
