/* ML Lite - Minimalist Styling */

/* CSS Variables for consistent theming */
:root {
    --microsoft-blue: #0078d4;
    --background-grey: #f5f5f5;
    --content-white: #ffffff;
    --text-primary: #333333;
    --text-secondary: #666666;
    --border-light: #e0e0e0;
    --border-medium: #cccccc;
    --success-green: #107c10;
    --error-red: #d13438;
    --warning-orange: #ff8c00;
    --shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    --shadow-hover: 0 4px 8px rgba(0, 0, 0, 0.15);
}

/* Global Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Screen reader only text */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Hide PyScript output that appears outside the app */
py-terminal,
py-config,
.py-terminal,
.py-repl,
py-script {
    display: none !important;
}

/* Hide any PyScript configuration display */
py-config {
    display: none !important;
}

/* Ensure PyScript loading messages don't interfere */
body > div:not(.container),
body > py-config,
body > py-script {
    display: none !important;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: var(--background-grey);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
}

.container {
    max-width: 1600px; /* Increased from 1200px */
    margin: 0 auto;
    padding: 20px;
    min-height: 100vh;
}

.content-area {
    background-color: var(--content-white);
    border-radius: 8px;
    box-shadow: var(--shadow);
    padding: 30px;
    width: 100%;
    max-width: 1500px; /* Increased from 1000px */
    min-height: 700px;
}

/* Header */
header {
    text-align: center;
    margin-bottom: 30px;
    border-bottom: 2px solid var(--microsoft-blue);
    padding-bottom: 20px;
}

header h1 {
    color: var(--microsoft-blue);
    font-size: 2.5em;
    font-weight: 300;
    margin-bottom: 5px;
}

header p {
    color: var(--text-secondary);
    font-size: 1.1em;
}

/* Tabs Container */
.tabs-container {
    display: flex;
    gap: 30px; /* Increased gap */
    min-height: 600px; /* Increased height */
}

/* Tab Navigation */
.tab-nav {
    width: 250px; /* Increased from default */
    flex-shrink: 0;
}

/* Tab Navigation */
.tab-navigation {
    flex: 0 0 250px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.tab-button {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px 20px;
    background: transparent;
    border: 2px solid var(--border-light);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: left;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-secondary);
}

.tab-button:hover:not(:disabled) {
    border-color: var(--microsoft-blue);
    background-color: rgba(0, 120, 212, 0.05);
}

.tab-button.active {
    border-color: var(--microsoft-blue);
    background-color: var(--microsoft-blue);
    color: white;
    box-shadow: var(--shadow-hover);
}

.tab-button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.tab-number {
    background-color: var(--border-light);
    color: var(--text-primary);
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: bold;
}

.tab-button.active .tab-number {
    background-color: white;
    color: var(--microsoft-blue);
}

/* Tab Content */
.tab-content {
    flex: 1;
    padding-left: 30px; /* Increased padding */
    max-width: none; /* Remove width restrictions */
    display: flex;
    flex-direction: column;
    min-height: 600px; /* Ensure minimum height for button positioning */
}

.tab-panel {
    display: none;
    flex: 1; /* Take up available space */
}

.tab-panel.active {
    display: flex;
    flex-direction: column;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.tab-panel h2 {
    color: var(--microsoft-blue);
    margin-bottom: 25px;
    font-size: 1.8em;
    font-weight: 400;
}

/* Sections */
.section {
    margin-bottom: 8px; /* Reduced from 15px - about half */
    padding: 8px; /* Reduced from 15px - about half */
    border: 1px solid var(--border-light);
    border-radius: 6px;
    background-color: #fafafa;
}

/* Multi-column layout for settings */
.settings-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px; /* Reduced from 25px - about half */
    margin-bottom: 8px; /* Reduced from 15px - about half */
}

/* Responsive grid for smaller screens */
@media (max-width: 1024px) {
    .settings-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
}

/* Horizontal layout for form elements */
.form-row {
    display: flex;
    gap: 20px; /* Reduced from 30px */
    align-items: flex-start;
    flex-wrap: wrap;
    margin-bottom: 15px; /* Reduced from 20px */
}

.form-row > * {
    flex: 1;
    min-width: 250px;
}

/* Test Model Page Layout */
.test-layout-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    align-items: start;
}

.test-inputs-column {
    display: flex;
    flex-direction: column;
}

.test-inputs-column h3 {
    margin-bottom: 10px;
    margin-top: 0;
}

.test-results-column {
    display: flex;
    flex-direction: column;
    min-height: 200px;
}

.test-results-column h3 {
    margin-bottom: 10px;
    margin-top: 0;
}

.test-button-container {
    margin-top: 15px;
}

/* Responsive layout for smaller screens */
@media (max-width: 1024px) {
    .test-layout-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
}

/* Vertical layout for prediction inputs */
.prediction-inputs-vertical {
    display: flex;
    flex-direction: column;
    gap: 6px; /* Reduced from 8px for more compact layout */
    margin-bottom: 0; /* Removed bottom margin */
    background-color: white;
    border: 1px solid var(--border-light);
    border-radius: 8px;
    padding: 15px; /* Reduced from 20px */
}

.prediction-label {
    font-weight: 500;
    color: var(--text-primary);
    font-size: 13px; /* Reduced from 14px */
    margin-bottom: 2px; /* Reduced from 3px */
    margin-top: 6px; /* Reduced from 8px */
}

.prediction-label:first-child {
    margin-top: 0;
}

.prediction-input {
    width: 100%;
    max-width: none; /* Allow inputs to use full width of column */
    padding: 6px 10px; /* Reduced from 8px 12px */
    border: 2px solid var(--border-light);
    border-radius: 4px;
    font-size: 13px; /* Reduced from 14px */
    transition: border-color 0.3s ease;
    margin-bottom: 0;
}

.prediction-input:focus {
    outline: none;
    border-color: var(--microsoft-blue);
}

/* Responsive form layout */
@media (max-width: 768px) {
    .form-row {
        flex-direction: column;
        gap: 15px;
    }
    
    .form-row > * {
        min-width: unset;
    }
}

.section h3 {
    color: var(--text-primary);
    margin-bottom: 10px; /* Reduced from 15px */
    font-size: 1.2em;
    font-weight: 500;
}

/* Model Type Selection */
.model-type-selection {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.model-type-selection label {
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.model-type-selection select {
    width: 100%;
    padding: 12px;
    border: 2px solid var(--border-light);
    border-radius: 6px;
    font-size: 14px;
    background-color: white;
    color: var(--text-primary);
    cursor: pointer;
    transition: border-color 0.3s ease;
}

.model-type-selection select:focus {
    outline: none;
    border-color: var(--microsoft-blue);
    box-shadow: 0 0 0 3px rgba(0, 120, 212, 0.1);
}

.model-type-selection select:hover {
    border-color: var(--microsoft-blue);
}

/* File Upload */
.file-upload {
    position: relative;
    display: inline-block;
}

.file-upload input[type="file"] {
    position: absolute;
    left: -9999px;
}

.file-upload-label {
    display: inline-block;
    padding: 12px 20px;
    background-color: var(--microsoft-blue);
    color: white;
    border-radius: 6px;
    cursor: pointer;
    transition: background-color 0.3s ease;
    border: none;
    font-size: 14px;
    font-weight: 500;
}

.file-upload-label:hover {
    background-color: #106ebe;
}

.file-name {
    margin-left: 15px;
    color: var(--text-secondary);
    font-style: italic;
}

/* Table Styles */
.table-container {
    overflow-x: auto;
    margin-top: 15px;
    border: 1px solid var(--border-light);
    border-radius: 6px;
    max-height: 200px; /* Limit height for data preview */
}

table {
    width: 100%;
    border-collapse: collapse;
    background-color: white;
}

th, td {
    padding: 8px 10px; /* Reduced vertical padding */
    text-align: left;
    border-bottom: 1px solid var(--border-light);
    font-size: 13px; /* Slightly smaller font */
    line-height: 1.2; /* Tighter line height */
}

th {
    background-color: var(--microsoft-blue);
    color: white;
    font-weight: 500;
    position: sticky;
    top: 0;
}

tr:hover {
    background-color: rgba(0, 120, 212, 0.05);
}

/* Form Controls */
.setting-group {
    margin-bottom: 8px; /* Reduced from 15px - about half */
}

.setting-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: var(--text-primary);
}

select, input[type="text"], input[type="number"] {
    width: 100%;
    padding: 10px;
    border: 2px solid var(--border-light);
    border-radius: 4px;
    font-size: 14px;
    transition: border-color 0.3s ease;
}

select:focus, input:focus {
    outline: none;
    border-color: var(--microsoft-blue);
    box-shadow: 0 0 0 3px rgba(0, 120, 212, 0.1);
}

.checkbox-group {
    display: flex;
    flex-direction: column;
    gap: 0px; /* Reduced from 1px */
    margin-top: 5px; /* Reduced from 8px */
}

.checkbox-group label {
    display: flex;
    align-items: center;
    gap: 6px; /* Reduced from 8px */
    padding: 1px 0; /* Reduced from 2px 0 */
    background-color: transparent;
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
    border-radius: 0;
    font-size: 13px; /* Reduced from default 14px */
}

.checkbox-group label:hover {
    background-color: rgba(0, 120, 212, 0.05);
}

.checkbox-group input[type="checkbox"]:checked + span {
    color: var(--microsoft-blue);
    font-weight: 500;
}

/* Range Slider */
.split-control {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 8px;
}

.split-control span {
    font-size: 12px;
    color: var(--text-secondary);
    min-width: 30px;
    text-align: center;
}

.split-display {
    font-size: 14px;
    color: var(--microsoft-blue);
    font-weight: 500;
    text-align: center;
    margin-top: 5px;
}

input[type="range"] {
    flex: 1;
    -webkit-appearance: none;
    height: 6px;
    border-radius: 3px;
    background: var(--border-light);
    outline: none;
}

input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--microsoft-blue);
    cursor: pointer;
}

input[type="range"]::-moz-range-thumb {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--microsoft-blue);
    cursor: pointer;
    border: none;
}

/* Buttons */
.primary-button, .nav-button {
    padding: 12px 24px;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.primary-button {
    background-color: var(--microsoft-blue);
    color: white;
}

.primary-button:hover:not(:disabled) {
    background-color: #106ebe;
    box-shadow: var(--shadow-hover);
}

.nav-button {
    background-color: transparent;
    color: var(--microsoft-blue);
    border: 2px solid var(--microsoft-blue);
    height: auto;
    flex: none;
}

.nav-button:hover:not(:disabled) {
    background-color: var(--microsoft-blue);
    color: white;
}

.nav-button:disabled, .primary-button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Navigation */
.navigation {
    display: flex;
    justify-content: space-between;
    margin-top: 10px; /* Reduced from 20px - about half */
    padding-top: 8px; /* Reduced from 15px - about half */
    border-top: 1px solid var(--border-light);
}

/* Tab Navigation Buttons */
.tab-navigation-buttons {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 15px;
    margin-top: auto; /* Push to bottom */
    padding: 8px 0; /* Reduced from 15px - about half */
    border-top: 1px solid var(--border-light);
}

.nav-buttons-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 15px;
}

.right-buttons-group {
    display: flex;
    gap: 10px;
    align-items: center;
}

.secondary-button {
    background: #6c757d;
    color: white;
    border: 1px solid #5a6268;
}

.secondary-button:hover {
    background: #5a6268;
    border-color: #545b62;
}

/* ML Engine Progress Bar in Sidebar */
.ml-engine-progress-sidebar {
    margin-top: 8px; /* Reduced from 15px - about half */
    padding: 6px; /* Reduced from 12px - about half */
    background-color: rgba(0, 120, 212, 0.05);
    border-radius: 8px;
    border: 1px solid rgba(0, 120, 212, 0.2);
}

.ml-engine-progress-sidebar .progress-bar-container {
    width: 100%;
    height: 6px;
    background-color: var(--border-light);
    border-radius: 3px;
    overflow: hidden;
    margin-bottom: 8px;
}

.ml-engine-progress-sidebar .progress-bar {
    height: 100%;
    background-color: var(--microsoft-blue);
    border-radius: 3px;
    width: 0%;
    transition: width 0.3s ease;
    animation: pulse 1.5s ease-in-out infinite;
}

.ml-engine-progress-sidebar #progress-text {
    font-size: 12px;
    color: var(--text-secondary);
    font-weight: 500;
    display: block;
    text-align: center;
}

.progress-bar {
    height: 100%;
    background-color: var(--microsoft-blue);
    border-radius: 3px;
    width: 0%;
    transition: width 0.3s ease;
    animation: pulse 1.5s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.6; }
}

.progress-bar.complete {
    background-color: var(--success-green);
    animation: none;
    width: 100% !important;
}

.progress-bar.error {
    background-color: var(--error-red);
    animation: none;
}

/* Remove old progress text styling - now handled by sidebar version */

/* UI Disabled State */
.ui-disabled {
    pointer-events: none;
    opacity: 0.6;
}

.ui-disabled * {
    cursor: not-allowed !important;
}

/* Single Progress Bar */
.single-progress-container {
    margin: 20px 0;
    padding: 15px;
    background-color: white;
    border: 1px solid var(--border-light);
    border-radius: 6px;
}

.progress-bar-wrapper {
    width: 100%;
    height: 20px;
    background-color: #f0f0f0;
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 10px;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.1);
}

.progress-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--microsoft-blue), #40a8ff);
    border-radius: 10px;
    width: 0%;
    transition: width 0.5s ease;
    position: relative;
    overflow: hidden;
}

.progress-bar-fill::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    bottom: 0;
    right: 0;
    background-image: linear-gradient(
        -45deg,
        rgba(255, 255, 255, .2) 25%,
        transparent 25%,
        transparent 50%,
        rgba(255, 255, 255, .2) 50%,
        rgba(255, 255, 255, .2) 75%,
        transparent 75%,
        transparent
    );
    background-size: 30px 30px;
    animation: progressStripes 1s linear infinite;
}

@keyframes progressStripes {
    0% {
        background-position: 0 0;
    }
    100% {
        background-position: 30px 0;
    }
}

/* Stop animation when training is complete */
.progress-bar-fill.animation-stopped::after {
    animation: none !important;
}

.progress-text {
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: 5px;
}

.progress-percentage {
    font-size: 14px;
    color: var(--microsoft-blue);
    font-weight: bold;
    text-align: right;
}

.progress-log {
    background-color: #f8f8f8;
    border: 1px solid var(--border-light);
    border-radius: 6px;
    padding: 15px;
    font-family: 'Courier New', monospace;
    font-size: 12px;
    max-height: 200px;
    overflow-y: auto;
    margin-top: 15px;
}

/* Metrics Display */
.metrics-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
    margin-top: 15px;
}

/* Horizontal Metrics Cards */
.horizontal-metrics {
    display: flex;
    flex-wrap: wrap;
    gap: 10px; /* Reduced from 15px */
    margin-top: 15px;
}

.horizontal-metrics .metric-card {
    flex: 1;
    min-width: 120px; /* Reduced from 180px */
    background-color: white;
    border: 2px solid var(--border-light);
    border-radius: 8px;
    padding: 8px; /* Reduced from 12px */
    text-align: center;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.horizontal-metrics .metric-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    border-color: var(--microsoft-blue);
}

.metric-card {
    background-color: white;
    border: 1px solid var(--border-light);
    border-radius: 6px;
    padding: 15px;
    text-align: center;
}

.metric-value {
    font-size: 1.1em; /* Reduced from 1.3em */
    font-weight: bold;
    color: var(--microsoft-blue);
    margin-bottom: 2px; /* Reduced from 4px */
    display: block;
}

.metric-label {
    color: var(--text-secondary);
    font-size: 0.7em; /* Reduced from 0.75em */
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Large Visualization Container */
.large-visualization {
    margin-top: 15px;
    background-color: white;
    border: 1px solid var(--border-light);
    border-radius: 8px;
    padding: 15px; /* Reduced from 20px */
    min-height: 340px; /* Reduced from 500px (about 1/3 smaller) */
    display: flex;
    align-items: center;
    justify-content: center;
}

.large-visualization canvas,
.large-visualization img,
.large-visualization svg {
    max-width: 100%;
    max-height: 340px; /* Reduced from 500px (about 1/3 smaller) */
    height: auto;
}

/* Responsive Design for Training Results */
@media (max-width: 768px) {
    .horizontal-metrics {
        flex-direction: column;
    }
    
    .horizontal-metrics .metric-card {
        min-width: 100%;
    }
    
    .large-visualization {
        min-height: 220px; /* Reduced from 300px (about 1/3 smaller) */
        padding: 12px; /* Reduced from 15px */
    }
    
    .large-visualization canvas,
    .large-visualization img,
    .large-visualization svg {
        max-height: 220px; /* Reduced from 300px (about 1/3 smaller) */
    }
}

/* Success Message */
.success-message {
    background-color: rgba(16, 124, 16, 0.1);
    border: 1px solid var(--success-green);
    color: var(--success-green);
    padding: 15px;
    border-radius: 6px;
    text-align: center;
    font-weight: 500;
    margin-bottom: 20px;
}

/* Test Inputs */
.test-inputs {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    margin-bottom: 20px;
}

.test-input-group {
    background-color: white;
    border: 1px solid var(--border-light);
    border-radius: 6px;
    padding: 15px;
}

.test-input-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: var(--text-primary);
}

/* Prediction Result */
.prediction-result {
    background-color: rgba(0, 120, 212, 0.1);
    border: 2px solid var(--microsoft-blue);
    border-radius: 6px;
    padding: 8px; /* Reduced from 15px - about half */
    text-align: center;
    margin-top: 8px; /* Reduced from 15px - about half */
}

.prediction-value {
    font-size: 2em;
    font-weight: bold;
    color: var(--microsoft-blue);
    margin-bottom: 10px;
}

.prediction-label {
    color: var(--text-secondary);
    font-size: 1.1em;
}

/* Visualization Container */
#visualizationContainer {
    background-color: white;
    border: 1px solid var(--border-light);
    border-radius: 6px;
    padding: 20px;
    margin-top: 15px;
    min-height: 300px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Configuration Summary */
.config-summary {
    background-color: white;
    border: 1px solid var(--border-light);
    border-radius: 6px;
    padding: 20px;
}

.config-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid var(--border-light);
}

.config-item:last-child {
    border-bottom: none;
}

.config-label {
    font-weight: 500;
    color: var(--text-primary);
}

.config-value {
    color: var(--text-secondary);
    font-family: 'Courier New', monospace;
}

/* Header Options */
.header-options {
    margin-bottom: 15px;
    padding: 10px;
    background-color: white;
    border: 1px solid var(--border-light);
    border-radius: 6px;
}

#header-inputs {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 10px;
    margin-top: 10px;
}

/* Cluster Options */
.cluster-options {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.cluster-options .radio-option {
    flex-direction: row;
    align-items: center;
    padding: 10px 15px;
}

.cluster-options .radio-option input[type="number"] {
    width: 80px;
    margin-left: 10px;
}

/* Responsive Design */
@media (max-width: 768px) {
    .container {
        padding: 10px;
    }
    
    .content-area {
        padding: 20px;
    }
    
    .tabs-container {
        flex-direction: column;
    }
    
    .tab-navigation {
        flex-direction: row;
        overflow-x: auto;
        flex: none;
    }
    
    .tab-button {
        min-width: 200px;
    }
    
    .tab-content {
        padding-left: 0;
        padding-top: 20px;
    }
    
    .navigation {
        flex-direction: column;
        gap: 10px;
    }
    
    .nav-button {
        width: 100%;
    }
}

/* Scrollbar Styling */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: var(--border-light);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb {
    background: var(--microsoft-blue);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #106ebe;
}

/* Collapsible Training Log */
#training-log {
    margin-top: 20px;
    border: 1px solid var(--border-light);
    border-radius: 8px;
    background: var(--background-light);
}

.log-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    background: var(--background-white);
    border-radius: 8px 8px 0 0;
    border-bottom: 1px solid var(--border-light);
}

.log-header h4 {
    margin: 0;
    color: var(--text-dark);
    font-size: 16px;
    font-weight: 600;
}

.log-buttons {
    display: flex;
    gap: 8px;
    align-items: center;
}

.toggle-btn {
    background: var(--microsoft-blue);
    color: white;
    border: none;
    padding: 6px 12px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: background-color 0.2s ease;
}

.toggle-btn:hover {
    background: #106ebe;
}

#logToggleIcon {
    font-size: 10px;
    transition: transform 0.2s ease;
}

.log-content {
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.log-content.collapsed {
    max-height: 0;
}

.log-content.expanded {
    max-height: 300px;
    overflow-y: auto;
}

.log-content pre {
    margin: 0;
    padding: 16px;
    background: var(--background-light);
    border: none;
    border-radius: 0 0 8px 8px;
    font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
    font-size: 12px;
    line-height: 1.4;
    color: var(--text-dark);
    white-space: pre-wrap;
    word-wrap: break-word;
}

/* Training Status Messages */
.training-status-message {
    margin-bottom: 20px;
    border-radius: 8px;
    padding: 0;
    font-size: 14px;
}

.status-success,
.status-warning,
.status-info {
    padding: 12px 16px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 500;
}

.status-success {
    background-color: #f0f8f0;
    border: 1px solid #d4edda;
    color: var(--success-green);
}

.status-warning {
    background-color: #fff8e6;
    border: 1px solid #ffeaa7;
    color: #e17055;
}

.status-info {
    background-color: #f8f9fa;
    border: 1px solid #dee2e6;
    color: #495057;
}

.status-success i,
.status-warning i,
.status-info i {
    font-size: 16px;
}

.status-warning details {
    margin-top: 8px;
}

.status-warning summary {
    cursor: pointer;
    font-size: 12px;
    opacity: 0.8;
}

.status-warning summary:hover {
    opacity: 1;
}

/* Retrain Button Styling */
.btn.btn-warning {
    background-color: var(--warning-orange);
    color: white;
    border: 1px solid #e67e22;
}

.btn.btn-warning:hover {
    background-color: #e67e22;
    border-color: #d35400;
}