/*
 * Application CSS - Non-Tailwind styles only
 *

 */

/* ===== LEGAL CASE SUMMARY - summary-content styles ===== */
.summary-content {
  line-height: 1.8;
  font-feature-settings: "kern" 1, "liga" 1;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  padding: 3rem !important;
  word-wrap: break-word;
  overflow-wrap: break-word;
}

.summary-content > * + * {
  margin-top: 1.5rem;
}

.summary-content h1 + *,
.summary-content h2 + *,
.summary-content h3 + *,
.summary-content h4 + * {
  margin-top: 1rem !important;
}

/* Tables */
.summary-content table {
  border-spacing: 0;
  background: white;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
  margin-top: 3rem !important;
  margin-bottom: 4rem !important;
  width: 100%;
}

.summary-content table thead {
  background: linear-gradient(to bottom, #f9fafb, #f3f4f6);
  position: sticky;
  top: 0;
  z-index: 10;
}

.summary-content table th {
  padding: 1.25rem 2rem !important;
  font-weight: 700 !important;
  font-size: 0.875rem !important;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #111827 !important;
  border-bottom: 2px solid #d1d5db !important;
  text-align: left;
}

.summary-content table td {
  padding: 1.25rem 2rem !important;
  font-size: 1rem !important;
  line-height: 1.75;
  color: #374151 !important;
  border-bottom: 1px solid #e5e7eb;
}

.summary-content table tbody tr:nth-child(even) {
  background-color: #f9fafb;
}

.summary-content table tbody tr:nth-child(odd) {
  background-color: #ffffff;
}

.summary-content table tbody tr {
  transition: all 0.15s ease;
}

.summary-content table tbody tr:hover {
  background-color: #eff6ff !important;
  box-shadow: inset 0 0 0 1px #dbeafe;
  transform: scale(1.001);
}

.summary-content table tbody tr:last-child td {
  border-bottom: none !important;
}

.summary-content table td:first-child {
  font-weight: 600 !important;
  color: #1f2937 !important;
}

@media (max-width: 768px) {
  .summary-content table {
    font-size: 0.875rem;
  }

  .summary-content table th,
  .summary-content table td {
    padding: 0.75rem 1rem !important;
  }
}

/* Lists */
.summary-content ul ul,
.summary-content ol ul,
.summary-content ul ol,
.summary-content ol ol {
  margin-top: 0.75rem;
  margin-bottom: 0.75rem;
}

/* Blockquotes */
.summary-content blockquote {
  box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.03);
}

/* Code blocks */
.summary-content pre {
  border: 1px solid #374151;
}

/* Ordered list markers */
.summary-content ol > li::marker {
  font-weight: 700;
  color: #6b7280;
}

/* Links */
.summary-content a {
  transition: all 0.2s ease;
}

.summary-content a:hover {
  color: #1d4ed8;
  text-decoration-thickness: 3px;
}

/* Images */
.summary-content img {
  max-width: 100%;
  height: auto;
  display: block;
  margin-left: auto;
  margin-right: auto;
}

/* Bold in lists */
.summary-content li strong {
  color: #1f2937;
  font-weight: 700;
}

/* ===== CHAT MESSAGE MARKDOWN STYLING ===== */
.chat-message-content {
  line-height: 1.6;
}

/* Headings */
.chat-message-content h1,
.chat-message-content h2,
.chat-message-content h3,
.chat-message-content h4,
.chat-message-content h5,
.chat-message-content h6 {
  font-weight: 700;
  margin-top: 1rem;
  margin-bottom: 0.5rem;
}

.chat-message-content h1 { font-size: 1.5rem; }
.chat-message-content h2 { font-size: 1.375rem; }
.chat-message-content h3 { font-size: 1.25rem; }
.chat-message-content h4 { font-size: 1.125rem; }

/* Paragraphs */
.chat-message-content p {
  margin-bottom: 0.75rem;
}

/* Lists */
.chat-message-content ul,
.chat-message-content ol {
  margin-left: 1.5rem;
  margin-bottom: 0.75rem;
}

.chat-message-content li {
  margin-bottom: 0.375rem;
}

/* Strong & Em */
.chat-message-content strong {
  font-weight: 700;
  color: #1f2937;
}

.chat-message-content em {
  font-style: italic;
  color: #374151;
}

/* Code blocks */
.chat-message-content pre {
  background-color: #1f2937;
  color: #f3f4f6;
  padding: 0.75rem;
  border-radius: 0.375rem;
  overflow-x: auto;
  margin: 0.75rem 0;
  font-size: 0.875rem;
  line-height: 1.4;
}

.chat-message-content code {
  background-color: #f3f4f6;
  color: #1f2937;
  padding: 0.125rem 0.375rem;
  border-radius: 0.25rem;
  font-family: monospace;
  font-size: 0.875em;
}

.chat-message-content pre code {
  background-color: transparent;
  color: #f3f4f6;
  padding: 0;
}

/* Blockquotes */
.chat-message-content blockquote {
  border-left: 3px solid #3b82f6;
  padding-left: 1rem;
  margin: 0.75rem 0;
  color: #4b5563;
  font-style: italic;
}

/* Horizontal rule */
.chat-message-content hr {
  border: none;
  border-top: 1px solid #d1d5db;
  margin: 1rem 0;
}

/* Links */
.chat-message-content a {
  color: #3b82f6;
  text-decoration: underline;
  cursor: pointer;
}

.chat-message-content a:hover {
  color: #1d4ed8;
  text-decoration-thickness: 2px;
}
