/* CSS Variables - Textual Default Color Scheme */
$background: #0f1419;
$primary: #1e293b;
$text: #f8fafc;
$accent: #3b82f6;
$success: #10b981;
$warning: #f59e0b;
$error: #ef4444;
$info: #06b6d4;
$surface: #1e293b;
$text-muted: #64748b;

/* Main TUI Stylesheet */

/* Global styles */
Screen {
    background: $background;
}

/* Header and Footer */
Header {
    dock: top;
    height: 3;
    background: $primary;
    color: $text;
}

Footer {
    dock: bottom;
    height: 1;
    background: $primary;
    color: $text;
}

/* Main container */
#main-container {
    height: 1fr;
    padding: 1;
}

/* Panel styles */
.panel {
    border: solid $primary;
    margin: 1;
    padding: 1;
    height: auto;
}

.panel-title {
    text-style: bold;
    color: $accent;
    margin-bottom: 1;
}

/* Section layouts */
#top-section {
    height: 16;
}

#middle-section {
    height: 8;
}

#bottom-section {
    height: 8;
}

/* Device panel */
#device-panel {
    width: 1fr;
}

#device-table {
    height: 6;
    margin-bottom: 1;
}

/* Enhanced device table styling */
#device-table .indicators-column {
    text-align: center;
}

/* Configuration panel */
#config-panel {
    width: 1fr;
}

/* Compatibility panel */
#compatibility-panel {
    width: 1fr;
}

#compatibility-table {
    height: 10;
    margin-top: 1;
}

#compatibility-score {
    margin: 1 0;
    text-style: bold;
    min-height: 2;
}

/* Enhanced compatibility display */
.status-row-valid {
    background: rgba(16, 185, 129, 0.1);
}

.status-row-warning {
    background: rgba(245, 158, 11, 0.1);
}

.status-row-error {
    background: rgba(239, 68, 68, 0.1);
}

.status-row-info {
    background: rgba(6, 182, 212, 0.1);
}

/* Build panel */
#build-panel {
    width: 1fr;
}

#build-progress {
    margin: 1 0;
}

/* Status panel */
#status-panel {
    width: 1fr;
}

/* Actions panel */
#actions-panel {
    width: 1fr;
}

/* Button styles */
.button-row {
    height: 3;
    align: center middle;
}

Button {
    margin: 0 1;
    min-width: 12;
}

Button.-primary {
    background: $primary;
    color: $text;
}

Button.-success {
    background: $success;
    color: $text;
}

Button.-warning {
    background: $warning;
    color: $text;
}

Button.-error {
    background: $error;
    color: $text;
}

Button:disabled {
    background: $surface;
    color: $text-muted;
}

/* Progress bar */
ProgressBar {
    height: 1;
    margin: 1 0;
}

/* Data table */
DataTable {
    height: 1fr;
}

DataTable > .datatable--header {
    background: $primary;
    color: $text;
    text-style: bold;
}

DataTable > .datatable--cursor {
    background: $accent;
    color: $text;
}

/* Status indicators */
.status-good {
    color: $success;
}

.status-warning {
    color: $warning;
}

.status-error {
    color: $error;
}

.status-info {
    color: $info;
}

/* Enhanced compatibility indicators */
.indicator-valid {
    color: $success;
}

.indicator-invalid {
    color: $error;
}

.indicator-driver-bound {
    color: $warning;
}

.indicator-driver-detached {
    color: $success;
}

.indicator-driver-none {
    color: $info;
}

.indicator-vfio-compatible {
    color: $success;
}

.indicator-vfio-incompatible {
    color: $error;
}

.indicator-iommu-enabled {
    color: $success;
}

.indicator-iommu-disabled {
    color: $error;
}

.indicator-ready {
    color: $success;
}

.indicator-not-ready {
    color: $error;
}

.indicator-caution {
    color: $warning;
}

/* Compact status display */
.compact-indicators {
    text-align: center;
}

/* Text styles */
.text-bold {
    text-style: bold;
}

.positive-factor {
    color: $success;
}

.negative-factor {
    color: $error;
}

.text-italic {
    text-style: italic;
}

.text-muted {
    color: $text-muted;
}

/* Responsive adjustments would go here if supported by Textual CSS */