/* Schedule window: the on, off and cycle settings of a pump, syringe or valve,
   with their number boxes, the cycles slider and the summary sentence
   (js/ui/scheduleWindow.js). */

.scheduleFields {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px 10px;
  margin-top: 8px
}

#scheduleWindow .scheduleFields>label:not(.checkboxLabel) {
  display: flex;
  flex-direction: column;
  gap: 2px;
  font-size: 12px;
  color: var(--mutedText)
}

#scheduleWindow .scheduleFields>label span {
  display: flex;
  align-items: center;
  gap: 4px;
  color: var(--text);
  font-size: 13px
}

.scheduleFields input[type=number] {
  width: 100%;
  min-width: 0;
  padding: 4px 6px;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: var(--bg);
  color: var(--text);
  font: 13px Inter, sans-serif
}

/* A seconds field: the box holds the number and its "s" right after it. */
#scheduleWindow .scheduleFields .unitField {
  display: flex;
  align-items: center;
  gap: 2px;
  width: 100%;
  box-sizing: border-box;
  padding: 4px 6px;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: var(--bg);
  cursor: text
}

#scheduleWindow .scheduleFields .unitField:focus-within {
  border-color: var(--accent)
}

.scheduleFields .unitField input[type=number] {
  width: auto;
  min-width: 1ch;
  padding: 0;
  border: 0;
  background: none;
  outline: none;
  -moz-appearance: textfield;
  appearance: textfield
}

.scheduleFields .unitField input::-webkit-inner-spin-button,
.scheduleFields .unitField input::-webkit-outer-spin-button {
  -webkit-appearance: none;
  margin: 0
}

#scheduleWindow .scheduleFields .unitField .unitLabel {
  color: var(--mutedText)
}

.scheduleFields input:disabled {
  opacity: .45
}

.scheduleFields .cyclesSlider,
.scheduleFields .scheduleSummary {
  grid-column: 1/-1
}

/* The settings in a sentence, under the slider */
.scheduleFields .scheduleSummary {
  margin: 2px 0 0
}

/* Cycles slider with its scale (1, 20, ∞) underneath */
#scheduleWindow .scheduleFields .cyclesWrap {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0;
  min-width: 0
}

#scheduleWindow .scheduleFields .cyclesScale i.scaleStart {
  left: 0;
  transform: none
}

#scheduleWindow .scheduleFields .cyclesScale i.scaleEnd {
  left: auto;
  right: 0;
  transform: none
}

#scheduleWindow .scheduleFields .cyclesScale {
  display: block;
  position: relative;
  height: 14px;
  font-size: 11px;
  color: var(--mutedText)
}

.scheduleFields .cyclesScale i {
  position: absolute;
  top: 0;
  transform: translateX(-50%);
  font-style: normal;
  line-height: 14px
}

.scheduleFields output {
  align-self: flex-start;
  line-height: 24px
}

.scheduleFields input[type=range] {
  width: 100%;
  margin: 0;
  height: 24px;
  accent-color: #3b8bd4;
  cursor: pointer
}

.scheduleFields output {
  min-width: 22px;
  text-align: right;
  font-variant-numeric: tabular-nums
}

.scheduleNote {
  margin: 8px 0 0;
  font-size: 12.5px;
  color: var(--mutedText);
  line-height: 1.45
}

.scheduleButtonsRow {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: 8px;
  font-size: 12.5px;
  color: var(--mutedText)
}

/* Buttons together at the right */
.scheduleButtons .btn[hidden] {
  display: none
}

.scheduleButtons {
  display: flex;
  gap: 8px;
  margin-left: auto
}

.scheduleButtonsRow .btn {
  min-height: 28px;
  font-size: 12.5px;
  padding: 0 10px
}

/* Narrower than View settings */
#scheduleWindow {
  width: 240px
}
