/**
 * AI Markdown Content Styles
 * Styles for markdown-rendered content in AI answer display
 */

/* Table Styles */
.ai-answers .table-wrapper {
    overflow-x: auto;
    margin: 20px 0;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.ai-answers .table-wrapper table {
    border-collapse: collapse;
    width: 100%;
    min-width: 500px;
    background: white;
    font-size: 13px;
}

.ai-answers .table-wrapper thead tr {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.ai-answers .table-wrapper thead th {
    padding: 14px 12px;
    text-align: left;
    color: white;
    font-weight: 600;
    border: none;
    letter-spacing: 0.5px;
}

.ai-answers .table-wrapper thead th code {
    background: rgba(255, 255, 255, 0.2);
    padding: 2px 4px;
    border-radius: 3px;
}

.ai-answers .table-wrapper thead th a {
    color: white;
    text-decoration: underline;
}

.ai-answers .table-wrapper tbody tr {
    transition: background-color 0.2s;
}

.ai-answers .table-wrapper tbody tr:nth-child(even) {
    background-color: #f8f9fb;
}

.ai-answers .table-wrapper tbody tr:hover {
    background-color: #f0f4ff !important;
}

.ai-answers .table-wrapper tbody td {
    padding: 12px;
    border-bottom: 1px solid #e5e7eb;
    color: #374151;
}

.ai-answers .table-wrapper tbody tr td:first-child {
    font-weight: 500;
}

.ai-answers .table-wrapper tbody td code {
    background: #f3f4f6;
    color: #dc2626;
    padding: 2px 4px;
    border-radius: 3px;
}

.ai-answers .table-wrapper tbody td a {
    color: #667eea;
    text-decoration: none;
    border-bottom: 1px solid #667eea;
}

/* Inline Elements */
.ai-answers .reference-link {
    cursor: pointer;
    text-decoration: none;
}

.ai-answers a {
    color: #667eea;
    text-decoration: none;
    border-bottom: 1px solid #667eea;
}

.ai-answers img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin: 16px 0;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.ai-answers strong {
    color: #111827;
    font-weight: 700;
}

.ai-answers em {
    font-style: italic;
    color: #374151;
}

.ai-answers del {
    text-decoration: line-through;
    color: #9ca3af;
}

/* Code Blocks */
.ai-answers pre {
    background-color: #1e293b;
    color: #e2e8f0;
    padding: 14px;
    border-radius: 8px;
    overflow-x: auto;
    margin: 14px 0;
    font-family: 'Courier New', monospace;
    font-size: 0.9em;
}

.ai-answers pre code {
    background: none;
    color: inherit;
    padding: 0;
}

.ai-answers code {
    background-color: #fef3c7;
    color: #92400e;
    padding: 2px 5px;
    border-radius: 3px;
    font-family: 'Courier New', monospace;
    font-size: 0.85em;
}

/* Headings */
.ai-answers h1 {
    color: #1f2937;
    margin: 28px 0 14px 0;
    font-size: 1.6em;
    font-weight: 700;
    border-bottom: 3px solid #667eea;
    padding-bottom: 10px;
}

.ai-answers h2 {
    color: #1f2937;
    margin: 24px 0 12px 0;
    font-size: 1.4em;
    font-weight: 600;
    border-bottom: 2px solid #e5e7eb;
    padding-bottom: 8px;
}

.ai-answers h3 {
    color: #1f2937;
    margin: 20px 0 10px 0;
    font-size: 1.2em;
    font-weight: 600;
    border-bottom: 2px solid #e5e7eb;
    padding-bottom: 6px;
}

.ai-answers h4 {
    color: #1f2937;
    margin: 18px 0 9px 0;
    font-size: 1.1em;
    font-weight: 600;
    border-bottom: 1px solid #e5e7eb;
    padding-bottom: 5px;
}

.ai-answers h5 {
    color: #1f2937;
    margin: 16px 0 8px 0;
    font-size: 1.05em;
    font-weight: 600;
}

.ai-answers h6 {
    color: #1f2937;
    margin: 14px 0 7px 0;
    font-size: 1em;
    font-weight: 600;
}

/* Horizontal Rule */
.ai-answers hr {
    border: none;
    border-top: 2px solid #e5e7eb;
    margin: 50px 0;
}

/* Blockquote */
.ai-answers blockquote {
    border-left: 4px solid #667eea;
    padding-left: 14px;
    margin: 14px 0;
    color: #4b5563;
    /*background-color: #EAF3F9;*/
    background-color: #f9fafb;
    padding: 10px 14px;
    border-radius: 4px;
    font-size: 0.95em;
}

/* Lists */
.ai-answers ul {
    margin: 10px 0;
    padding-left: 22px;
    list-style: disc;
    font-size: 0.95em;
}

.ai-answers ol {
    margin: 10px 0;
    padding-left: 22px;
    list-style: decimal;
    font-size: 0.95em;
}

.ai-answers li {
    margin: 6px 0;
    line-height: 1.6;
}

.ai-answers ul ul,
.ai-answers ol ol,
.ai-answers ul ol,
.ai-answers ol ul {
    margin: 4px 0;
}

/* Paragraphs */
.ai-answers p {
    margin: 14px 0;
    line-height: 1.7;
    color: #374151;
    font-size: 0.95em;
}

/* Empty State / Messages */
.ai-answers .empty-message {
    color: #6b7280;
}

.ai-answers .no-results-message {
    text-align: center;
    padding: 20px;
    color: #999;
}

.ai-answers .no-results-icon {
    margin: 0 auto 12px;
    display: block;
    opacity: 0.3;
}

.ai-answers .no-results-text {
    font-size: 12px;
    margin-top: 8px;
    color: #999;
}

.ai-answers .error-message {
    text-align: center;
    padding: 20px;
    color: #ef4444;
}


.ai-answers{font-size:16px;margin-top:40px;line-height:1.6;}
.ai-answers *{max-width:100%}
.ai-answers h1,
.ai-answers h2,
.ai-answers h3,
.ai-answers h4,
.ai-answers h5,
.ai-answers h6{font-size:20px;font-weight:600;line-height:1.4;margin:26px 0 12px 0;border-bottom:none !important;}
.ai-answers h1{font-size:24px;}
.ai-answers h2{font-size:24px;}
.ai-answers h3{font-size:20px;}
.ai-answers h4{font-size:18px;}
.ai-answers p{font-size:18px;line-height:1.6;margin:12px 0;}
.ai-answers ul,
.ai-answers ol{font-size:16px;line-height:1.6;margin:12px 0;padding-left:24px;}
.ai-answers li{font-size:16px;line-height:1.6;margin:8px 0;}
.ai-answers strong{font-size:inherit;font-weight:700;}
.ai-answers em{font-size:inherit;font-style:italic;}
.ai-answers code{font-size:16px;font-family:monospace;}
.ai-answers pre{font-size:16px;line-height:1.5;overflow-x:auto;max-width:100%;}
.ai-answers a{font-size:inherit;color:#0060FF;text-decoration:underline;}
.ai-answers table{font-size:18px;width:100%;table-layout:auto;word-break:break-word;}
.ai-answers th,
.ai-answers td{font-size:16px;padding:10px 16px 10px 20px;text-align:left;}
.ai-answers .table-wrapper{border-radius:0;box-shadow: none;border-top:1px solid #000000;}
.ai-answers .table-wrapper thead th{height:50px;background:#F7F8FB !important; color:#1D1D1D;font-weight:600;border-radius:0;}
.ai-answers .table-wrapper tbody td{border-bottom:1px solid #E8E8E8;background:#fff}
.ai-answers blockquote{font-size:16px;line-height:1.6;padding-left:16px;border-left:4px solid #e5e7eb;}
.ai-answers hr{border-top:1px solid #E5E7EB;}
/*@media screen and (max-width: 1100px) {*/