/* Multi-Agent Demo - Minimal UI Styles */

/* Experimental Agent UX Styles */
.experimental-panel {
    background: rgba(0, 123, 255, 0.05);
    border: 1px solid rgba(0, 123, 255, 0.2);
    border-radius: 8px;
    padding: 1rem;
    max-height: 600px;
    overflow-y: auto;
}

.experimental-section {
    background: rgba(255, 193, 7, 0.05);
    border: 1px solid rgba(255, 193, 7, 0.2);
    border-radius: 6px;
    padding: 0.75rem;
}

/* Two-lane transcript */
.transcript-lanes {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    min-height: 300px;
}

.applicant-lane, .administrator-lane {
    border: 1px solid #444;
    border-radius: 6px;
    padding: 0.75rem;
    background: rgba(0, 0, 0, 0.2);
}

.applicant-lane h5 {
    color: #17a2b8;
    margin-bottom: 0.5rem;
}

.administrator-lane h5 {
    color: #28a745;
    margin-bottom: 0.5rem;
}

.agent-messages {
    max-height: 250px;
    overflow-y: auto;
}

.agent-message {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 6px;
    padding: 0.75rem;
    border-left: 3px solid #007bff;
}

.message-header {
    font-size: 0.85rem;
    margin-bottom: 0.5rem;
}

.message-body {
    font-size: 0.9rem;
    line-height: 1.4;
}

/* Action cards */
.action-card .card {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.2);
}

.action-card.request-info .card {
    border-left: 3px solid #ffc107;
}

.action-card.propose-decision .card {
    border-left: 3px solid #28a745;
}

.action-card.request-docs .card {
    border-left: 3px solid #17a2b8;
}

.action-card.propose-slots .card {
    border-left: 3px solid #6f42c1;
}

/* Test results */
.test-results .test-case {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 4px;
    padding: 0.5rem;
}

.test-result {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.5rem;
}

/* Right rail tabs */
.experimental-tabs {
    background: rgba(0, 0, 0, 0.3);
    border-radius: 8px;
    margin-bottom: 1rem;
    max-height: 500px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.experimental-tabs .nav-tabs {
    border-bottom-color: #444;
}

.experimental-tabs .nav-link {
    color: #e0e0e0;
    border-color: transparent;
}

.experimental-tabs .nav-link.active {
    background-color: rgba(0, 123, 255, 0.2);
    border-color: #007bff;
    color: #fff;
}

.trace-content, .artifacts-content, .raw-content {
    max-height: 350px;
    overflow-y: auto;
    font-size: 0.85rem;
    flex: 1;
}

.experimental-tabs .tab-content {
    flex: 1;
    overflow: hidden;
}

/* Autonomous v2 styles */
.autonomous-transcript-lanes {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    min-height: 400px;
    margin-bottom: 1rem;
}

.autonomous-applicant-lane, .autonomous-administrator-lane {
    border: 1px solid #444;
    border-radius: 6px;
    padding: 0.75rem;
    background: rgba(0, 0, 0, 0.2);
}

.autonomous-agent-messages {
    max-height: 350px;
    overflow-y: auto;
    min-height: 100px;
}

.autonomous-message {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 6px;
    padding: 0.75rem;
    border-left: 3px solid #007bff;
}

.autonomous-message[data-state="completed"] {
    border-left-color: #28a745;
}

.autonomous-message[data-state="error"] {
    border-left-color: #dc3545;
}

.autonomous-message[data-state="working"] {
    border-left-color: #ffc107;
}

.autonomous-message .message-header {
    font-size: 0.85rem;
    margin-bottom: 0.5rem;
}

.autonomous-message .message-content {
    font-size: 0.9rem;
}

.response-actions {
    margin-top: 0.5rem;
}

.action-summary {
    display: flex;
    align-items: center;
    margin-bottom: 0.25rem;
}

.trace-entry {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 4px;
    padding: 0.5rem;
    margin-bottom: 0.5rem;
}

.trace-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.25rem;
}

.trace-data pre {
    background: rgba(0, 0, 0, 0.3);
    border: none;
    border-radius: 4px;
    padding: 0.5rem;
    margin: 0;
    font-size: 0.8rem;
    max-height: 150px;
    overflow: auto;
}

/* Claude status indicators */
#claude-status {
    background: rgba(138, 43, 226, 0.1);
    border: 1px solid rgba(138, 43, 226, 0.3);
    border-radius: 6px;
    padding: 0.5rem;
}

/* Response cards */
#generated-response-card .card {
    background: rgba(0, 123, 255, 0.1);
    border-color: #007bff;
}

#generated-response-card .card-header {
    background: rgba(0, 123, 255, 0.2);
    border-bottom-color: #007bff;
}

/* BCS test harness */
.bcs-test-section {
    background: rgba(40, 167, 69, 0.05);
    border: 1px solid rgba(40, 167, 69, 0.2);
    border-radius: 6px;
    padding: 1rem;
}

/* Spinner and loading states */
.experimental-panel .spinner-border-sm {
    width: 1rem;
    height: 1rem;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .transcript-lanes {
        grid-template-columns: 1fr;
        gap: 0.5rem;
    }
    
    .experimental-tabs .tab-content {
        padding: 0.5rem;
    }
    
    .trace-content, .artifacts-content, .raw-content {
        max-height: 200px;
    }
}

body {
    font-family: system-ui, -apple-system, sans-serif;
    margin: 0;
    padding: 0;
    background-color: #1a1a1a;
    color: #e0e0e0;
    height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Header */
.header {
    background-color: #2a2a2a;
    padding: 1rem;
    border-bottom: 1px solid #444;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.header h1 {
    margin: 0;
    font-size: 1.5rem;
    color: #fff;
}

.protocol-toggle {
    display: flex;
    gap: 1rem;
}

.protocol-toggle label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 4px;
    transition: background-color 0.2s;
}

.protocol-toggle label:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

/* Main Content - Three Column Layout */
.main-content {
    flex: 1;
    display: flex;
    min-height: 0;
}

.left-pane {
    flex: 1;
    padding: 1rem;
    border-right: 1px solid #444;
    display: flex;
    flex-direction: column;
}

.center-pane {
    flex: 1;
    padding: 1rem;
    border-right: 1px solid #444;
    display: flex;
    flex-direction: column;
}

.right-pane {
    width: 350px;
    padding: 1rem;
    background-color: #2a2a2a;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
}

.left-pane h2, .center-pane h2, .right-pane h2 {
    margin: 0 0 1rem 0;
    font-size: 1.2rem;
    color: #fff;
    border-bottom: 1px solid #444;
    padding-bottom: 0.5rem;
}

/* Transcript */
.transcript {
    flex: 1;
    background-color: #0d1117;
    border: 1px solid #444;
    border-radius: 6px;
    padding: 1rem;
    overflow-y: auto;
    font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
    font-size: 0.9rem;
    line-height: 1.4;
}

.transcript .no-messages {
    text-align: center;
    color: #666;
    font-style: italic;
    padding: 2rem;
}

/* Message styling */
.message {
    margin-bottom: 1rem;
    padding: 0.75rem;
    border-radius: 4px;
    background-color: rgba(255, 255, 255, 0.02);
    border-left: 3px solid #666;
}

.message-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
    font-size: 0.8rem;
}

.role-badge {
    padding: 0.2rem 0.5rem;
    border-radius: 3px;
    font-weight: bold;
    font-size: 0.7rem;
    text-transform: uppercase;
}

.role-system { background-color: #4a5568; color: white; }
.role-applicant { background-color: #3182ce; color: white; }
.role-administrator { background-color: #38a169; color: white; }
.role-user { background-color: #805ad5; color: white; }
.role-error { background-color: #e53e3e; color: white; }

.timestamp {
    color: #666;
    font-size: 0.7rem;
}

.message-content {
    white-space: pre-wrap;
    word-break: break-word;
}

/* Artifacts */
.artifacts {
    flex: 1;
    background-color: #0d1117;
    border: 1px solid #444;
    border-radius: 6px;
    padding: 1rem;
    overflow-y: auto;
}

.artifacts .no-artifacts {
    text-align: center;
    color: #666;
    font-style: italic;
    padding: 2rem;
}

.artifact-list {
    list-style: none;
    padding: 0;
    margin: 1rem 0;
}

.artifact-item {
    margin-bottom: 0.75rem;
    padding: 0.75rem;
    background-color: rgba(255, 255, 255, 0.05);
    border-radius: 4px;
    border: 1px solid #444;
}

.artifact-link {
    color: #58a6ff;
    text-decoration: none;
    font-weight: bold;
    display: block;
    margin-bottom: 0.25rem;
}

.artifact-link:hover {
    color: #79c0ff;
    text-decoration: underline;
}

.artifact-type {
    color: #8b949e;
    font-size: 0.8rem;
}

/* Controls */
.controls {
    padding: 1rem;
    background-color: #2a2a2a;
    border-top: 1px solid #444;
    display: flex;
    gap: 1rem;
    justify-content: center;
}

/* Button styles */
.btn {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 500;
    font-size: 0.9rem;
    transition: all 0.2s;
}

.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.btn-primary {
    background-color: #238636;
    color: white;
}

.btn-primary:hover:not(:disabled) {
    background-color: #2ea043;
}

.btn-secondary {
    background-color: #21262d;
    color: white;
    border: 1px solid #444;
}

.btn-secondary:hover:not(:disabled) {
    background-color: #30363d;
}

.btn-outline {
    background-color: transparent;
    color: #f85149;
    border: 1px solid #f85149;
}

.btn-outline:hover:not(:disabled) {
    background-color: #f85149;
    color: white;
}

/* Settings Panel Styles */
.settings-panel {
    font-size: 0.9rem;
}

.settings-panel .form-label {
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.settings-panel .form-control {
    background-color: #333;
    border-color: #555;
    color: #e0e0e0;
}

.settings-panel .form-control:focus {
    background-color: #333;
    border-color: #0d6efd;
    color: #e0e0e0;
    box-shadow: 0 0 0 0.2rem rgba(13, 110, 253, 0.25);
}

.selftest-badge .badge {
    font-size: 0.8rem;
}

.requirements-section {
    background-color: #333;
    padding: 0.75rem;
    border-radius: 0.375rem;
    border: 1px solid #555;
}

#payload-error {
    font-size: 0.8rem;
}

/* Responsive design */
@media (max-width: 768px) {
    .main-content {
        flex-direction: column;
    }
    
    .left-pane {
        border-right: none;
        border-bottom: 1px solid #444;
    }
    
    .right-pane {
        width: auto;
        height: 200px;
    }
    
    /* Experimental responsive */
    .transcript-lanes {
        grid-template-columns: 1fr;
        gap: 0.5rem;
    }
    
    .experimental-panel {
        max-height: 400px;
    }
    
    .experimental-tabs {
        max-height: 300px;
    }
    
    /* Autonomous v2 responsive */
    .autonomous-transcript-lanes {
        grid-template-columns: 1fr;
        gap: 0.5rem;
    }
    
    .controls {
        flex-wrap: wrap;
    }
    
    .btn {
        flex: 1;
        min-width: 120px;
    }
}

/* Scrollbar styling */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-track {
    background: #1a1a1a;
}

::-webkit-scrollbar-thumb {
    background: #444;
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: #555;
}