/* SGE / SLURM scheduler toggle; see javascripts/scheduler.js.
 *
 * Any element carrying data-sched="sge" or data-sched="slurm" is shown only
 * when that scheduler is selected. Every toggle on the page is synchronised,
 * so a reader can never end up copying an SGE script with a SLURM submit
 * command. */

[data-sched][hidden] {
  display: none !important;
}

.sched-toggle {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 4px;
  font-size: 80%;
}

.sched-toggle-label {
  color: #6a6a6a;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.sched-toggle-group {
  display: inline-flex;
  border: 1px solid #2980b9;
  border-radius: 3px;
  overflow: hidden;
}

.sched-toggle-group button {
  padding: 2px 10px;
  border: 0;
  background: #fff;
  color: #2980b9;
  font-family: inherit;
  font-size: 11px;
  font-weight: 700;
  line-height: 1.6;
  cursor: pointer;
}

.sched-toggle-group button + button {
  border-left: 1px solid #2980b9;
}

.sched-toggle-group button:hover {
  background: #eaf3f9;
}

/* The selected scheduler. aria-pressed carries the same state for assistive
   tech, so this is presentation only. */
.sched-toggle-group button[aria-pressed="true"] {
  background: #2980b9;
  color: #fff;
}

.sched-toggle-group button:focus-visible {
  outline: 2px solid #2980b9;
  outline-offset: -2px;
}

/* Printing has no interactive toggle, so show the scheduler that was on
   screen and drop the control itself. */
@media print {
  .sched-toggle { display: none; }
}
