/* Primary color definition */
:root {
    --primary-color: #ec5b54;
    --primary-hover: #d94a43;
    --spacing-base: 1rem;
    --border-radius-standard: 8px;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    color: #333;
    background-color: #f8f9fa;
    padding: 0;
    margin: 0;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 var(--spacing-base);
}

.main-container {
    padding: calc(var(--spacing-base) * 1.5) var(--spacing-base);
}

/* Header styles */
header {
    background-color: #ec5b54;
    color: white;
    padding: calc(var(--spacing-base) * 0.8) 0;
    margin-bottom: calc(var(--spacing-base) * 1);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

header h1 {
    margin: 0;
    font-size: 2rem;
    font-weight: 600;
    color: white;
}

header .bi {
    margin-right: 0.5rem;
}

/* Card and table styles */
.card {
    border-radius: var(--border-radius-standard);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    margin-bottom: calc(var(--spacing-base) * 1.5);
    border: none;
}

.card-header {
    background-color: #f8f9fa;
    border-bottom: 1px solid rgba(0, 0, 0, 0.125);
    padding: var(--spacing-base);
    border-top-left-radius: var(--border-radius-standard);
    border-top-right-radius: var(--border-radius-standard);
}

.card-header h3 {
    font-weight: 600;
    font-size: 1.25rem;
    color: #2c3e50;
    margin: 0;
}

/* Row spacing */
.row {
    margin-bottom: calc(var(--spacing-base) * 2);
}

/* Tables */
.table {
    margin-bottom: 0;
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    font-size: 14px;
}

.table th {
    background-color: #f8f9fa;
    font-size: 15px;
    font-weight: 600;
    padding: calc(var(--spacing-base) * 0.6) var(--spacing-base);
    border-bottom: 2px solid #dee2e6;
    text-align: left;
}

.table td {
    padding: calc(var(--spacing-base) * 0.6) var(--spacing-base);
    border-top: 1px solid rgba(0, 0, 0, 0.05);
    vertical-align: middle;
}

/* Results table specific styles */
#resultsTable {
    table-layout: auto;
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 0;
}

#resultsTable th {
    position: sticky;
    top: 0;
    background-color: #f8f9fa;
    z-index: 1;
    box-shadow: 0 1px 0 rgba(0, 0, 0, 0.1);
}

#resultsTable th, 
#resultsTable td {
    padding: 0.5rem;
    vertical-align: middle;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* First column in table (icon column) */
#resultsTable th:first-child,
#resultsTable td:first-child {
    width: 32px;
    min-width: 32px;
    max-width: 32px;
    padding-right: 0;
    padding-left: 8px;
    border-right: none;
}

/* Default column sizing */
#resultsTable th, 
#resultsTable td {
    padding: 0.5rem;
    vertical-align: middle;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Process Time column */
#resultsTable .col-timestamp {
    width: 140px;
    white-space: nowrap;
    overflow: visible;
    text-overflow: initial;
}

/* Request Time column */
#resultsTable .col-proposal-time {
    width: 140px;
    white-space: nowrap;
    overflow: visible;
    text-overflow: initial;
}

/* Request Time column (direct time) */
#resultsTable .col-request-time {
    width: 140px;
    white-space: nowrap;
    overflow: visible;
    text-overflow: initial;
}

/* Expiration Time column */
#resultsTable .col-expiration-time {
    width: 140px;
    white-space: nowrap;
    overflow: visible;
    text-overflow: initial;
}

/* Block Time column */
#resultsTable .col-block-time {
    width: 140px;
    white-space: nowrap;
    overflow: visible;
    text-overflow: initial;
}

/* ID column */
#resultsTable .col-id {
    width: 110px;
    white-space: nowrap;
    overflow: visible;
    text-overflow: initial;
}

/* Title column */
#resultsTable .col-title {
    white-space: normal;
    word-wrap: break-word;
    min-width: 150px;
    max-width: 300px;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* AI Rec column */
#resultsTable .col-recommendation {
    width: 70px;
    text-align: center;
    white-space: nowrap;
    overflow: visible;
    text-overflow: initial;
}

/* Resolution column */
#resultsTable .col-resolution {
    width: 60px;
    text-align: center;
    white-space: nowrap;
    overflow: visible;
    text-overflow: initial;
}

/* Disputed column */
#resultsTable .col-disputed {
    width: 70px;
    text-align: center;
    white-space: nowrap;
    overflow: visible;
    text-overflow: initial;
}

/* Correct column */
#resultsTable .col-correct {
    width: 70px;
    text-align: center;
    white-space: nowrap;
    overflow: visible;
    text-overflow: initial;
}

/* Block number column */
#resultsTable .col-block-number {
    width: 70px;
    text-align: center;
    white-space: nowrap;
    overflow: visible;
    text-overflow: initial;
}

/* Proposal bond column */
#resultsTable .col-proposal-bond {
    width: 100px;
    text-align: right;
    white-space: nowrap;
    overflow: visible;
    text-overflow: initial;
}

/* Tags column */
#resultsTable .col-tags {
    min-width: 120px;
    white-space: normal;
    overflow: visible;
    text-overflow: initial;
}

/* Make code font in ID column more compact */
#resultsTable .col-id code {
    padding: 2px 3px;
    font-size: 0.85rem;
    white-space: nowrap;
}

/* Sortable header styles */
.sortable {
    cursor: pointer;
    position: relative;
    padding-right: 18px !important;
}

.sort-indicator {
    font-size: 0.9em;
    margin-left: 5px;
    display: inline-block;
}

/* Pagination styles */
.pagination-container {
    margin-top: 15px;
    margin-bottom: 20px;
}

.pagination {
    justify-content: center;
}

.pagination .page-link {
    padding: 6px 12px;
    color: var(--primary-color);
    border-color: #dee2e6;
}

.pagination .page-item.active .page-link {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
}

.pagination .page-item.disabled .page-link {
    color: #6c757d;
}

/* Full-width experiment row styling */
.experiment-row {
    transition: background-color 0.2s;
    cursor: pointer;
}

.experiment-row:hover {
    background-color: rgba(52, 152, 219, 0.1);
}

.experiment-row.table-active {
    background-color: rgba(52, 152, 219, 0.15);
}

/* Experiment time and title styling */
.experiment-date {
    color: #6c757d;
    font-size: 0.75rem;
    font-weight: 500;
    margin-right: 4px;
    padding-right: 4px;
    border-right: 1px solid #dee2e6;
    display: inline-block;
}

.experiment-title {
    font-weight: 600;
    font-size: 0.9rem;
    color: #2c3e50;
    display: block;
    margin-top: 3px;
}

.experiment-description {
    font-size: 0.9rem;
    color: #6c757d;
    margin-top: 5px;
    padding-left: 0;
    height: 0;
    overflow: hidden;
    transition: height 0.3s ease-in-out, margin-top 0.3s ease-in-out;
}

.experiment-description.expanded {
    height: auto;
    margin-top: 5px;
    padding-bottom: 3px;
}

.experiment-toggle {
    margin-left: 5px;
    color: var(--primary-color);
    font-size: 0.8rem;
    transition: transform 0.3s ease;
}

.experiment-toggle.expanded {
    transform: rotate(180deg);
}

/* Fix table padding */
.card-body.p-0 .table td,
.card-body.p-0 .table th {
    padding: calc(var(--spacing-base) * 0.6) var(--spacing-base);
}

/* Metadata styling */
#experimentMetadataCard {
    margin-bottom: calc(var(--spacing-base) * 1.5);
}

#experimentMetadataContent {
    line-height: 1.6;
    max-height: none;
    overflow: visible;
    padding: calc(var(--spacing-base) * 1.2);
}

#experimentMetadataContent h4 {
    margin-bottom: var(--spacing-base);
    color: #2c3e50;
    font-weight: 600;
}

#experimentMetadataContent ul {
    padding-left: 1.5rem;
}

#experimentMetadataContent p {
    margin-bottom: 0.5rem;
}

/* Toggle system prompt link */
#toggleSystemPrompt {
    display: inline-flex;
    align-items: center;
    color: var(--primary-color);
    text-decoration: none;
    padding: 5px 8px;
    border-radius: 4px;
    transition: background-color 0.2s;
}

#toggleSystemPrompt:hover {
    background-color: rgba(236, 91, 84, 0.1);
    text-decoration: none;
}

/* Code font for transaction hashes and IDs */
.code-font, code {
    font-family: 'Courier New', Courier, monospace;
    background-color: #f5f5f5;
    padding: 2px 4px;
    border-radius: 3px;
    font-size: 0.9rem;
}

/* Table hover effects */
.table tbody tr {
    cursor: pointer;
    transition: background-color 0.15s;
}

.table tbody tr:hover {
    background-color: rgba(0, 123, 255, 0.08);
}

.table tbody tr.table-active {
    background-color: rgba(0, 123, 255, 0.12);
}

/* Chart container styles */
.chart-container {
    position: relative;
    height: 250px;
    margin-bottom: calc(var(--spacing-base) * 1.5);
    padding: var(--spacing-base);
}

.chart-container h4 {
    margin-bottom: calc(var(--spacing-base) * 0.5);
    font-size: 1.1rem;
    font-weight: 600;
}

/* Analytics dashboard styles */
#analyticsDashboard {
    margin-top: calc(var(--spacing-base) * 2);
}

.dashboard-item {
    padding: var(--spacing-base);
}

.accuracy-circle {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: calc(var(--spacing-base) * 0.8);
    margin-right: calc(var(--spacing-base) * 1.5);
    float: left;
    background-color: transparent;
    position: relative;
}

.accuracy-value {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 1.6rem;
    font-weight: 600;
    color: #28a745;
    text-align: center;
    width: 100%;
}

.accuracy-circle svg {
    position: absolute;
    top: 0;
    left: 0;
}

.stats-info {
    overflow: hidden;
    padding-top: calc(var(--spacing-base) * 0.5);
}

.stats-info h4 {
    margin-bottom: calc(var(--spacing-base) * 0.5);
    font-size: 1.2rem;
    font-weight: 600;
}

.stats-info p {
    margin-bottom: 0.2rem;
    font-size: 0.95rem;
}

/* Progress bars */
.progress {
    height: 10px;
    margin-top: 5px;
    margin-bottom: calc(var(--spacing-base) * 0.8);
    background-color: #f0f0f0;
    border-radius: 5px;
}

.progress-bar {
    background-color: var(--primary-color);
    transition: width 1s ease;
}

/* Filter controls spacing */
#filterControls {
    padding: var(--spacing-base) 0;
}

.input-group {
    max-width: 300px;
}

/* Button styling */
.btn {
    font-weight: 500;
    padding: 0.375rem 0.75rem;
    border-radius: 4px;
}

.btn-group .btn {
    border-radius: 0;
}

.btn-group .btn:first-child {
    border-top-left-radius: 4px;
    border-bottom-left-radius: 4px;
}

.btn-group .btn:last-child {
    border-top-right-radius: 4px;
    border-bottom-right-radius: 4px;
}

/* Update button colors */
.btn-outline-primary {
    color: var(--primary-color);
    border-color: var(--primary-color);
}

.btn-outline-primary:hover, 
.btn-outline-primary:active, 
.btn-outline-primary.active {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
}

.btn-primary {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

.btn-primary:hover {
    background-color: var(--primary-hover);
    border-color: var(--primary-hover);
}

/* Detail modal styling */
.detail-section {
    margin-bottom: calc(var(--spacing-base) * 1.5);
}

.section-title {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: calc(var(--spacing-base) * 0.8);
    color: #2c3e50;
}

.meta-table th {
    width: 25%;
    background-color: #f8f9fa;
    font-weight: 600;
    vertical-align: top;
}

.meta-table td {
    width: 75%;
    vertical-align: top;
}

.modal-body pre {
    white-space: pre-wrap;
    font-size: 0.9rem;
    background-color: #f8f9fa;
    padding: var(--spacing-base);
    border-radius: 5px;
    margin-bottom: 0;
}

.prompt-text,
.response-text,
.ancillary-data {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    max-height: 400px;
    overflow-y: auto;
}

.tx-link {
    text-decoration: none;
    color: var(--primary-color);
}

.tx-link:hover {
    text-decoration: underline;
}

/* Modal customization */
.modal-content {
    border-radius: var(--border-radius-standard);
    border: none;
}

.modal-header {
    border-bottom: 1px solid #e5e5e5;
    background-color: #f8f9fa;
    border-top-left-radius: var(--border-radius-standard);
    border-top-right-radius: var(--border-radius-standard);
    padding: calc(var(--spacing-base) * 0.8) var(--spacing-base);
}

.modal-body {
    padding: calc(var(--spacing-base) * 1.5);
    max-height: calc(100vh - 200px);
    overflow-y: auto;
}

.modal-footer {
    border-top: 1px solid #e5e5e5;
    padding: calc(var(--spacing-base) * 0.8) var(--spacing-base);
}

.modal-title {
    font-weight: 600;
    color: #2c3e50;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .accuracy-circle {
        width: 80px;
        height: 80px;
        font-size: 1.2rem;
    }
    
    .main-container {
        padding: var(--spacing-base);
    }
    
    .row {
        margin-bottom: var(--spacing-base);
    }
    
    .card-header h3 {
        font-size: 1.1rem;
    }
}

/* Add these custom styles for the system prompt overlay */
.system-prompt-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.85);
    z-index: 1050;
    overflow-y: auto;
    padding: 20px;
    display: none;
}

.overlay-close-btn {
    position: fixed;
    top: 20px;
    right: 30px;
    font-size: 30px;
    color: white;
    background: transparent;
    border: none;
    cursor: pointer;
    z-index: 1060;
}

.overlay-close-btn:hover {
    color: #ec5b54;
}

.overlay-content {
    background-color: white;
    margin: 50px auto;
    padding: 30px;
    width: 80%;
    max-width: 1000px;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
    position: relative;
}

.overlay-content h3 {
    margin-bottom: 20px;
    color: #2c3e50;
    font-weight: 600;
}

.system-prompt-pre {
    white-space: pre-wrap;
    font-size: 15px;
    line-height: 1.6;
    background-color: #f8f9fa;
    padding: 20px;
    border-radius: 5px;
    margin-top: 20px;
    overflow-x: auto;
    max-height: calc(100vh - 250px);
    overflow-y: auto;
}

/* Results directory table */
#resultsDirectoryTable {
    table-layout: fixed;
}

#resultsDirectoryTable td {
    white-space: normal;
    word-wrap: break-word;
    border-radius: 0;
    padding: 12px 15px;
}

/* Additional spacing for page elements */
.main-container {
    padding-top: 30px;
    padding-bottom: 40px;
}

/* Fix for recommendation colors */
td.recommendation {
    font-weight: normal !important;
}

/* Card body padding */
.card-body {
    padding: 1.25rem;
}

.card-body.p-0 {
    padding: 0 !important;
}

/* Modal enhancements */
.modal-content {
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

.detail-section:last-child {
    margin-bottom: 0;
}

/* Alert styling */
.alert {
    padding: 15px 20px;
    border-radius: 8px;
    border: none;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

/* Count display styling */
#resultsTableCard .card-header p {
    margin-top: 8px;
    font-size: 0.9rem;
    color: #6c757d;
}

/* Filter buttons styling */
.btn-group .btn {
    font-weight: 500;
}

/* Analytics note styling */
#analyticsNote {
    display: none !important;
}

/* Filter and search controls layout */
#filterControls {
    margin-bottom: 1.5rem;
}

/* Results section styling */
.results-section {
    margin-top: 2rem;
    margin-bottom: 3rem;
}

.main-heading {
    font-size: 2rem;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 1.5rem;
    text-align: center;
}

/* Disputed status styles */
td .text-warning {
    color: #ffc107 !important;
}

.bi-exclamation-triangle-fill {
    color: #ffc107;
}

/* Filter button styling */
#filterDisputed.active, 
#filterDisputed:hover {
    background-color: #ffc107;
    border-color: #ffc107;
    color: #212529;
}

#filterDisputed {
    color: #ffc107;
    border-color: #ffc107;
}

/* Remove the dash icon for non-disputed items */
.bi-dash {
    display: none;
}

/* Add styles for copy-to-clipboard functionality */
.copy-to-clipboard {
    cursor: pointer;
    transition: background-color 0.2s ease;
    position: relative;
}

.copy-to-clipboard:hover {
    background-color: #e9ecef;
}

.copy-to-clipboard.copied {
    background-color: #d4edda;
}

.copy-feedback {
    margin-left: 8px;
    font-size: 0.8rem;
    color: #28a745;
    font-style: italic;
}

/* Add styles for the tag filter */
#tagFilter {
    min-height: 38px;
    max-width: 100%;
}

/* Badge styling for tags */
.badge.bg-info {
    background-color: #17a2b8 !important;
    color: white;
    font-weight: 500;
    padding: 5px 8px;
    border-radius: 4px;
    font-size: 0.85rem;
}

/* Select2 styling if you decide to use it */
.select2-container--default .select2-selection--multiple {
    border: 1px solid #ced4da;
    border-radius: 0.25rem;
}

.select2-container--default .select2-selection--multiple .select2-selection__choice {
    background-color: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 0.25rem;
    padding: 2px 8px;
    margin-right: 5px;
}

/* Tag filter styling improvements */
.tag-filter-container {
    flex-grow: 1;
    max-width: 300px;
}

.tag-select {
    min-height: 31px;
    min-width: 180px;
    font-size: 0.875rem;
}

/* Selected tag badges in modal */
.tag-badge {
    display: inline-block;
    padding: 0.35em 0.65em;
    font-size: 0.75em;
    font-weight: 600;
    line-height: 1;
    text-align: center;
    white-space: nowrap;
    vertical-align: baseline;
    border-radius: 0.25rem;
    background-color: #17a2b8;
    color: white;
    margin-right: 0.5rem;
    margin-bottom: 0.5rem;
}

/* Improve tag display in modal */
.tags-container {
    margin-bottom: 1rem;
    padding: 0.75rem;
    background-color: #f8f9fa;
    border-radius: 0.375rem;
    border: 1px solid rgba(0,0,0,0.05);
}

/* Make the clear button more subtle */
#clearTagFilter {
    color: #6c757d;
    opacity: 0.7;
}

#clearTagFilter:hover {
    opacity: 1;
}

/* Improve multi-select appearance */
select[multiple] {
    padding-right: 0.75rem;
}

/* Bootstrap 5 style for tag select */
.form-select-sm {
    padding-top: 0.25rem;
    padding-bottom: 0.25rem;
    padding-left: 0.5rem;
}

/* Add styles for the tag grid in 3 columns */
.tag-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.5rem;
}

.tag-checkbox-container {
    display: flex;
    flex-wrap: wrap;
}

.tag-checkbox-item {
    display: flex;
    align-items: center;
    padding: 0.25rem 0.5rem;
}

.tag-checkbox-item label {
    margin-bottom: 0;
    margin-left: 0.5rem;
    font-size: 0.9rem;
    cursor: pointer;
}

/* Tag badge styling for various places */
.tag-badge {
    display: inline-block;
    padding: 0.35em 0.65em;
    font-size: 0.75em;
    font-weight: 600;
    line-height: 1;
    text-align: center;
    white-space: nowrap;
    vertical-align: baseline;
    border-radius: 0.25rem;
    background-color: #17a2b8;
    color: white;
    margin-right: 0.5rem;
    margin-bottom: 0.25rem;
}

/* Tag accuracy table styles */
#tagAccuracyTable {
    font-size: 0.85rem;
    margin-bottom: 0;
}

#tagAccuracyTable th {
    font-weight: 600;
    background-color: #f8f9fa;
    padding: 0.4rem 0.5rem;
}

#tagAccuracyTable td {
    padding: 0.4rem 0.5rem;
    vertical-align: middle;
}

/* Make tag badges in table smaller */
#tagAccuracyTable .tag-badge {
    padding: 0.25em 0.5em;
    font-size: 0.75em;
    margin-right: 0;
}

/* Analytics tabs styling */
.card-header-tabs {
    margin-right: 0;
    margin-bottom: -1px;
    border-bottom: 0;
}

.nav-tabs .nav-link {
    color: #6c757d;
    font-size: 0.9rem;
    padding: 0.5rem 1rem;
    margin-bottom: 0;
}

.nav-tabs .nav-link.active {
    color: #2c3e50;
    font-weight: 500;
    background-color: #fff;
    border-bottom-color: #fff;
}

/* Analytics card header with tabs */
#analyticsDashboard .card-header {
    padding-bottom: 0;
    border-bottom: none;
}

#analyticsDashboard .card-header h3 {
    margin-bottom: 0.5rem;
}

.accuracy-cell {
    font-weight: 600;
}

.high-accuracy {
    color: #28a745;
}

.medium-accuracy {
    color: #ffc107;
}

.low-accuracy {
    color: #dc3545;
}

/* Improvements for tag filter card */
#tagFilterCard {
    border-color: #dee2e6;
    border-radius: var(--border-radius-standard);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

#tagFilterCard .card-header {
    background-color: #f8f9fa;
    padding: 0.75rem 1rem;
}

#tagFilterCard .card-body {
    padding: 1rem;
    max-height: 300px;
    overflow-y: auto;
}

/* Overseer Data Styles */
.journey-steps {
    margin: 10px 0;
    padding: 0;
}

.journey-step {
    display: flex;
    align-items: flex-start;
    margin-bottom: 15px;
    padding-bottom: 15px;
    border-bottom: 1px dashed #dee2e6;
}

.journey-step:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.step-number {
    font-weight: 600;
    min-width: 30px;
    height: 30px;
    background-color: #4e73df;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 10px;
}

.journey-step-card.router-step .step-number {
    background-color: #4e73df; /* Blue */
}

.journey-step-card.perplexity-step .step-number {
    background-color: #36b9cc; /* Cyan */
}

.journey-step-card.code_runner-step .step-number {
    background-color: #1cc88a; /* Green */
}

.journey-step-card.overseer-step .step-number {
    background-color: #f6c23e; /* Yellow */
}

.step-details {
    flex: 1;
    line-height: 1.5;
}

.citation-list {
    margin: 0;
    padding: 0 0 0 20px;
}

.citation-list li {
    margin-bottom: 5px;
    word-break: break-all;
}

.citation-list li:last-child {
    margin-bottom: 0;
}

.accordion-button code {
    margin: 0 5px;
    padding: 2px 5px;
    background-color: #f8f9fa;
    border-radius: 3px;
}

.accordion-button {
    padding: 0.75rem 1.25rem;
}

.accordion-body {
    padding: 1rem;
}

.accordion-item {
    margin-bottom: 10px;
    border-radius: 4px;
    overflow: hidden;
}

.overseer-section .card-header {
    font-weight: 500;
}

.recommendation-journey {
    background-color: #f8f9fa;
    padding: 15px;
    border-radius: 4px;
}

/* Add styles for the main navigation tabs */
.main-tabs {
    margin-top: 15px;
    margin-bottom: -1px;
}

.main-tabs .nav-link {
    padding: 12px 20px;
    border: 1px solid transparent;
    border-top-left-radius: 6px;
    border-top-right-radius: 6px;
    font-weight: 500;
    color: #2c3e50;
    transition: all 0.2s ease;
}

.main-tabs .nav-link:hover {
    color: white;
    border-color: #e9ecef #e9ecef #dee2e6;
}

.main-tabs .nav-link.active {
    color: white;
    background-color: rgba(255, 255, 255, 0.1);
    border-color: #dee2e6 #dee2e6 #fff;
}

.main-tabs .nav-link i {
    margin-right: 8px;
}

/* Experiment Runner Styles */
.experiment-runner-container {
    margin-top: 0.5rem;
}

/* Command form styling - complete rebuild */
.command-card-body {
    padding: 8px;
}

#experimentForm {
    width: 100%;
    margin: 0;
}

.command-container {
    display: grid;
    grid-template-columns: auto 1fr auto;
    width: 100%;
    border: 1px solid #ced4da;
    border-radius: 4px;
    overflow: hidden;
}

.command-icon {
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding: 15px;
    background-color: #f8f9fa;
    border-right: 1px solid #ced4da;
    color: #495057;
}

.command-input {
    border: none;
    padding: 10px 15px;
    font-family: 'Courier New', monospace;
    font-size: 1rem;
    outline: none;
    width: 100%;
    resize: none;
    height: auto;
    overflow-y: hidden;
    min-height: 38px;
    line-height: 1.5;
}

.run-btn {
    margin: 0;
    border-radius: 0;
    align-self: stretch;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Command history table */
#commandHistoryTable th:nth-child(1), 
#commandHistoryTable td:nth-child(1) { /* Timestamp */
    width: 180px;
}

#commandHistoryTable th:nth-child(2), 
#commandHistoryTable td:nth-child(2) { /* Command */
    width: auto;
    min-width: 450px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-family: 'Courier New', Courier, monospace;
}

#commandHistoryTable th:nth-child(3), 
#commandHistoryTable td:nth-child(3) { /* Status */
    width: 120px;
}

#commandHistoryTable th:nth-child(4), 
#commandHistoryTable td:nth-child(4) { /* Actions */
    width: 150px;
}

/* Fix for table header consistency */
#processesTable th,
#commandHistoryTable th {
    background-color: #f8f9fa;
    font-size: 15px;
    font-weight: 600;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    padding: calc(var(--spacing-base) * 0.6) var(--spacing-base);
    border-bottom: 2px solid #dee2e6;
    text-align: left;
    white-space: nowrap;
}

/* Improve button styling in the history table */
#commandHistoryTable .btn-group {
    flex-wrap: nowrap;
    width: 100%;
}

.history-actions {
    display: flex;
    justify-content: flex-start;
    flex-wrap: nowrap;
    gap: 4px;
}

#commandHistoryTable .btn {
    white-space: nowrap;
    padding: 0.25rem 0.5rem;
    font-size: 0.75rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

#commandHistoryTable .btn i {
    margin-right: 0.2rem;
    font-size: 0.85rem;
}

#commandHistoryTable td:nth-child(4) {
    min-width: 150px;
    padding: 5px 10px;
    white-space: nowrap;
}

/* Ensure the command action buttons don't wrap */
.history-row .btn-group {
    display: flex;
    flex-wrap: nowrap;
}

/* Add a pointer cursor to history items */
.history-command {
    cursor: pointer;
}

/* Process logs styling */
.process-logs {
    height: 600px;
    overflow-y: auto;
    background-color: #1e1e1e;
    color: #f8f8f8;
    font-family: 'Courier New', Courier, monospace;
    padding: 6px 10px;
    line-height: 1.2;
    white-space: pre-wrap;
    font-size: 13px;
}

.log-entry {
    margin-bottom: 0;
    padding: 0;
    display: block;
}

.log-timestamp {
    color: #666;
    margin-right: 6px;
    font-size: 0.9em;
    opacity: 0.7;
}

.log-message {
    display: inline;
}

/* Terminal color overrides */
.process-logs .log-entry.log-info {
    color: #6a9fff;
}

.process-logs .log-entry.log-error {
    color: #ff6a6a;
}

.process-logs .log-entry.log-warning {
    color: #ffcc6a;
}

.process-logs .log-entry.log-input {
    color: #007bff;
    font-weight: bold;
    background-color: rgba(0, 123, 255, 0.05);
    border-radius: 2px;
}

.process-logs .log-entry.log-input .log-message {
    font-style: italic;
}

/* Non-terminal log entry colors */
.log-entry.log-info:not(.process-logs .log-entry) {
    color: #333;
}

.log-entry.log-error:not(.process-logs .log-entry) {
    color: #dc3545;
}

.log-entry.log-warning:not(.process-logs .log-entry) {
    color: #f7b924;
}

/* Process status styles */
.status-running {
    color: #28a745;
}

.status-completed {
    color: #17a2b8;
}

.status-failed {
    color: #dc3545;
}

.status-pending {
    color: #ffc107;
}

/* Action buttons in process table */
.process-action-btn {
    padding: 2px 8px;
    font-size: 12px;
    margin-right: 5px;
}

/* Styles for hiding timestamps */
.hide-timestamps .log-timestamp {
    display: none;
}

/* Form switch (timestamp toggle) styling */
.form-check-input:checked {
    background-color: #28a745;
    border-color: #28a745;
}

/* Process table column widths */
#processesTable th:nth-child(1), 
#processesTable td:nth-child(1) { /* Started */
    width: 180px;
}

#processesTable th:nth-child(2), 
#processesTable td:nth-child(2) { /* Command */
    width: auto;
    min-width: 450px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-family: 'Courier New', Courier, monospace;
}

#processesTable th:nth-child(3), 
#processesTable td:nth-child(3) { /* Status */
    width: 120px;
}

#processesTable th:nth-child(4), 
#processesTable td:nth-child(4) { /* Actions */
    width: 150px;
}

.command-cell {
    max-width: 500px;
    overflow: hidden;
    text-overflow: ellipsis;
}

.command-cell code {
    white-space: nowrap;
    background-color: transparent;
    padding: 2px 4px;
    font-size: 0.9em;
    word-break: keep-all;
}

/* Reduce padding in card bodies */
.experiment-runner-container .card-body {
    padding: 0.75rem;
}

/* Ensure form takes full width */
.experiment-runner-container form {
    width: 100%;
}

/* Logout button styles */
.logout-btn {
    color: white;
    background-color: rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.3);
    padding: 5px 12px;
    border-radius: 4px;
    font-size: 0.875rem;
    transition: all 0.2s ease;
}

.logout-btn:hover {
    background-color: rgba(0, 0, 0, 0.3);
    color: white;
    border-color: rgba(255, 255, 255, 0.5);
}

.logout-btn i {
    margin-right: 5px;
}

/* Source filter styles */
.source-filter-group {
    width: 100%;
    display: flex;
    margin-bottom: 10px;
}

.source-filter-btn {
    flex: 1;
    white-space: nowrap;
    font-size: 0.85rem;
    padding: 4px 8px;
}

.source-filter-btn.active {
    background-color: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

/* Additional styles for metadata formatting */
.small-object {
    background-color: #f8f9fa;
    padding: 8px 10px;
    border-radius: 4px;
    font-size: 0.9rem;
}

.small-object div {
    margin-bottom: 4px;
}

.small-object div:last-child {
    margin-bottom: 0;
}

.object-data {
    background-color: #f8f9fa;
    padding: 10px;
    border-radius: 4px;
    font-size: 0.85rem;
    max-height: 200px;
    overflow-y: auto;
    white-space: pre-wrap;
}

.metadata-section ul {
    margin-bottom: 0;
}

.metadata-section ul li {
    margin-bottom: 4px;
}

.metadata-section ul li:last-child {
    margin-bottom: 0;
}

/* Improve table styling for setup/modifications */
.metadata-section .card {
    border: 1px solid #dee2e6;
    border-radius: 4px;
    box-shadow: none;
    margin-bottom: 0;
}

.metadata-section .table-sm th,
.metadata-section .table-sm td {
    padding: 6px 10px;
    font-size: 0.9rem;
    border-top: none;
}

.metadata-section .table-sm tr:first-child th,
.metadata-section .table-sm tr:first-child td {
    border-top: none;
}

.metadata-section .table-sm tr:not(:first-child) th,
.metadata-section .table-sm tr:not(:first-child) td {
    border-top: 1px solid #dee2e6;
}

.metadata-section .table-sm th {
    background-color: #f8f9fa;
    font-weight: 600;
}

/* Interactive Process Input */
.interactive-input-container {
    background-color: #f8f9fa;
    border-top: 1px solid #dee2e6;
}

#interactiveInputForm {
    display: flex;
    align-items: center;
}

#interactiveInput {
    flex: 1;
    border: 1px solid #ced4da;
    padding: 8px 12px;
    border-radius: 4px;
    font-family: 'Courier New', Courier, monospace;
}

/* Highlight the input form when waiting for input */
.waiting-for-input #interactiveInputContainer {
    background-color: #fff3cd;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { background-color: #fff3cd; }
    50% { background-color: #ffeeba; }
    100% { background-color: #fff3cd; }
}

/* Log entry types */
.log-entry.log-info {
    color: #333;
}

.log-entry.log-error {
    color: #dc3545;
}

.log-entry.log-warning {
    color: #f7b924;
}

.log-entry.log-input {
    color: #007bff;
    font-weight: bold;
    background-color: rgba(0, 123, 255, 0.05);
    border-radius: 2px;
}

.log-entry.log-input .log-message {
    font-style: italic;
}

/* Make code font in ID column more compact */
#resultsTable td:nth-child(4) code {
    padding: 2px 3px;
    font-size: 0.85rem;
    white-space: nowrap;
}

/* Hex data display */
.hex-data {
    font-family: 'Courier New', Courier, monospace;
    font-size: 0.85rem;
    line-height: 1.4;
    background-color: #f8f9fa;
    padding: 10px;
    border-radius: 4px;
    border: 1px solid #e9ecef;
    color: #495057;
}

/* Column selector styles */
.column-options {
    max-height: 300px;
    overflow-y: auto;
    margin-bottom: 10px;
}

.column-options .form-check {
    margin-bottom: 6px;
}

/* Address truncation */
.address-truncate {
    display: inline-block;
    max-width: 120px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Make sure the dropdown doesn't get cut off */
.dropdown-menu {
    z-index: 1050;
}

/* Icon styling */
.table-icon {
    width: 24px;
    height: 24px;
    object-fit: cover;
    border-radius: 50%;
    display: block;
    margin: 0 auto;
}

.icon-cell {
    width: 32px;
    min-width: 32px;
    max-width: 32px;
    text-align: center;
    vertical-align: middle;
    padding-right: 0 !important;
    padding-left: 8px !important;
}

.icon-column {
    width: 32px;
    min-width: 32px;
    max-width: 32px;
    padding: 0.5rem 0.25rem 0.5rem 8px !important;
}

.modal-icon {
    width: 32px;
    height: 32px;
    margin-right: 10px;
    vertical-align: middle;
    border-radius: 50%;
    object-fit: cover;
}

/* When many columns are enabled, allow horizontal scrolling */
.table-responsive {
    overflow-x: auto;
    min-width: 100%;
    -webkit-overflow-scrolling: touch;
}

/* Ensure the table grows horizontally when needed */
@media (max-width: 1600px) {
    #resultsTable {
        min-width: max-content;
    }
}

/* Market price info styles */
.market-info-text {
    background-color: #f8f9fa;
    padding: 0.75rem;
    border-radius: 4px;
    border-left: 4px solid #0d6efd;
    font-size: 0.9rem;
    white-space: pre-wrap;
    word-break: normal;
}

/* Multi-operator specific styling */
.multi-operator-section {
    margin-bottom: 1.5rem;
}

.solver-card {
    margin-bottom: 1rem;
    border: 1px solid #dee2e6;
    border-radius: 5px;
    overflow: hidden;
}

.solver-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 1rem;
    background-color: #f8f9fa;
    border-bottom: 1px solid #dee2e6;
}

.solver-name {
    font-weight: 600;
    color: #2c3e50;
}

.solver-attempt {
    font-size: 0.85rem;
    color: #6c757d;
}

.solver-body {
    padding: 1rem;
}

.code-section {
    margin-top: 1rem;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    overflow: hidden;
}

.code-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 1rem;
    background-color: #f5f5f5;
    border-bottom: 1px solid #e0e0e0;
    font-weight: 600;
}

.code-content {
    max-height: 400px;
    overflow: auto;
    transition: max-height 0.3s ease-out, opacity 0.3s ease-out;
    opacity: 1;
}

.code-content.collapsed {
    max-height: 0;
    opacity: 0;
    overflow: hidden;
}

.code-content pre {
    margin: 0;
    padding: 1rem;
}

.copy-btn {
    background-color: transparent;
    border: 1px solid #ddd;
    border-radius: 3px;
    padding: 2px 8px;
    font-size: 0.8rem;
    cursor: pointer;
}

.copy-btn:hover {
    background-color: #eee;
}

/* Router and Overseer response styling */
.router-response, .overseer-response {
    white-space: pre-wrap;
    font-size: 0.85rem;
    font-family: monospace;
    background-color: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 4px;
    padding: 1rem;
    max-height: 350px;
    overflow-y: auto;
}

.router-response code, .overseer-response code {
    background-color: #e9ecef;
    padding: 0.2rem 0.4rem;
    border-radius: 3px;
}

/* Execution status styling */
.execution-successful {
    color: #0f5132;
    font-weight: 500;
}

.execution-failed {
    color: #842029;
    font-weight: 500;
}

/* JSON and Hex data styling */
.json-data, .hex-data {
    white-space: pre-wrap;
    word-break: break-all;
    max-height: 400px;
    overflow-y: auto;
    background-color: #f8f9fa;
    border-radius: 4px;
    padding: 1rem;
    font-family: monospace;
    font-size: 0.9rem;
}

.hex-data {
    max-height: 200px;
}

/* Additional styling */
.journey-item {
    border: 1px solid #ddd;
    border-radius: 4px;
    margin-bottom: 1rem;
}

.journey-header {
    display: flex;
    justify-content: space-between;
    padding: 0.75rem;
    background-color: #f8f9fa;
    border-bottom: 1px solid #ddd;
    font-weight: 600;
}

.journey-body {
    padding: 0.75rem;
}

/* Overriding existing styles to improve layout */
.detail-section {
    margin-bottom: 2rem;
}

.section-title {
    margin-bottom: 1rem;
    font-size: 1.25rem;
    font-weight: 600;
}

.solver-card {
    margin-bottom: 1.5rem;
}

/* Tooltip for copied text */
.copy-to-clipboard {
    cursor: pointer;
    position: relative;
}

.copy-to-clipboard.copied {
    background-color: #d1e7dd;
    transition: background-color 0.3s;
}

.copy-feedback {
    position: absolute;
    background-color: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 3px 8px;
    border-radius: 3px;
    font-size: 0.8rem;
    top: -25px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1000;
}

/* Token cards styling */
.token-cards {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-top: 0.5rem;
}

.token-card {
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 0;
    width: 100%;
    max-width: 350px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    overflow: hidden;
}

.token-header {
    padding: 0.75rem 1rem;
    background-color: #f8f9fa;
    border-bottom: 1px solid #e0e0e0;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.token-header strong {
    font-size: 1.1rem;
}

.token-address {
    font-size: 0.85rem;
    background-color: rgba(0, 0, 0, 0.05);
    padding: 2px 6px;
    border-radius: 4px;
    cursor: pointer;
}

.token-body {
    padding: 0.75rem 1rem;
}

.token-body div {
    margin-bottom: 0.5rem;
}

.token-body div:last-child {
    margin-bottom: 0;
}

/* Additional styles for proposal metadata */
.meta-table th {
    width: 200px;
    background-color: #f8f9fa;
}

.toggle-metadata-btn {
    font-size: 0.85rem;
    padding: 0.25rem 0.5rem;
}

/* For transaction links */
.tx-link {
    color: #0d6efd;
    text-decoration: none;
}

.tx-link:hover {
    text-decoration: underline;
}

.source-badge {
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
}

.all-solvers-badge {
    background-color: #f8d7da;
    color: #842029;
}

.primary-solver-badge {
    background-color: #d1e7dd;
    color: #0f5132;
}

.recommendation-journey table {
    font-size: 0.9rem;
}

.recommendation-journey th {
    background-color: #f8f9fa;
    font-weight: 600;
}

/* Satisfaction level styling */
.satisfaction-satisfied {
    color: #0f5132;
    font-weight: 500;
    padding: 2px 5px;
    background-color: #d1e7dd;
    border-radius: 3px;
}

.satisfaction-not-satisfied {
    color: #842029;
    font-weight: 500;
    padding: 2px 5px;
    background-color: #f8d7da;
    border-radius: 3px;
}

.satisfaction-retry {
    color: #664d03;
    font-weight: 500;
    padding: 2px 5px;
    background-color: #fff3cd;
    border-radius: 3px;
}

.satisfaction-default {
    color: #0c5460;
    font-weight: 500;
    padding: 2px 5px;
    background-color: #d1ecf1;
    border-radius: 3px;
}

/* Market info styling */
.overseer-data .market-price-info {
    background-color: #f8f9fa;
    padding: 0.75rem;
    border-radius: 4px;
    border-left: 4px solid #0d6efd;
    font-size: 0.9rem;
    margin-top: 0.5rem;
}

/* Add styles for collapsible content in modals */
.content-collapsible {
    transition: max-height 0.3s ease-out, opacity 0.3s ease-out, margin 0.3s ease-out, padding 0.3s ease-out;
    overflow: hidden;
    max-height: 1000px;
    opacity: 1;
    margin-top: 0.5rem;
}

.content-collapsible.collapsed {
    max-height: 0;
    opacity: 0;
    padding: 0 !important;
    margin: 0 !important;
    border: none !important;
}

.toggle-content-btn {
    font-size: 0.8rem;
    padding: 2px 8px;
}

/* Styles for pre elements in modal */
.router-prompt-text, 
.router-prompt-data, 
.router-response, 
.overseer-prompt, 
.overseer-response,
.system-prompt {
    max-height: 500px;
    overflow-y: auto;
    background-color: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 4px;
    white-space: pre-wrap;
    font-size: 13px;
    line-height: 1.4;
}

/* Styles for critique cells in recommendation journey */
.critique-cell {
    position: relative;
    max-width: 400px;
}

.critique-preview {
    white-space: normal;
    word-wrap: break-word;
    font-size: 0.9rem;
    line-height: 1.4;
}

.critique-preview.hidden {
    display: none;
}

.critique-full {
    white-space: normal;
    word-wrap: break-word;
    font-size: 0.9rem;
    line-height: 1.4;
    background-color: #f8f9fa;
    padding: 8px;
    border-radius: 4px;
    margin-top: 5px;
    margin-bottom: 5px;
}

.toggle-critique-btn {
    padding: 0;
    font-size: 0.8rem;
    text-decoration: none;
}

.recommendation-journey table {
    table-layout: fixed;
    width: 100%;
}

.recommendation-journey th {
    background-color: #f8f9fa;
    font-weight: 600;
}

.recommendation-journey td {
    vertical-align: top;
    word-wrap: break-word;
}

/* Journey Timeline Styling for format_version 2 */
.journey-timeline {
    position: relative;
    margin: 20px 0;
    padding: 0;
}

.journey-step-card {
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    margin-bottom: 20px;
    position: relative;
    border-left: 5px solid #6c757d;
    overflow: hidden;
    transition: box-shadow 0.3s ease;
}

.journey-step-card:hover {
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}

/* Actor-specific colors */
.journey-step-card.router-step {
    border-left-color: #4e73df; /* Blue */
}

.journey-step-card.perplexity-step {
    border-left-color: #36b9cc; /* Cyan */
}

.journey-step-card.code_runner-step {
    border-left-color: #1cc88a; /* Green */
}

.journey-step-card.overseer-step {
    border-left-color: #f6c23e; /* Yellow */
}

.journey-step-header {
    padding: 1rem;
    background-color: #f8f9fa;
    border-bottom: 1px solid #dee2e6;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    user-select: none;
    position: relative;
}

.journey-step-header:hover {
    background-color: #e9ecef;
}

.journey-step-header::after {
    content: "\25BC"; /* Down arrow */
    font-size: 0.8rem;
    color: #6c757d;
    margin-left: 0.5rem;
    transition: transform 0.3s ease;
}

.journey-step-header.collapsed::after {
    transform: rotate(-90deg);
}

.step-info {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.step-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background-color: #007bff;
    color: white;
    font-weight: bold;
    font-size: 0.875rem;
}

.step-actor {
    font-weight: 600;
    color: #343a40;
}

.step-action {
    font-weight: normal;
    color: #6c757d;
}

.step-phase, .step-attempt {
    padding: 0.25rem 0.5rem;
    border-radius: 0.25rem;
    background-color: #e9ecef;
    font-size: 0.75rem;
    color: #495057;
}

.journey-step-body {
    padding: 1rem;
    transition: max-height 0.3s ease-out, opacity 0.3s ease-out, padding 0.3s ease-out;
    overflow: hidden;
    max-height: 3000px; /* Large enough for most content */
    opacity: 1;
}

.journey-step-body.collapsed {
    max-height: 0;
    padding: 0;
    opacity: 0;
    border-top: none;
}

/* Verdict styling */
.verdict-satisfied {
    color: #1cc88a;
    font-weight: 600;
}

.verdict-retry {
    color: #f6c23e;
    font-weight: 600;
}

.verdict-default_to_p4 {
    color: #e74a3b;
    font-weight: 600;
}

/* Response sections */
.router-prompt, 
.solver-prompt, 
.overseer-prompt,
.router-response, 
.solver-response, 
.overseer-response, 
.step-metadata {
    background-color: #f8f9fa;
    border-radius: 4px;
    padding: 10px;
    margin: 10px 0;
    max-height: 400px;
    overflow-y: auto;
    font-size: 0.9rem;
    white-space: pre-wrap;
    word-break: break-all;
}

/* Toggle buttons */
.toggle-content-btn {
    font-size: 0.8rem;
    padding: 4px 8px;
}

/* Router decision styling */
.router-decision {
    margin-bottom: 10px;
}

/* Result styling */
.result-info {
    padding: 10px;
}

/* Market info styling */
.market-info {
    padding: 10px;
}

.market-icon {
    max-width: 30px;
    max-height: 30px;
    margin-left: 10px;
    vertical-align: middle;
}

/* Code output blocks styling */
.code-output-block, 
.code-block {
    padding: 10px;
    background-color: #282c34;
    color: #abb2bf;
    border-radius: 5px;
    overflow-x: auto;
    margin: 5px 0;
    max-height: 400px;
    white-space: pre;
    font-family: 'Courier New', monospace;
    font-size: 0.85rem;
    display: block;
    transition: max-height 0.3s ease-out, opacity 0.3s ease-out, margin 0.3s ease-out;
}

.code-block.collapsed {
    display: none;
}

.json-property-key {
    color: #6610f2;
    cursor: pointer;
    padding: 2px 4px;
    border-radius: 4px;
    transition: background-color 0.2s ease;
    position: relative;
}

.json-property-key::before {
    content: "▼";
    display: inline-block;
    margin-right: 5px;
    font-size: 0.7rem;
    transition: transform 0.2s;
}

.json-property-key.collapsed::before {
    transform: rotate(-90deg);
}

.json-property-key:hover {
    background-color: rgba(13, 110, 253, 0.1);
}

/* Styles for code syntax highlighting using Prism */
.language-python .token.comment,
.language-python .token.prolog,
.language-python .token.doctype,
.language-python .token.cdata {
    color: #5c6370;
    font-style: italic;
}

.language-python .token.function {
    color: #61afef;
}

.language-python .token.keyword {
    color: #c678dd;
}

.language-python .token.string {
    color: #98c379;
}

.language-python .token.number,
.language-python .token.boolean {
    color: #d19a66;
}

.language-python .token.class-name {
    color: #e5c07b;
}

.language-python .token.operator,
.language-python .token.punctuation {
    color: #abb2bf;
}

.code-runner-info {
    margin-top: 15px;
}

.info-block {
    background-color: #f8f9fa;
    border-left: 4px solid #1cc88a;
    padding: 10px 15px;
    border-radius: 4px;
    margin-top: 5px;
}

.info-block div {
    margin-bottom: 5px;
}

.info-block div:last-child {
    margin-bottom: 0;
}

.metadata-summary {
    background-color: #f8f9fa;
    border-radius: 4px;
    padding: 10px 15px;
    font-size: 0.9rem;
}

/* JSON folding styles */
.json-container {
    font-family: monospace;
    white-space: pre-wrap;
    font-size: 0.9rem;
    background-color: #f8f9fa;
    padding: 16px;
    border-radius: 5px;
    margin-top: 10px;
    max-height: 600px;
    overflow-y: auto;
    line-height: 1.5;
}

.json-key {
    color: #0d6efd;
    cursor: pointer;
    position: relative;
}

.json-key::before {
    content: "▼";
    display: inline-block;
    margin-right: 5px;
    font-size: 0.7rem;
    transition: transform 0.2s;
}

.json-key.collapsed::before {
    transform: rotate(-90deg);
}

.json-property-key {
    color: #6610f2;
    cursor: pointer;
    position: relative;
}

.json-property-key::before {
    content: "▼";
    display: inline-block;
    margin-right: 5px;
    font-size: 0.7rem;
    transition: transform 0.2s;
}

.json-property-key.collapsed::before {
    transform: rotate(-90deg);
}

.json-property {
    color: #6610f2;
}

.json-value {
    margin-left: 20px;
    transition: max-height 0.3s ease-out, opacity 0.3s ease-out;
    max-height: 5000px;
    opacity: 1;
    overflow: hidden;
}

.json-value.collapsed {
    max-height: 0;
    opacity: 0;
    display: none;
}

.code-block {
    padding: 10px;
    background-color: #282c34;
    color: #abb2bf;
    border-radius: 5px;
    overflow-x: auto;
    margin: 5px 0;
    max-height: 400px;
    white-space: pre;
    font-family: 'Courier New', monospace;
    font-size: 0.85rem;
    display: block;
    transition: max-height 0.3s ease-out, opacity 0.3s ease-out, margin 0.3s ease-out;
}

.code-block.collapsed {
    display: none;
}

.json-string {
    color: #198754;
}

.json-number {
    color: #0dcaf0;
}

.json-boolean {
    color: #6f42c1;
}

.json-null {
    color: #6c757d;
}

.collapsible-string {
    color: #198754;
    position: relative;
}

.json-string-preview {
    display: inline-block;
    color: #198754;
}

/* Improve general JSON display */
.journey-step-body pre,
.code-section pre {
    max-height: 300px;
    overflow: auto;
}

.json-container .json-key,
.json-container .json-property-key {
    transition: background-color 0.2s;
    padding: 1px 2px;
    border-radius: 2px;
}

.json-container .json-key:hover,
.json-container .json-property-key:hover {
    background-color: rgba(13, 110, 253, 0.1);
}

/* Run tabs styling */
.run-tabs .nav-link {
    background-color: #f8f9fa;
    border: 1px solid #dee2e6;
    border-bottom: none;
    color: #495057;
    padding: 0.75rem 1rem;
    margin-right: 0.25rem;
    border-radius: 0.375rem 0.375rem 0 0;
    transition: all 0.2s ease;
}

.run-tabs .nav-link:hover {
    background-color: #e9ecef;
    border-color: #dee2e6;
    color: #495057;
}

.run-tabs .nav-link.active {
    background-color: white;
    border-color: #dee2e6;
    color: var(--primary-color);
    font-weight: 600;
}

.run-tabs .nav-link small {
    font-size: 0.75rem;
    font-weight: normal;
    opacity: 0.7;
}

.run-tab-content {
    border: 1px solid #dee2e6;
    border-radius: 0 0.375rem 0.375rem 0.375rem;
    background-color: white;
    padding: 1rem;
}

.run-tab-content .tab-pane {
    min-height: 200px;
} 