/* A/B Testing comparison */
.ab-comparison {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    gap: 2rem;
    margin-top: 1rem;
}

.ab-version-card {
    background: #1e293b;
    padding: 1.5rem;
    border-radius: 8px;
    border: 1px solid #334155;
}

.ab-version-card.winner {
    border: 2px solid #10b981;
    box-shadow: 0 0 20px rgba(16, 185, 129, 0.3);
}

.ab-vs {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    color: #64748b;
}

.ab-winner-badge {
    background: #10b981;
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
    display: inline-block;
    margin-bottom: 0.5rem;
}

/* A/B Test Results */
.ab-results-container {
    background: var(--container-bg);
    border: 1px solid var(--container-border);
    border-radius: 8px;
    padding: 2rem;
}

.ab-results-title {
    margin: 0 0 1.5rem 0;
    color: var(--title-color);
}

.ab-results-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    margin-bottom: 2rem;
}

.ab-version-result-card {
    background: var(--card-bg);
    padding: 1.5rem;
    border-radius: 6px;
    border: 1px solid var(--card-border);
}

.ab-version-subtitle {
    margin: 0 0 1rem 0;
    color: var(--subtitle-color);
}

.ab-version-number {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-color);
}

.ab-metric-value {
    color: var(--metric-color);
    margin: 0.5rem 0;
}

.ab-metric-value strong {
    color: var(--text-color);
}

.ab-model-info {
    color: var(--model-color);
    font-size: 0.875rem;
}

.ab-summary {
    text-align: center;
    padding: 1.5rem;
    border-radius: 6px;
}

.ab-summary.success {
    background: var(--success-bg);
    border: 1px solid var(--success-border);
}

.ab-summary.error {
    background: var(--error-bg);
    border: 1px solid var(--error-border);
}

.ab-winner-text {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.ab-winner-text.success {
    color: var(--success-text);
}

.ab-winner-text.error {
    color: var(--error-text);
}

.ab-improvement-text {
    color: var(--desc-color);
}

/* A/B Test select controls */
#ab-prompt-select,
#ab-version-a-select,
#ab-version-b-select,
#ab-metric-select {
    flex: 1;
    min-width: 150px;
    padding: 0.5rem;
    border-radius: 4px;
    border: 1px solid #334155;
    background: #1e293b;
    color: #e2e8f0;
}

/* Light mode */
body.light-mode .ab-version-card {
    background: #ffffff;
    border-color: #e2e8f0;
}

body.light-mode .ab-version-card.winner {
    border-color: #10b981;
}

body.light-mode #ab-prompt-select,
body.light-mode #ab-version-a-select,
body.light-mode #ab-version-b-select,
body.light-mode #ab-metric-select {
    background: #ffffff !important;
    border-color: #e2e8f0 !important;
    color: #1e293b !important;
}

body.light-mode #ab-prompt-select:focus,
body.light-mode #ab-version-a-select:focus,
body.light-mode #ab-version-b-select:focus,
body.light-mode #ab-metric-select:focus {
    border-color: #2563eb !important;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1) !important;
}

/* Ensure all selects in AB testing section are properly styled in light mode */
body.light-mode .ab-testing-section select,
body.light-mode .setup-field select {
    background: #ffffff !important;
    border-color: #e2e8f0 !important;
    color: #1e293b !important;
}
