/* Panel Designer specific styles */

.designer-grid {
    display: grid;
    grid-template-columns: 350px 1fr 350px;
    gap: 20px;
    height: calc(100vh - 140px);
    /* Fill remaining height */
    min-height: 600px;
    padding: 20px 100px;
    /* Margin from edges */
    box-sizing: border-box;
}

.panel-col {
    display: flex;
    flex-direction: column;
    gap: 16px;
    overflow-y: auto;
}

/* Card overrides for inner panels */
.inner-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    position: relative;
    /* For absolute positioning if needed */
}

/* Fix excessive top space in cards */
.inner-card h3 {
    margin-top: 0;
    margin-bottom: 0;
    /* Let flex gap handle spacing */
    font-size: 16px;
    font-weight: 600;
}

/* Fix Number Input Arrows (Dark Theme) */
input[type="number"] {
    color-scheme: dark;
}

/* Canvas Container */
.canvas-container {
    flex: 1;
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    overflow: hidden;
    /* Scroll inside if needed, or stick to canvas zoom */
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
}

canvas#panelCanvas {
    background-color: transparent;
    /* Shadow removed as requested */
}

/* Component Table */
.comp-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0 4px;
}

.comp-table th {
    text-align: left;
    font-size: 12px;
    text-transform: uppercase;
    opacity: 0.7;
    padding: 0 8px 8px 8px;
}

.comp-table td {
    padding: 0;
}

.comp-row {
    background: rgba(255, 255, 255, 0.04);
    border-radius: 6px;
    transition: background 0.2s;
}

.comp-row:hover {
    background: rgba(255, 255, 255, 0.08);
}

.comp-row.selected {
    background: rgba(74, 168, 181, 0.15);
    border: 1px solid rgba(74, 168, 181, 0.3);
}

.comp-row input,
.comp-row select {
    background: transparent;
    border: none;
    color: var(--text);
    width: 100%;
    padding: 8px;
    font-family: inherit;
}

.comp-row input:focus,
.comp-row select:focus {
    outline: none;
    background: rgba(0, 0, 0, 0.2);
}

/* Fix dropdown options */
.comp-row select option,
select.calc-input option {
    background-color: #1e242c;
    color: #eaf1f6;
    padding: 10px;
}

/* Small Action Buttons */
.btn-icon-sm {
    width: 28px;
    height: 28px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    color: var(--text);
    opacity: 0.7;
    cursor: pointer;
    background: transparent;
    border: none;
}

.btn-icon-sm:hover {
    background: rgba(255, 255, 255, 0.1);
    opacity: 1;
}

/* Separator styling in table */
.row-separator td {
    padding: 0;
}

.sep-line {
    height: 2px;
    background: rgba(255, 255, 255, 0.2);
    width: 100%;
    border-radius: 2px;
}

/* Settings Inputs */
.setting-group {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    align-items: center;
}

.setting-row {
    margin-bottom: 12px;
}

.setting-label {
    font-size: 12px;
    opacity: 0.7;
    margin-bottom: 4px;
    display: block;
}

/* Range Slider */
input[type=range] {
    width: 100%;
    accent-color: var(--accent);
}

/* Responsive */
@media (max-width: 1100px) {
    .designer-grid {
        grid-template-columns: 1fr;
        height: auto;
    }

    .canvas-container {
        height: 600px;
    }
}

/* Drag & Drop Visuals */
.comp-row.dragging {
    opacity: 0.5;
    background: rgba(255, 255, 255, 0.1);
}

.comp-row.drag-over {
    /* Visual cue for drop target */
    border-top: 2px solid var(--accent, #4aa8b5);
    background: rgba(74, 168, 181, 0.1);
}

.col-handle {
    user-select: none;
    transition: color 0.2s, background 0.2s;
    border-radius: 4px;
}

.col-handle:hover {
    color: var(--text, #fff);
    background: rgba(255, 255, 255, 0.05);
}