/* ===== Chat Page Layout Fix ===== */

.chat-section {
  max-width: 900px;
  margin: 120px auto 40px; /* pushes below fixed navbar */
  padding: 0 20px;
  display: flex;
  flex-direction: column;
  height: calc(100vh - 160px);
}

/* Title spacing */
.chat-section h2 {
  margin-bottom: 4px;
}

.chat-section .subtitle {
  margin-bottom: 20px;
  opacity: 0.85;
}

/* Chat messages area */
.chat-box {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.04);
  margin-bottom: 16px;
}

/* Messages */
.msg {
  max-width: 80%;
  padding: 10px 14px;
  margin-bottom: 10px;
  border-radius: 12px;
  line-height: 1.4;
}

.msg.user {
  margin-left: auto;
  background: #ffd400;
  color: #000;
}

.msg.ai {
  margin-right: auto;
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
}

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

#chat-input {
  flex: 1;
  padding: 12px 14px;
  border-radius: 10px;
  border: none;
  outline: none;
}

#chat-send {
  padding: 0 20px;
  border-radius: 10px;
  cursor: pointer;
}
/* ============================
   Light Theme – Chat UI Fix
   ============================ */

html[data-theme="light"] .chat-section .subtitle {
  color: #4b5563;
  opacity: 1;
}

html[data-theme="light"] .chat-box {
  background: #f9fafb;
  border: 1px solid #e5e7eb;
}

/* AI messages */
html[data-theme="light"] .msg.ai {
  background: #e5e7eb;
  color: #111827;
}

/* User message stays yellow but readable */
html[data-theme="light"] .msg.user {
  background: #ffd400;
  color: #000;
}

/* Input area */
html[data-theme="light"] #chat-input {
  background: #ffffff;
  color: #111827;
  border: 1px solid #d1d5db;
}

html[data-theme="light"] #chat-send {
  background: #111827;
  color: #ffffff;
}
