/* === TECHNICAL WORKBENCH THEME === */

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    color: #cccccc;
    background-color: #1e1e1e;
}

/* --- UTILITIES --- */
.custom-scrollbar::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}
.custom-scrollbar::-webkit-scrollbar-track {
    background: #1e1e1e; 
}
.custom-scrollbar::-webkit-scrollbar-thumb {
    background: #424242; 
    border: 2px solid #1e1e1e;
    border-radius: 4px;
}
.custom-scrollbar::-webkit-scrollbar-thumb:hover {
    background: #4f4f4f; 
}

/* --- INPUTS & CONTROLS --- */
.tech-input, select, input[type="text"], input[type="number"] {
    background-color: #3c3c3c;
    border: 1px solid #3c3c3c;
    color: #e0e0e0;
    font-family: 'JetBrains Mono', monospace;
    font-size: 11px;
    padding: 4px 6px;
    border-radius: 2px;
    width: 100%;
    outline: none;
    transition: border-color 0.1s;
}

.tech-input:focus, select:focus, input:focus {
    border-color: #007acc; /* VS Code Blue focus */
}

/* Range Slider Styling - Fixed Vendor Prefixes */
input[type=range] {
    -webkit-appearance: none;
    appearance: none; /* Standard Property */
    background: transparent;
}
input[type=range]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none; /* Standard Property */
    height: 12px;
    width: 12px;
    border-radius: 50%;
    background: #007acc;
    cursor: pointer;
    margin-top: -4px; 
}
input[type=range]::-webkit-slider-runnable-track {
    width: 100%;
    height: 4px;
    cursor: pointer;
    background: #424242;
    border-radius: 2px;
}

/* --- LIBRARY ACCORDION --- */
.library-category {
    border-bottom: 1px solid #3e3e3e;
}
.category-header {
    background-color: #252526;
    padding: 6px 12px;
    cursor: pointer;
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    color: #9ca3af;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.category-header:hover {
    background-color: #2d2d2d;
    color: #e0e0e0;
}
.category-content {
    background-color: #1e1e1e;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1px;
    padding: 4px;
}

/* --- TOOL BUTTONS --- */
.tool-btn.active {
    background-color: #37373d;
    color: #60a5fa; 
    border-left: 2px solid #60a5fa;
}

/* --- CANVAS ITEMS --- */
.component-item {
    cursor: grab;
    padding: 6px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    border: 1px solid transparent;
    border-radius: 4px;
    transition: all 0.1s;
}
.component-item:hover {
    background-color: #2d2d2d;
    border-color: #3e3e3e;
}
.component-item:active {
    cursor: grabbing;
    background-color: #007acc;
    color: white;
}
.component-item i {
    margin-bottom: 4px;
    color: #9ca3af;
}
.component-item span {
    font-size: 9px;
    line-height: 1.1;
    color: #9ca3af;
}

/* --- SELECTION HIGHLIGHTS --- */
.device-group.selected .device-shape,
.group-wrapper.selected .group-box,
.wire-node.selected circle {
    stroke: var(--theme-selected-color, #007acc) !important; 
    stroke-width: 3px !important;
    filter: drop-shadow(0 0 4px var(--theme-selected-color-alpha, rgba(0, 122, 204, 0.8)));
}

.device-port:hover {
    stroke: var(--theme-selected-color, #007acc);
    fill: var(--theme-selected-color, #007acc);
}

/* Add a visual indicator for groups */
.group-wrapper.selected .group-box {
    stroke-dasharray: 4,2;
}

/* --- SIGNAL FLOW ANIMATION --- */
@keyframes signal-flow {
    from { stroke-dashoffset: 20; }
    to { stroke-dashoffset: 0; }
}

.cable-highlight {
    stroke: var(--theme-highlight-color, #4ade80) !important;
    stroke-width: 4px !important;
    stroke-dasharray: 8,4;
    animation: signal-flow 1s linear infinite;
    filter: drop-shadow(0 0 4px var(--theme-highlight-color-alpha, rgba(74, 222, 128, 0.6)));
}

.device-highlight .device-shape {
    stroke: var(--theme-highlight-color, #4ade80) !important;
    filter: drop-shadow(0 0 6px var(--theme-highlight-color-alpha, rgba(74, 222, 128, 0.8)));
}

/* --- HIDDEN PANELS --- */
.hidden-panel {
    display: flex !important; 
}