/* Enclosure, Slicer: the shell open in a slicer, in the tools' dark window: print settings, the preview with its layer
   slider, and the feature types with the estimate. */

.sl .sc-main { grid-template-columns: 214px minmax(0, 1fr) 232px; }
.sl .sc-run { margin-inline-start: auto; }
.sl .sc-run:disabled { opacity: .6; cursor: default; }
.sl-set {
  min-inline-size: 0;
  overflow-y: auto;
  padding-block: var(--space-3);
  padding-inline: var(--space-3-5);
  border-inline-end: 1px solid var(--tool-line);
  background: var(--tool-panel);
  scrollbar-width: thin;
}
.sl-set dl {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: var(--space-2-5);
  margin: 0;
  font-size: var(--text-xs);
}
.sl-set dl > div { display: contents; }
.sl-set dt { color: var(--tool-muted); }
.sl-set dd {
  margin: 0;
  text-align: end;
  font-family: var(--mono);
  font-size: var(--text-2xs);
  font-weight: var(--weight-medium);
  line-height: var(--leading-snug);
}
.sl-set select {
  padding: var(--space-1-5);
  border: 1px solid var(--tool-line);
  border-radius: var(--r-sm);
  background: var(--tool-raise);
  color: var(--code-var);
  font-family: var(--mono);
  font-size: var(--text-xs);
  font-weight: var(--weight-medium);
  line-height: var(--leading-tight);
  cursor: pointer;
}
.sl-set select:focus-visible, .sl-range:focus-visible { outline: 2px solid var(--tool-top); outline-offset: 2px; }
.sl-set .sl-in input { inline-size: 36px; }

/* A number field with its unit, a label on the viewport, and the dark viewport the print turns in */
.sl-in {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--tool-line);
  border-radius: var(--r-sm);
  background: var(--tool-raise);
}
.sl-in:hover { border-color: var(--tool-muted); }
.sl-in:focus-within { outline: 2px solid var(--tool-top); outline-offset: -2px; }
.sl-in input {
  inline-size: 68px;
  padding-block: var(--space-2);
  padding-inline: var(--space-2) var(--space-0-5);
  border: 0;
  background: none;
  color: var(--code-var);
  font-family: var(--mono);
  font-size: var(--text-xs);
  font-weight: var(--weight-medium);
  line-height: var(--leading-none);
  text-align: end;
  outline: 0;
}
.sl-in span {
  min-inline-size: 3ch;
  padding-inline-end: var(--space-2);
  color: var(--tool-muted);
  font-family: var(--mono);
  font-size: var(--text-2xs);
  font-weight: var(--weight-medium);
  line-height: var(--leading-none);
}
.sl-vlabel {
  position: absolute;
  z-index: 1;
  inset-block-start: var(--space-2-5);
  inset-inline-start: var(--space-3);
  margin: 0;
  font-family: var(--mono);
  font-size: var(--text-2xs);
  font-weight: var(--weight-medium);
  line-height: var(--leading-none);
  color: var(--tool-muted);
  pointer-events: none;
}
.sl-view { background: radial-gradient(110% 90% at 50% 35%, var(--tool-glow), var(--tool-bg)); }
.sl-view .l3-msg, .sl-view .l3-hint { color: var(--tool-muted); }
.sl-view .l3-msg.err { color: var(--tool-ko); }

/* The layer slider, standing at the viewport's end: the last layer shown on top, layer 1 at the foot */
.sl-slider {
  position: absolute;
  z-index: 1;
  inset-block: var(--space-10);
  inset-inline-end: var(--space-3);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-1-5);
  color: var(--tool-muted);
  font-family: var(--mono);
  font-size: var(--text-2xs);
  font-weight: var(--weight-medium);
  line-height: var(--leading-none);
}
.sl-top {
  min-inline-size: 4.5ch;
  padding-block: var(--space-1);
  padding-inline: var(--space-1-5);
  border-radius: var(--r-xs);
  background: var(--tool-raise);
  color: var(--code-var);
  text-align: center;
  font-variant-numeric: tabular-nums;
}
.sl-range {
  flex: 1;
  min-block-size: 0;
  inline-size: 22px;
  margin: 0;
  writing-mode: vertical-lr;
  direction: rtl;
  accent-color: var(--tool-top);
  cursor: ns-resize;
}

/* Feature types, each with its share of the print time, then the estimate */
.sl-types { padding: 0; border: 0; background: none; }
.sl-types label b {
  margin-inline-start: auto;
  color: var(--tool-muted);
  font-family: var(--mono);
  font-size: var(--text-2xs);
  font-weight: var(--weight-medium);
  line-height: var(--leading-none);
}
.sl-est { margin-block-start: var(--space-4); padding-block-start: var(--space-3-5); border-block-start: 1px solid var(--tool-line); }
.sl-stats {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: var(--space-2) var(--space-3);
  margin: 0;
  font-size: var(--text-xs);
}
.sl-stats dt { color: var(--tool-muted); }
.sl-stats dd {
  margin: 0;
  text-align: end;
  font-family: var(--mono);
  font-size: var(--text-2xs);
  font-weight: var(--weight-medium);
  line-height: var(--leading-snug);
}

/* A narrow slicer: the two settings in a row over the viewport, the feature types and estimate under it, and the layer
   number alone in the status line */
.sl.compact .sl-set { border: 0; border-block-end: 1px solid var(--tool-line); }
.sl.compact .sl-set .sc-h, .sl.compact .sl-set .sl-fixed, .sl.compact .sl-noz, .sl.compact .sl-z, .sl.compact .sc-lights { display: none; }
.sl.compact .sl-set dl { grid-template-columns: auto auto auto auto; justify-content: space-between; }
.sl.compact .sl-view { aspect-ratio: 4 / 3; }
.sl.compact .sl-types { padding: 0; border: 0; }
