/* Classification Demo Styles */

/* Narrower sidebar for this demo */
.controls {
    min-width: 230px;
    max-width: 230px;
}

/* Left Column Wrapper - contains chart and control panels */
.left-column-wrapper {
    display: flex;
    flex-direction: column;
}

/* Predictions Table Section */
.predictions-table-section {
    border: 2px solid #ddd;
    border-radius: 0;
    background: white;
    margin-top: 20px;
    width: 100%;
    box-sizing: border-box;
}

.predictions-table-section h3 {
    margin: 0;
    padding: 15px 20px;
    background: #f8f9fa;
    color: #2c3e50;
    font-size: 16px;
    font-weight: 600;
    border-bottom: 2px solid #ddd;
}

.table-scroll {
    overflow-x: auto;
    overflow-y: hidden;
    max-width: 100%;
    padding: 20px;
}

.predictions-table {
    width: auto;
    border-collapse: collapse;
    font-size: 13px;
    white-space: nowrap;
}

.predictions-table tbody th {
    background: #343a40;
    color: white;
    padding: 6px 8px;
    text-align: center;
    font-weight: 600;
    font-size: 12px;
    border: 1px solid #23272b;
    position: sticky;
    left: 0;
    z-index: 2;
    width: 70px;
}

.predictions-table tbody td {
    padding: 4px 6px;
    text-align: center;
    border: 1px solid #dee2e6;
    background: white;
    font-family: monospace;
    font-size: 12px;
    width: 45px;
}

.predictions-table tbody tr:nth-child(odd) td {
    background: #f8f9fa;
}

.predictions-table tbody tr:hover td {
    background: #e9ecef;
}

.predictions-table tbody tr:nth-child(odd):hover td {
    background: #e2e6ea;
}

/* Correct/Incorrect styling */
.predictions-table .correct-check {
    color: #28a745;
    font-weight: bold;
    font-size: 18px;
}

.predictions-table .incorrect-x {
    color: #dc3545;
    font-weight: bold;
    font-size: 18px;
}

/* Class color coding */
.predictions-table .class-0 {
    color: #3498db;
    font-weight: bold;
}

.predictions-table .class-1 {
    color: #ff9800;
    font-weight: bold;
}

/* Confidence color coding */
.predictions-table .confidence-high {
    background: #d4edda !important;
    color: #155724;
    font-weight: bold;
}

.predictions-table .confidence-medium {
    background: #fff3cd !important;
    color: #856404;
    font-weight: bold;
}

.predictions-table .confidence-low {
    background: #f8d7da !important;
    color: #721c24;
    font-weight: bold;
}

/* Control Row - Data Buttons and Classifier Selector */
.control-row {
    display: flex;
    gap: 20px;
    margin-top: 10px;
    width: 100%;
    box-sizing: border-box;
}

/* Data Buttons Panel */
.data-buttons-panel {
    flex: 0 0 auto;
    border: 2px solid #ddd;
    border-radius: 0;
    background: white;
    padding: 12px 16px;
    display: flex;
    flex-direction: column;
}

.data-btn {
    display: block;
    width: 100%;
    padding: 10px 16px;
    margin-bottom: 8px;
    background: #3498db;
    color: white;
    border: none;
    border-radius: 4px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s;
}

.data-btn:last-child {
    margin-bottom: 0;
}

.data-btn:hover {
    background: #2980b9;
}

.data-btn:active {
    background: #21618c;
}

/* Color variations for data buttons */
#generate-data-btn {
    background: #27ae60;
}

#generate-data-btn:hover {
    background: #229954;
}

#generate-data-btn:active {
    background: #1e8449;
}

#clear-data-btn {
    background: #e74c3c;
}

#clear-data-btn:hover {
    background: #c0392b;
}

#clear-data-btn:active {
    background: #a93226;
}

#solution-btn {
    background: #9b59b6;
}

#solution-btn:hover {
    background: #8e44ad;
}

#solution-btn:active {
    background: #7d3c98;
}

/* Classifier Selector Panel */
.classifier-selector-panel {
    flex: 1;
    border: 2px solid #ddd;
    border-radius: 0;
    background: white;
    padding: 15px 20px;
}

.classifier-selector-panel h4 {
    margin: 0 0 12px 0;
    color: #2c3e50;
    font-size: 14px;
    font-weight: 600;
}

.classifier-boxes {
    display: flex;
    gap: 15px;
    justify-content: flex-start;
}

.classifier-box {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 90px;
    padding: 10px;
    border: 3px solid #bdc3c7;
    border-radius: 8px;
    background: #ecf0f1;
    cursor: pointer;
    transition: all 0.3s ease;
}

/* Subtle colors for inactive classifier boxes */
.classifier-box[data-classifier="linear"]:not(.active) {
    background: #f7fbfd;
    border-color: #e3eef5;
}

.classifier-box[data-classifier="step"]:not(.active) {
    background: #fefdfb;
    border-color: #faf6ed;
}

.classifier-box[data-classifier="sigmoid"]:not(.active) {
    background: #fbf9fc;
    border-color: #f0eaf3;
}

.classifier-box:hover {
    border-color: #95a5a6;
    background: #dfe6e9;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.classifier-graphic {
    margin-bottom: 6px;
    color: #7f8c8d;
}

/* Subtle graphic colors for inactive boxes */
.classifier-box[data-classifier="linear"]:not(.active) .classifier-graphic {
    color: #b8d7eb;
}

.classifier-box[data-classifier="step"]:not(.active) .classifier-graphic {
    color: #f8d396;
}

.classifier-box[data-classifier="sigmoid"]:not(.active) .classifier-graphic {
    color: #d5c1dd;
}

.classifier-label {
    font-size: 13px;
    font-weight: 600;
    color: #34495e;
    text-align: center;
}

/* Subtle label colors for inactive boxes */
.classifier-box[data-classifier="linear"]:not(.active) .classifier-label {
    color: #b8d7eb;
    opacity: 0.5;
}

.classifier-box[data-classifier="step"]:not(.active) .classifier-label {
    color: #f8d396;
    opacity: 0.5;
}

.classifier-box[data-classifier="sigmoid"]:not(.active) .classifier-label {
    color: #d5c1dd;
    opacity: 0.5;
}

/* Active States - Different Colors for Each Type */
.classifier-box.active[data-classifier="linear"] {
    border-color: #3498db;
    background: #ebf5fb;
}

.classifier-box.active[data-classifier="linear"] .classifier-graphic {
    color: #2874a6;
}

.classifier-box.active[data-classifier="linear"] .classifier-label {
    color: #1a5490;
}

.classifier-box.active[data-classifier="step"] {
    border-color: #e67e22;
    background: #fef5e7;
}

.classifier-box.active[data-classifier="step"] .classifier-graphic {
    color: #ca6f1e;
}

.classifier-box.active[data-classifier="step"] .classifier-label {
    color: #935116;
}

.classifier-box.active[data-classifier="sigmoid"] {
    border-color: #9b59b6;
    background: #f4ecf7;
}

.classifier-box.active[data-classifier="sigmoid"] .classifier-graphic {
    color: #7d3c98;
}

.classifier-box.active[data-classifier="sigmoid"] .classifier-label {
    color: #5b2c6f;
}
