/* ===========================================
   GLOBALS
=========================================== */
html, body {
    margin: 0;
    padding: 0;
    height: 100%;
    background: #0d0f15;
    overflow: hidden;
    font-family: "Segoe UI", Arial, sans-serif;
    color: #e0e0e0;
}

* {
    box-sizing: border-box;
}

/* ===========================================
   LAYOUT STRUCTURE
=========================================== */

#container {
    display: flex;
    height: 100%;
    width: 100%;
    overflow: hidden;
}

/* ===========================================
   LEFT SIDEBAR
=========================================== */

#sidebar {
    width: 340px;
    background: #0f121a;
    border-right: 1px solid #222630;
    padding: 20px;
    overflow-y: auto;
}

#sidebar h1 {
    font-size: 20px;
    margin-top: 0;
    color: #fff;
}

h2 {
    margin-top: 20px;
    font-size: 16px;
    color: #ddd;
}

/* Input fields */

input[type="text"],
input[type="number"],
input[type="file"],
select {
    width: 100%;
    padding: 8px;
    border-radius: 4px;
    background: #1b1f27;
    border: 1px solid #2a2f3a;
    color: #ddd;
    margin-top: 5px;
}

input[type="file"]::-webkit-file-upload-button {
    background: #1a73e8;
    border: none;
    color: white;
    padding: 6px 12px;
    border-radius: 4px;
    cursor: pointer;
}

button {
    cursor: pointer;
}

/* ===========================================
   MAIN VIEW – CENTER CANVAS
=========================================== */

#mainView {
    display: flex;
    flex: 1;
    background: #0d0f15;
    height: 100%;
    overflow: hidden;
}

/* Left: Canvas Area */

#canvasArea {
    flex: 1;
    position: relative;
    background: #000;
}

#pcbCanvas {
    width: 100% !important;
    height: 100% !important;
    display: block;
    background: #000;
}

/* Overlay text */

#infoOverlay {
    position: absolute;
    bottom: 8px;
    left: 10px;
    background: rgba(0,0,0,0.4);
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 13px;
    color: #ccc;
}

/* ===========================================
   RIGHT PANEL – VIEWER CONTROLS
=========================================== */

#rightPanel {
    width: 280px;
    background: #10131a;
    border-left: 1px solid #222630;
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    overflow-y: auto;
}

#rightPanel h3 {
    margin: 0 0 10px 0;
    font-size: 15px;
    font-weight: 600;
    color: #ddd;
}

/* Control buttons */

.panelBtn {
    width: 100%;
    padding: 10px;
    background: #1a73e8;
    border: none;
    color: white;
    font-weight: 600;
    border-radius: 4px;
    cursor: pointer;
    text-align: center;
}

.panelBtn:hover {
    background: #1664c4;
}

/* Checkbox layout */

.chk {
    font-size: 14px;
    color: #ccc;
}

.chk input {
    margin-right: 6px;
}

/* ===========================================
   GCODE + STATUS WINDOW (LEFT SIDEBAR)
=========================================== */

#status {
    width: 100%;
    height: 180px;
    background: #1b1f27;
    margin-top: 10px;
    border: 1px solid #2a2f3a;
    padding: 10px;
    font-size: 12px;
    overflow-y: auto;
    white-space: pre-line;
}

#gcodeOut {
    width: 100%;
    height: 200px;
    margin-top: 10px;
    background: #1b1f27;
    border: 1px solid #2a2f3a;
    padding: 10px;
    color: #ccc;
    font-size: 12px;
}

/* ===========================================
   BUTTONS IN SIDEBAR
=========================================== */

.actionButton {
    width: 100%;
    padding: 10px;
    background: #1a73e8;
    border-radius: 4px;
    border: none;
    margin-top: 10px;
    font-size: 15px;
    font-weight: 600;
    color: white;
}

.actionButton:hover {
    background: #165fc0;
}

.dangerButton {
    width: 100%;
    padding: 10px;
    background: #b71c1c;
    border-radius: 4px;
    border: none;
    margin-top: 10px;
    font-size: 15px;
    font-weight: 600;
    color: white;
}

.dangerButton:hover {
    background: #a31414;
}
