/* ── Chat page ── */
html, body {
  height: 100%;
  background: var(--purple-gradient);
  font-family: 'Signika', sans-serif;
}

.chat-container {
  height: 100%;
  display: flex;
  flex-direction: column;
  padding: 5%;
  border-color: var(--bg-color);
  border-radius: 10px;
}

/* ── Card (replaces Bootstrap .card) ── */
.card {
  display: flex;
  flex-direction: column;
  flex-grow: 1;
  height: 90%;
  border: none;
  border-radius: 0.25rem;
  overflow: hidden;
}

/* ── Messages area (replaces Bootstrap .card-body) ── */
.card-body {
  flex: 1 1 auto;
  padding: 1.25rem;
}

.messages-box {
  overflow-y: auto;
  max-height: 100%;
  background: var(--purple-gradient-inverse);
  color: var(--ai-color);
  position: relative;
}

.messages-list {
  list-style: none;
  padding-left: 0;
  margin: 0;
  border: none;
  position: relative;
  z-index: 2;
}

.message {
  margin-bottom: 15px;
  list-style: none;
  position: relative;
  z-index: 2;
}

.message-text {
  padding: 0;
  border-radius: 0;
}

/* ── Sender badges ── */
.message-content-AI {
  display: flex;
  align-items: center;
  justify-content: left;
  white-space: pre-line;
}

.message-content-AI::before {
  content: "CV";
  display: inline-block;
  width: 15px;
  height: 15px;
  background-color: var(--ai-color);
  color: var(--chat-bg);
  margin-right: 5px;
  text-align: center;
  line-height: 15px;
  font-size: 10px;
}

.message-content-USER {
  display: flex;
  align-items: center;
  justify-content: left;
  white-space: pre-line;
}

.message-content-USER::before {
  content: "US";
  display: inline-block;
  width: 15px;
  height: 15px;
  background-color: var(--user-color);
  color: var(--chat-bg);
  margin-right: 5px;
  text-align: center;
  line-height: 15px;
  font-size: 10px;
}

.sent {
  align-self: flex-end;
  color: var(--user-color);
}

.received {
  align-self: flex-start;
  color: var(--ai-color);
}

/* ── Input bar ── */
.message-form {
  display: flex;
  padding: 10px;
  background-color: var(--darkest);
}

.input-group {
  display: flex;
  width: 100%;
  border: none;
}

.message-input {
  flex: 1;
  border: none;
  padding: 0.375rem 0.75rem;
  font-family: 'Signika', sans-serif;
  font-size: 1rem;
  line-height: 1.5;
  background-color: var(--ai-color);
  color: var(--chat-bg);
}
.message-input:focus {
  outline: none;
  background-color: var(--ai-color);
  color: var(--chat-bg);
  border: none;
}

.btn-send {
  border: none;
  border-radius: 0;
  padding: 0.375rem 0.75rem;
  font-family: 'Signika', sans-serif;
  font-size: 1rem;
  line-height: 1.5;
  cursor: pointer;
  background-color: var(--ai-color);
  color: var(--chat-bg);
}
.btn-send:hover {
  background-color: var(--chat-bg);
  color: var(--ai-color);
}

/* ── Header ── */
.card-header {
  background-color: var(--ai-color);
  color: var(--chat-bg);
  padding: 0.75rem 1.25rem;
}
.card-header a {
  color: inherit;
  text-decoration: none;
}
.card-header a:hover {
  text-decoration: none;
}

/* ── Footer ── */
.footer {
  text-align: center;
  margin-top: 20px;
  color: var(--ai-color);
}
.footer a {
  color: var(--ai-color);
  text-decoration: underline;
}
