/* hardware.css */

.toolbox {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background-color: #222;
    border-top: 3px solid #444;
    padding: 10px 20px;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    z-index: 100;
    color: #fff;
    font-family: sans-serif;
}

.toolbox h3 {
    margin: 0 0 10px 0;
    font-size: 16px;
    color: #aaa;
}

.tools-container {
    display: flex;
    gap: 30px;
    align-items: center;
}

.multimeter {
    background-color: #f0c000;
    border: 2px solid #b89300;
    border-radius: 8px;
    padding: 10px;
    display: flex;
    flex-direction: column;
    align-items: center;
    color: #000;
    width: 135px;
}

.mm-display {
    background-color: #9cb391;
    width: 100%;
    text-align: right;
    font-family: monospace;
    font-size: 20px;
    padding: 5px;
    box-sizing: border-box;
    border: 1px solid #666;
    margin-bottom: 5px;
}

.mm-mode {
    font-size: 10px;
    font-weight: bold;
    margin-bottom: 10px;
}

.mm-ports {
    display: flex;
    gap: 15px;
}

.mm-pin {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    border: 2px solid #555;
    cursor: pointer;
}

.usb-uart {
    background-color: #b33;
    color: white;
    border-radius: 4px;
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 60px;
    height: auto;
    padding-bottom: 5px;
    cursor: grab;
    user-select: none;
    box-shadow: 2px 2px 5px rgba(0, 0, 0, 0.5);
    z-index: 50;
}

.usb-uart:active {
    cursor: grabbing;
}

.uart-connector {
    background-color: silver;
    color: black;
    font-size: 10px;
    padding: 5px;
    border-radius: 2px 2px 0 0;
    width: 30px;
    height: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.uart-body {
    padding: 10px 0;
    font-size: 12px;
    font-weight: bold;
}

.uart-pins {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 0 5px;
}

.uart-pin {
    width: 8px;
    height: 8px;
    background-color: gold;
    border-radius: 50%;
    cursor: pointer;
    border: 1px solid #860;
}

.probes-selector {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.probes-selector h4 {
    margin: 0;
    font-size: 12px;
}

.wire-colors {
    display: flex;
    gap: 10px;
}

.color-btn {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    cursor: pointer;
    border: 2px solid transparent;
}

.color-btn.active {
    border-color: white;
    box-shadow: 0 0 5px white;
}

.wire-status {
    font-size: 11px;
    color: #888;
    margin-top: 5px;
}

#clear-wires {
    margin-top: 5px;
    padding: 3px 8px;
    background-color: #555;
    color: white;
    border: none;
    border-radius: 3px;
    cursor: pointer;
}

#clear-wires:hover {
    background-color: #777;
}

.usb-port {
    position: absolute;
    left: 20px;
    bottom: -20px;
    width: 40px;
    height: 20px;
    background-color: #000;
    border: 2px solid #555;
    border-top: none;
    display: flex;
    justify-content: center;
    align-items: center;
    color: #666;
    font-size: 10px;
}

.usb-port.drag-over {
    border-color: #0f0;
    background-color: #131;
}

#wire-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    pointer-events: none;
    z-index: 1000;
}

.pin {
    position: relative;
    cursor: pointer;
    transition: transform 0.1s, box-shadow 0.1s;
}

.pin:hover {
    transform: scale(1.5);
    box-shadow: 0 0 5px white;
    z-index: 1000;
}

.pin.selected {
    box-shadow: 0 0 8px cyan;
    border-color: cyan;
}