/* Drawer designer - scoped under .p3d-drawer, themed via the tokens in style.css. */
.p3d-drawer { --_line: var(--p3d-line, #d8dce1); --_accent: var(--p3d-accent, #b96e0e); --_muted: var(--p3d-muted, #5b6672); }

.p3d-dims { display: flex; gap: 24px; flex-wrap: wrap; margin-bottom: 24px; }
.p3d-dims label > span:first-child {
  display: block; font-size: 12px; text-transform: uppercase;
  letter-spacing: .08em; color: var(--_muted); margin-bottom: 8px;
}
.p3d-dim-inputs { display: inline-flex; align-items: center; gap: 8px; }
.p3d-drawer input[type="number"] { width: 6em; font-variant-numeric: tabular-nums; }
.p3d-checkbox-row { display: inline-flex; align-items: center; gap: 8px; }
.p3d-drawer input[type="checkbox"] { width: 16px; height: 16px; accent-color: var(--_accent); }

.p3d-layouts { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 20px; }
@media (max-width: 780px) { .p3d-layouts { grid-template-columns: repeat(2, 1fr); } }

.p3d-layout {
  display: flex; flex-direction: column; gap: 8px; text-align: left;
  padding: 14px; border: 1px solid var(--_line); border-radius: 4px;
  background: transparent; cursor: pointer; color: inherit; font: inherit;
}
.p3d-layout:hover { border-color: var(--_accent); }
.p3d-layout[aria-pressed="true"] {
  border-color: var(--_accent);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--_accent) 28%, transparent);
}
.p3d-layout strong { font-size: 15px; }
.p3d-layout small { font-size: 12px; color: var(--_muted); }

.p3d-preview {
  display: grid; gap: 3px; padding: 3px; border-radius: 2px; width: 100%;
  background: var(--p3d-wall, var(--_accent));
}
.p3d-preview i { display: block; background: var(--p3d-surface-2, #e9ebee); border-radius: 1px; min-height: 8px; }

.p3d-quote { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.p3d-price { font-size: 26px; font-weight: 700; font-variant-numeric: tabular-nums; }

/* custom layout editor */
.p3d-editor { margin: 4px 0 20px; }
.p3d-editor-tools { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 12px; }
.p3d-editor-tools button {
  font: inherit; font-size: 13.5px; padding: 7px 14px; cursor: pointer;
  border: 1px solid var(--_line); border-radius: 3px; background: transparent; color: inherit;
}
.p3d-editor-tools button:hover:not(:disabled) { border-color: var(--_accent); }
.p3d-editor-tools button:disabled { opacity: .45; cursor: default; }
.p3d-editor-hint { font-size: 13px; color: var(--_muted); }

.p3d-editor-canvas {
  width: 100%; padding: 4px; border-radius: 3px;
  background: var(--p3d-wall, var(--_accent)); display: flex;
}
.p3d-node { display: flex; flex: 1; min-width: 0; min-height: 0; }
.p3d-node.p3d-v { flex-direction: row; }
.p3d-node.p3d-h { flex-direction: column; }
.p3d-cell {
  flex: 1; min-width: 0; min-height: 0; cursor: pointer;
  background: var(--p3d-surface-2, #e9ebee); border-radius: 1px;
}
.p3d-cell.p3d-sel { box-shadow: inset 0 0 0 3px var(--p3d-accent-bright, #e58e1a); }
.p3d-node.p3d-v > .p3d-divider { width: 4px; cursor: col-resize; }
.p3d-node.p3d-h > .p3d-divider { height: 4px; cursor: row-resize; }
.p3d-divider { touch-action: none; }

/* filament color swatches */
.p3d-colors { display: inline-flex; flex-wrap: wrap; gap: 9px; align-items: center; }
.p3d-color {
  width: 26px; height: 26px; border-radius: 50%; padding: 0; cursor: pointer;
  border: 2px solid var(--_line);
}
.p3d-color[aria-pressed="true"] {
  border-color: var(--_accent);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--_accent) 30%, transparent);
}

/* live size labels inside editor cells */
.p3d-cell { position: relative; overflow: hidden; }
.p3d-cell-label {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  font-size: 11px; font-variant-numeric: tabular-nums; color: var(--_muted);
  pointer-events: none; white-space: nowrap;
}
