/* v30.10: material layer entries use the same compact card treatment as Script Node entries. */
#node-properties .material-layer-property {
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-width: 0;
  padding: 12px;
  margin: 12px 0;
  border: 1px solid var(--line, #394653);
  border-radius: 8px;
  background: rgba(255,255,255,.025);
  box-sizing: border-box;
}
#node-properties .material-layer-property > span:first-child {
  font-size: 12px;
  font-weight: 600;
}
#node-properties .material-layer-property > input:not([type="color"]):not([type="file"]),
#node-properties .material-layer-property > label,
#node-properties .material-layer-property > button {
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
}
#node-properties .material-layer-property > label {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
#node-properties .material-layer-property > input[type="file"] { max-width: 100%; min-width: 0; }
#node-properties .material-layer-property > input[type="color"] { align-self: flex-start; }

/* v30.11: consistent material cards, field captions and compact remove action. */
#node-properties .material-layer-header {
  display:flex; justify-content:space-between; align-items:center; gap:8px;
}
#node-properties .material-layer-header strong { font-size:12px; font-weight:600; }
#node-properties .material-layer-header .material-layer-remove {
  width:28px; min-width:28px; height:28px; padding:2px 7px;
  flex:none; box-sizing:border-box;
}
#node-properties .material-layer-field {
  display:flex; flex-direction:column; gap:6px; min-width:0; font-size:12px;
}
#node-properties .material-layer-field > span:first-child { opacity:.75; }
#node-properties .material-layer-field > input:not([type="color"]),
#node-properties .material-layer-field > select { width:100%; min-width:0; box-sizing:border-box; }
#node-properties .material-layer-field > input[type="color"] { max-width:100%; }
#node-properties .material-layer-section {display:grid;gap:8px;min-width:0;}
#node-properties .material-layer-section + .material-layer-section {padding-top:10px;border-top:1px solid color-mix(in srgb,var(--line,#394653) 75%,transparent);}
#node-properties .material-layer-section-title {font-size:10px;font-weight:700;letter-spacing:.06em;text-transform:uppercase;opacity:.62;}

/* v30.12: Script resolution number field precedes slider, as in standard nodes. */
#node-properties .script-resolution-controls input[type=number] { width:76px; min-width:0; flex:none; box-sizing:border-box; }

/* Material Mask: compact, left-aligned channel selection. */
#node-properties [data-material-channels] .material-channel-option {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 8px;
  min-width: 0;
  min-height: 24px;
  cursor: pointer;
}
#node-properties [data-material-channels] .material-channel-option > input[type="checkbox"] {
  width: auto;
  flex: none;
  margin: 0;
}
#node-properties [data-material-channels] .material-channel-option > span {
  flex: 1 1 auto;
  min-width: 0;
  text-align: left;
  overflow-wrap: anywhere;
}
