/* UI Base CSS - Layout Variables and Layer System */

:root {
    /* Layout dimensions */
    --infobar-height: 28px;
    --taskbar-height: 32px;

    /* Z-index layers (relative within ui-layer) */
    --z-window: 10;
    --z-alert: 20;
    --z-startmenu: 30;
    --z-infobar: 40;
    --z-taskbar: 40;

    /* Gauge colors */
    --gauge-ok: #4caf50;
    --gauge-warning: #ff9800;
    --gauge-critical: #f44336;
}

/* Infobar - Fixed height at top in flexbox */
.infobar {
    flex-shrink: 0;
    height: var(--infobar-height);
    z-index: var(--z-infobar);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 8px;
    box-sizing: border-box;
}

/* Taskbar - Fixed height at bottom in flexbox */
.taskbar {
    flex-shrink: 0;
    height: var(--taskbar-height);
    z-index: var(--z-taskbar);
    display: flex;
    align-items: center;
    padding: 0 4px;
    box-sizing: border-box;
}

/* Window Area - Absolutely positioned overlay within canvas-area */
.window-area {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: var(--z-window);
    display: none;
}

.window-area.active {
    display: block;
}

/* Startmenu - Positioned above taskbar (needs absolute positioning) */
.startmenu {
    position: absolute;
    bottom: var(--taskbar-height);
    left: 0;
    z-index: var(--z-startmenu);
    transform: translateY(100%);
    opacity: 0;
    transition: transform 0.15s ease-out, opacity 0.15s ease-out;
    pointer-events: none;
}

.startmenu[data-state="open"] {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
}

/* Alert Container - Centered overlay within ui-layer */
.alert-container {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: var(--z-alert);
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
}

.alert-container.has-alert {
    pointer-events: auto;
    background: rgba(0, 0, 0, 0.3);
}
