/* LegalMitra Stage 2 answer-card trust affordances */
.legal-tracker-preview-banner {
  margin-top: 0.85rem !important;
  padding: 0.65rem 0.85rem;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 0.55rem;
  background: rgba(255, 248, 239, 0.12);
  color: #f8e7d3 !important;
  font-size: 0.95rem;
  max-width: 760px;
}

.legal-answer-mode {
  font-weight: 600;
  letter-spacing: 0.01em;
}

.legal-answer-mode.warn {
  color: #f3e6c2;
}

.legal-answer-advisory {
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid rgba(231, 199, 124, 0.28);
  background: rgba(197, 160, 89, 0.1);
  color: #f3e6c2;
  font-size: 13px;
  line-height: 1.45;
}

.legal-answer-limitations {
  display: grid;
  gap: 8px;
  padding: 10px 12px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.legal-answer-limitations strong {
  color: #e7c77c;
}

.legal-answer-limitations ul {
  margin: 0;
  padding-left: 18px;
  display: grid;
  gap: 6px;
  color: #cbd5e1;
  font-size: 13px;
  line-height: 1.45;
}

/* Chat workspace: keep Ask + follow-up visible; give the answer room to scroll. */
body[data-legal-page="chat"] .legal-chat-panel {
  min-height: calc(100dvh - 120px);
  grid-template-rows: auto auto auto minmax(0, 1fr) auto;
}

body[data-legal-page="chat"] .legal-chat-panel .legal-answer-panel,
body[data-legal-page="chat"] .legal-answer-panel {
  max-height: none;
  min-height: 280px;
  height: min(62dvh, 720px);
}

body[data-legal-page="chat"] .legal-followup-box {
  position: sticky;
  bottom: 12px;
  z-index: 5;
  backdrop-filter: blur(10px);
}

body[data-legal-page="chat"] .legal-query-box {
  position: sticky;
  top: 72px;
  z-index: 4;
  background: rgba(9, 15, 28, 0.92);
  backdrop-filter: blur(8px);
  padding-top: 6px;
  padding-bottom: 6px;
}

/* History sidebar: always show a readable title, not only the expiry line. */
.legal-history-list .history-title {
  display: block;
  min-height: 1.2em;
  overflow: hidden;
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.35;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.legal-history-list .history-preview {
  display: -webkit-box;
  overflow: hidden;
  color: #cbd5e1;
  font-size: 12px;
  font-style: normal;
  line-height: 1.35;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.legal-answer-audit {
  padding: 8px 12px;
  border-radius: 8px;
  border: 1px solid rgba(148, 163, 184, 0.28);
  background: rgba(148, 163, 184, 0.08);
  color: #cbd5e1;
  font-size: 12px;
  line-height: 1.4;
}
