@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

body {
    font-family: 'Inter', sans-serif;
    background-color: #f3f4f6;
}

.tab-button {
    transition: all 0.2s ease-in-out;
    border-bottom: 2px solid transparent;
}

.tab-button.active {
    border-color: #4f46e5;
    color: #4f46e5;
    background-color: #eef2ff;
}

/* --- Timeline View Styles --- */
.timeline-item {
    position: relative;
    padding-bottom: 2rem;
    padding-left: 2.5rem;
}

.timeline-item:last-child {
    padding-bottom: 0;
}

.timeline-marker {
    position: absolute;
    left: 0;
    top: 0.25rem;
    height: 1rem;
    width: 1rem;
    border-radius: 9999px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.timeline-line {
    position: absolute;
    left: 0.4375rem; /* center of the 1rem marker */
    top: 1.25rem;
    bottom: -0.5rem;
    width: 2px;
    background-color: #d1d5db;
}

.timeline-item:last-child .timeline-line {
    display: none;
}

.log-card {
    transition: all 0.2s ease-in-out;
}

.log-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

/* --- Table View Styles --- */
.log-table-view {
    background-color: #fff;
    border-radius: 0.5rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    overflow: hidden;
}

.log-table {
    width: 100%;
    border-collapse: collapse;
    table-layout: fixed; 
}

.log-table th, .log-table td {
    padding: 0.75rem 1rem;
    text-align: left;
    border-bottom: 1px solid #e5e7eb;
    vertical-align: top;
}

.log-table th {
    background-color: #f9fafb;
    font-weight: 600;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #6b7280;
}

.log-table tbody tr:last-child td {
    border-bottom: none;
}

.log-table tr.context-row, .log-table tr.ai-row {
    border-top: 1px solid #d1d5db;
}
.log-table tr.context-row td, .log-table tr.ai-row td {
    padding: 0 !important;
    border-bottom: 1px solid #e5e7eb;
}

/* --- Context View Styles --- */
.context-view-wrapper {
    background-color: #1f2937;
    overflow-x: auto;
}
.context-view {
    padding: 1rem;
    color: #d1d5db;
    font-family: monospace;
    font-size: 0.875rem;
    display: inline-flex;
    flex-direction: column;
    min-width: 100%;
}
.context-view div {
    white-space: pre; 
}
.context-view .context-highlight {
    background-color: #fef08a;
    color: #1f2937;
}

.log-table .timestamp-cell { width: 180px; }
.log-table .level-cell { width: 100px; }
.log-table .message-cell { width: auto; word-break: break-word; }
.log-table .actions-cell { width: 220px; text-align: right; white-space: nowrap; }

/* --- General Styles --- */
.error-marker { background-color: #ef4444; }
.warn-marker { background-color: #f97316; }
.info-marker { background-color: #3b82f6; }
.debug-marker { background-color: #8b5cf6; }
.unknown-marker { background-color: #6b7280; }

.error-border { border-left: 4px solid #ef4444; }
.warn-border { border-left: 4px solid #f97316; }
.info-border { border-left: 4px solid #3b82f6; }
.debug-border { border-left: 4px solid #8b5cf6; }
.unknown-border { border-left: 4px solid #6b7280; }

@keyframes spin { to { transform: rotate(360deg); } }

.spinner {
    border: 2px solid rgba(255, 255, 255, 0.3);
    width: 1.25rem;
    height: 1.25rem;
    border-radius: 50%;
    border-left-color: #fff;
    animation: spin 1s ease infinite;
}

/* --- AI Response Styles (UPDATED) --- */
.ai-response h3 { font-size: 1.1rem; font-weight: 600; margin-top: 1rem; margin-bottom: 0.5rem; color: #111827; }
.ai-response p { margin-bottom: 0.5rem; color: #374151; }
.ai-response ul, .ai-response ol { 
    list-style-position: outside; 
    padding-left: 1.5rem; 
    margin-bottom: 1rem; 
}
.ai-response ul { 
    list-style-type: disc; 
}
.ai-response ol { 
    list-style-type: decimal;
}
.ai-response li { 
    margin-bottom: 0.5rem; 
    padding-left: 0.5rem; 
}
/* --- NEW: Add styles for nested lists --- */
.ai-response li > ul,
.ai-response li > ol {
    margin-top: 0.5rem;
    margin-bottom: 0.75rem;
}

.ai-response code { 
    font-family: monospace; 
    background-color: #e5e7eb; 
    padding: 0.1rem 0.3rem; 
    border-radius: 0.25rem; 
    font-size: 0.875rem; 
}
.ai-response pre code { 
    display: block; 
    padding: 0.5rem; 
    white-space: pre-wrap; 
}

