/* Styles specific to the Benchmark View page */

/* Card-like container for tabs */
.tab-card {
    border-radius: var(--border-radius-sm);
    box-shadow: var(--shadow);
    border: 1px solid var(--border-color);
    background-color: var(--card-bg);
    margin-bottom: 1.5rem;
    overflow: hidden; /* Ensures the content respects the rounded corners */
}

/* Tab content styles */
.tab-content {
    padding: 0; /* Remove top padding to connect with tabs */
}

.tab-pane {
    display: none;
    background-color: var(--card-bg); /* Match the active tab background color */
    border: 1px solid var(--border-color); /* Match Bootstrap tab border color */
    border-top: none; /* Remove top border to connect with the active tab */
    border-radius: 0 0 var(--border-radius-sm) var(--border-radius-sm); /* Round the bottom corners */
    padding: 25px 15px 15px 15px; /* Increased top padding */
    margin-top: -1px; /* Overlap the tab border to create a seamless look */
}

/* Ensure the nav-tabs bottom border aligns with tab-pane */
.nav-tabs {
    border-bottom: none; /* Remove default bottom border */
    margin-bottom: 0; /* Ensure no margin at the bottom of tabs */
    padding: 0.5rem 0.5rem 0 0.5rem; /* Add padding to match card padding */
    background-color: var(--subtle-bg-color); /* Light gray background for tab header area */
}

/* Style for all nav tabs */
.nav-tabs .nav-link {
    border-radius: var(--border-radius-sm) var(--border-radius-sm) 0 0; /* Round only top corners */
    margin-right: 0.25rem; /* Space between tabs */
}

/* Style for the active tab to connect with the content */
.nav-tabs .nav-link.active {
    background-color: var(--card-bg);
    border-color: var(--border-color) var(--border-color) var(--card-bg); /* Bottom border color should match the tab background */
}

.tab-pane.active.show {
    display: block;
}

/* Style the system prompt display area */
.system-prompt-display {
    max-height: 200px;
    overflow-y: auto;
    white-space: pre-wrap; /* Ensure wrapping */
    word-break: break-word; /* Break long words if needed */
    font-size: 0.85rem; /* Slightly smaller font */
    background-color: var(--light-color);
    border: 1px solid var(--border-color);
    padding: 0.5rem;
    color: var(--dark-color);
}


/* Ensure disabled steps look visually distinct */
.step-row-disabled {
    opacity: 0.6;
    font-style: italic;
}

/* Style for the action buttons bar */
.benchmark-action-button {
    margin-bottom: 0.5rem; /* Add some spacing below buttons if they wrap */
}

/* Styles for the Aggregated Results Table */
.results-table th[data-sort] {
    cursor: pointer;
}

.results-table .sort-icon {
    margin-left: 4px;
    opacity: 0.6;
    transition: opacity 0.2s ease;
}

.results-table th[data-sort]:hover .sort-icon {
    opacity: 1;
}

/* Styles for benchmark details page */

.benchmark-steps-view-table th,
.benchmark-steps-view-table td {
    vertical-align: middle;
}


.bg-light {
    background-color: var(--light-color) !important;
}


/* Styles for step toggle button icons */
.step-actions .btn .bi-chevron-up {
    display: none; /* Hide chevron-up by default */
}

.step-actions .btn:not(.collapsed) .bi-chevron-up {
    display: inline-block; /* Show chevron-up when expanded */
}

.step-actions .btn:not(.collapsed) .bi-info-circle {
    display: none; /* Hide info-circle when expanded */
}

/* Styles for noUiSlider (moved from benchmark-create-edit.html) */
.accuracy-slider-values {
    font-weight: normal;
    margin-left: 10px;
}
.noUi-target {
    margin-top: 5px; /* Add some space below the label */
}

/* === Overrides for grid view in Benchmark Details (read-only) === */
.grid-steps .user-prompt-text {
    white-space: pre-wrap !important; /* Preserve line breaks but allow wrapping */
    word-break: break-word;           /* Break long words if needed */
    overflow: visible !important;     /* No scrollbars */
    min-height: auto !important;      /* Remove min-height */
    padding: 0.25rem 0.5rem !important; /* Add some padding */
    margin-bottom: 0 !important;      /* Remove margins */
    line-height: 1.2 !important;      /* Tighter line spacing */
    border-radius: 4px !important;                 /* Rounded corners */
    display: inline-block !important;              /* Fit to content */
}

/* Expected Response cells: wrap and max 25% width */
.grid-steps .col-response {
    max-width: 25% !important;        /* Cap width at 25% of table */
    white-space: normal !important;   /* Allow wrapping */
    height: auto !important;          /* No fixed height */
    min-height: 0 !important;         /* Override min-height */
    vertical-align: middle !important; /* Match other cells */
    overflow-wrap: normal !important; /* Prevent wrapping inside words */
}

/* Make sure pre elements inside response columns have correct styling */
.grid-steps .col-response pre {
    white-space: pre-wrap !important; /* Allow wrapping */
    word-break: normal !important;    /* Don't break words */
    hyphens: none !important;         /* No hyphenation */
    overflow-wrap: normal !important; /* Don't wrap inside words */
    overflow: visible !important;     /* No scrollbars */
    margin: 0 !important;             /* No margins */
    padding: 0.25rem 0.5rem !important; /* Add some padding */
    line-height: 1.2 !important;      /* Tighter line spacing */
    font-size: 0.875rem !important;   /* Slightly smaller text */
    border-radius: 4px !important;                 /* Rounded corners */
    display: inline-block !important;              /* Fit to content */
}

/* Ensure all cells in grid-steps table have consistent vertical alignment and padding */
.grid-steps table td {
    vertical-align: middle !important;
    padding: 0.35rem 0.5rem !important; /* Consistent padding */
    height: auto !important;
}

/* Use Flexbox for filter-section to ensure proper spacing and no wrapping */
.filter-section {
    display: flex;
    gap: 2.5rem;
}
.filter-section > .col-md-3 {
    flex: 1 1 0;
    max-width: 100%;
}

.filter-section > .col-md-3:last-child {
    margin-right: 2.5rem;
}

/* Pending badge for accuracy pending human evaluation */
.pending-badge {
    display: inline-block;
    background-color: var(--subtle-bg-color, #e0e0e0);
    color: var(--text-muted, #888);
    border-radius: 12px;
    padding: 0.15em 0.7em;
    font-size: 0.95em;
    font-weight: 500;
    letter-spacing: 0.02em;
    vertical-align: middle;
    border: 1px solid var(--border-color, #ccc);
    cursor: default;
}

/* Dropdown form styling for options menu */
.dropdown-form {
    margin: 0;
} 