/* Additional styles for v2 researcher data viewer */

/* Ensure h2 scenario titles are bold and appropriately sized */
.document-section-title {
    font-size: 1.05rem !important;
    font-weight: 700 !important;
}

/* Make h3 subsection labels stand out with clay color */
.document-subsection-label {
    font-size: 0.95rem !important;
    font-weight: 700 !important;
    color: var(--anthropic-clay, #D97757) !important;
    margin-top: 1rem !important;
    margin-bottom: 0.5rem !important;
}

/* h4 tags for sub-subsection labels */
.document-subsection-content h4,
.document-section-content h4 {
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--anthropic-slate, #141413);
    margin-top: 0.75rem;
    margin-bottom: 0.25rem;
}

/* Better line spacing control in metajudgment content */
.document-subsection-content,
.document-section-content {
    line-height: 1.6;
}

.document-subsection-content br,
.document-section-content br {
    line-height: 1.3;
}

/* Standardized tool formatting */
.tool-description {
    margin: 1rem 0;
    padding: 1rem;
    background: var(--anthropic-ivory, #FAF9F5);
    border-left: 3px solid var(--anthropic-clay, #D97757);
    border-radius: 4px;
}

.tool-item {
    line-height: 1.6;
}

.tool-header {
    margin-bottom: 0.75rem;
    font-size: 0.85rem;
}

.tool-header strong {
    color: var(--anthropic-clay, #D97757);
    font-weight: 700;
}

.tool-parameters-header {
    margin-top: 0.75rem;
    margin-bottom: 0.5rem;
    font-weight: 600;
    font-size: 0.85rem;
    color: var(--anthropic-slate, #141413);
}

.tool-parameter {
    margin-left: 1rem;
    margin-bottom: 0.4rem;
    font-size: 0.85rem;
}

.tool-parameter .param-name {
    font-weight: 600;
    color: var(--anthropic-slate, #141413);
}

/* Example subsections in Understanding stage */
.example-subsection {
    margin: 2rem 0;
}

.example-title {
    font-size: 1rem;
    font-weight: 700;
    color: var(--anthropic-slate, #141413);
    margin: 1.5rem 0 1rem 0;
    padding-top: 1rem;
    border-top: 1px solid var(--anthropic-oat, #E3DACC);
}

.example-subsection:first-child .example-title {
    border-top: none;
    padding-top: 0;
}

/* Statistics table for judgment data */
.statistics-table {
    width: 100%;
    border-collapse: collapse;
    margin: 1rem 0;
    font-size: 0.95rem;
}

.statistics-table tr {
    border-bottom: 1px solid var(--anthropic-oat, #E3DACC);
}

.statistics-table td {
    padding: 0.75rem 1rem;
    vertical-align: top;
}

.statistics-table td:first-child {
    width: 50%;
    color: var(--anthropic-slate, #141413);
    opacity: 0.8;
}

.statistics-table td:last-child {
    width: 50%;
    font-weight: 500;
    color: var(--anthropic-slate, #141413);
}

.statistics-table code {
    font-family: 'Monaco', 'Menlo', monospace;
    font-size: 0.85em;
    background: var(--anthropic-ivory, #FAF9F5);
    padding: 0.2rem 0.4rem;
    border-radius: 3px;
}

/* Code blocks in document sections */
.document-section-subsection pre.code-block,
pre.code-block {
    background: var(--anthropic-ivory, #FAF9F5);
    border: 1px solid var(--anthropic-oat, #E3DACC);
    border-radius: 6px;
    padding: 1rem;
    overflow-x: auto;
    margin: 0.5rem 0;
    font-size: 0.85rem;
    line-height: 1.6;
}

.document-section-subsection pre.code-block code,
pre.code-block code {
    font-family: 'Monaco', 'Menlo', monospace;
    color: var(--anthropic-slate, #141413);
    white-space: pre-wrap;
    word-break: break-word;
}

/* Numbered and bullet items */
.numbered-item,
.bullet-item {
    margin: 0.5rem 0;
    padding-left: 0.5rem;
}

.numbered-item .number {
    font-weight: 600;
    margin-right: 0.5rem;
    color: var(--anthropic-clay, #D97757);
}

/* Compact metadata table in Rollout tab */
.metadata-compact {
    font-size: 0.8rem;
}

.metadata-compact td {
    padding: 0.3rem 0.5rem;
}

/* Document description box - subtle and unassuming */
.document-description {
    padding: 0.75rem 1rem;
    margin-bottom: 0.75rem;
    margin-left: auto;
    border: 1px solid var(--anthropic-oat, #E3DACC);
    border-radius: 4px;
    background: transparent;
    font-size: 0.8rem;
    line-height: 1.6;
    color: var(--anthropic-taupe, #8C8681);
    max-width: fit-content;
    width: auto;
    display: block;
    text-align: left;
}

.document-description strong {
    font-weight: 500;
    color: var(--anthropic-slate, #141413);
}

.document-description code {
    font-family: 'Monaco', 'Menlo', monospace;
    font-size: 0.75rem;
    background: var(--anthropic-ivory, #FAF9F5);
    padding: 0.1rem 0.3rem;
    border-radius: 2px;
}

/* Two-column system prompts layout */
.system-prompts-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    margin-top: 1rem;
}

.system-prompt-column {
    min-width: 0;
    /* Allows content to shrink if needed */
}

.system-prompt-subtitle {
    font-size: 0.8rem;
    color: var(--anthropic-taupe, #8C8681);
    font-style: italic;
    margin-bottom: 0.75rem;
    margin-top: -0.25rem;
}

/* Responsive: stack on smaller screens */
@media (max-width: 1024px) {
    .system-prompts-grid {
        grid-template-columns: 1fr;
    }
}

/* Rollout conversation positioning */
.transcript-bloom-agent {
    justify-content: flex-start !important;
}

.transcript-bloom-agent .entry-content {
    background: var(--anthropic-ivory, #FAF9F5);
    border: 1px solid var(--anthropic-oat, #E3DACC);
}

.transcript-target-model {
    justify-content: flex-end !important;
}

.transcript-target-model .entry-content {
    background: var(--anthropic-ivory, #FAF9F5);
    border: 1px solid var(--anthropic-oat, #E3DACC);
}

.transcript-bloom-tool {
    justify-content: flex-start !important;
}

.transcript-bloom-tool .entry-content {
    background: var(--anthropic-ivory, #FAF9F5);
    border: 1px solid var(--anthropic-oat, #E3DACC);
}

/* Compact statistics table */
.statistics-compact {
    font-size: 0.85rem;
}

.statistics-compact td {
    padding: 0.25rem 0.5rem;
}

/* Metric notes in statistics */
.metric-note {
    font-size: 0.75rem;
    color: var(--anthropic-taupe, #8C8681);
    font-style: italic;
    font-weight: normal;
}

/* Large score display */
.score-large {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--anthropic-clay, #D97757);
}

/* Judgment card styling */
.judgment-card {
    margin: 2rem 0;
    padding: 1.5rem;
    background: var(--anthropic-ivory, #FAF9F5);
    border: 1px solid var(--anthropic-oat, #E3DACC);
    border-radius: 8px;
}

.judgment-card:first-child {
    margin-top: 0;
}

.judgment-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid var(--anthropic-oat, #E3DACC);
}

.judgment-title {
    font-size: 1rem;
    font-weight: 700;
    color: var(--anthropic-slate, #141413);
    margin: 0;
}

.behavior-score-badge {
    font-size: 0.9rem;
    font-weight: 700;
    padding: 0.5rem 1rem;
    background: var(--anthropic-clay, #D97757);
    color: white;
    border-radius: 20px;
}

.judgment-variation-desc {
    font-size: 0.85rem;
    color: var(--anthropic-taupe, #8C8681);
    margin: 1rem 0;
    padding: 0.75rem;
    background: white;
    border-left: 3px solid var(--anthropic-oat, #E3DACC);
    border-radius: 4px;
    line-height: 1.5;
}

/* Metrics grid */
.metrics-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 0.75rem;
    margin: 1.5rem 0;
    padding: 1rem;
    background: white;
    border-radius: 6px;
    border: 1px solid var(--anthropic-oat, #E3DACC);
}

.metric-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem;
    font-size: 0.85rem;
}

.metric-label {
    color: var(--anthropic-taupe, #8C8681);
    font-weight: 500;
}

.metric-value {
    font-weight: 700;
    color: var(--anthropic-slate, #141413);
    font-size: 0.95rem;
}

/* Judgment subsections */
.judgment-subsection {
    margin: 1.5rem 0;
}

.judgment-subsection-title {
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--anthropic-clay, #D97757);
    margin: 0 0 0.75rem 0;
}

.judgment-subsection-content {
    font-size: 0.9rem;
    line-height: 1.6;
    color: var(--anthropic-slate, #141413);
}

/* Highlights styling */
.highlights-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.highlight-item {
    padding: 1rem;
    background: white;
    border-left: 4px solid var(--anthropic-clay, #D97757);
    border-radius: 4px;
}

.highlight-description {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--anthropic-slate, #141413);
    margin-bottom: 0.5rem;
}

.highlight-quote {
    margin: 0.5rem 0 0 0;
    padding: 0.75rem 1rem;
    background: var(--anthropic-ivory, #FAF9F5);
    border-left: 3px solid var(--anthropic-oat, #E3DACC);
    font-size: 0.85rem;
    font-style: italic;
    line-height: 1.6;
    color: var(--anthropic-slate, #141413);
    border-radius: 4px;
}

.highlight-quote::before {
    content: '"';
    font-size: 1.5rem;
    color: var(--anthropic-clay, #D97757);
    opacity: 0.5;
    font-weight: bold;
    margin-right: 0.25rem;
}

.highlight-quote::after {
    content: '"';
    font-size: 1.5rem;
    color: var(--anthropic-clay, #D97757);
    opacity: 0.5;
    font-weight: bold;
    margin-left: 0.25rem;
}

/* ========== YAML Syntax Highlighting ========== */
.yaml-code {
    font-size: 0.8rem !important;
    line-height: 1.7 !important;
}

pre.yaml-code code {
    color: #0a3069;
    /* Dark blue as default text color */
}

.yaml-key {
    color: #0550ae;
    /* Blue for keys */
    font-weight: 600;
}

.yaml-colon {
    color: var(--anthropic-slate, #141413);
}

.yaml-string {
    color: #0a3069;
    /* Dark blue for strings */
}

.yaml-number {
    color: #0a3069;
    /* Dark blue for numbers */
}

.yaml-boolean {
    color: #cf222e;
    /* Red for booleans */
    font-weight: 600;
}

.yaml-comment {
    color: #6e7781;
    /* Gray for comments */
    font-style: italic;
}

.yaml-value {
    color: #0a3069;
    /* Dark blue for unquoted values */
}