/*
  Schedule Visualizer 2: the Staff browser section of the planner
  (ui/staff/index.js): the preview frame on the surface, and the publish form
  and batch printing in the inspector.

    .stf    the surface: the bar above the frame, the stage, the frame
    .pub    the inspector's panel: the passcode, what readers will see and
            Publish a file first, then what is in the file (folded), then
            batch printing

  The frame's own page is the staff browser, styled by staff/staff.css inside
  the frame. Nothing here reaches into it.
*/

.stf {
  display: grid;
  gap: var(--s-4);
  min-width: 0;
}

.stf-facts {
  margin-top: 0;
}

.stf-preview {
  display: grid;
  gap: var(--s-3);
  min-width: 0;
}

.stf-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--s-3) var(--s-5);
}

.stf-bar__control {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--s-2);
}

.stf-bar__label {
  font-weight: var(--w-semibold);
}

.stf-bar__line {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--s-2) var(--s-3);
}

.stf-bar__says {
  margin: 0;
  color: var(--ink-2);
  font-size: var(--t-sm);
  line-height: var(--lh-sm);
}

/* A tick box and its words: the whole line is the target. */
.stf-check {
  display: flex;
  align-items: flex-start;
  gap: var(--s-2);
  min-height: 28px;
  padding: 2px 0;
  cursor: pointer;
}

.stf-check__box {
  flex: none;
  width: 18px;
  height: 18px;
  margin: 3px 0 0;
  accent-color: var(--accent);
}

.stf-check.is-off {
  color: var(--ink-2);
  cursor: default;
}

/* The stage is as wide as the surface allows; the frame is its true size,
   scaled down to fit (preview.js sets the scale and the box it leaves). */
.stf-stage {
  min-width: 0;
  overflow: hidden;
}

.stf-fit {
  position: relative;
  overflow: hidden;
  border: var(--border-width) solid var(--line-strong);
  border-radius: var(--r-2);
  background: var(--card);
}

.stf-stage[data-width="phone"] .stf-fit {
  margin: 0 auto;
}

.stf-frame {
  display: block;
  border: 0;
  transform-origin: 0 0;
  background: var(--card);
}

/* ---------- The inspector's panel ---------- */

.pub {
  display: grid;
  gap: var(--s-4);
  padding: var(--s-4);
  min-width: 0;
}

.pub__heading {
  font-size: var(--t-lg);
  line-height: var(--lh-lg);
  font-weight: var(--w-semibold);
}

.pub__heading--next {
  padding-top: var(--s-4);
  border-top: var(--border);
}

.pub__lead {
  margin: calc(var(--s-2) * -1) 0 0;
  color: var(--ink-2);
  font-size: var(--t-sm);
  line-height: var(--lh-sm);
}

.pub__group {
  display: grid;
  gap: var(--s-2);
  padding-top: var(--s-3);
  border-top: var(--border);
  min-width: 0;
}

.pub__list {
  display: grid;
}

.pub__hint {
  margin: 0;
  color: var(--ink-2);
  font-size: var(--t-sm);
  line-height: var(--lh-sm);
}

.pub__checks {
  display: grid;
  gap: var(--s-2);
  margin: 0;
  padding: 0;
  list-style: none;
}

.pub__checks li {
  padding-left: var(--s-3);
  border-left: 3px solid var(--problem);
  overflow-wrap: anywhere;
}

/* The lines of the project before, while the checks of this one are on their
   way (form.js): still readable, plainly not the last word. */
.pub__checks[aria-busy="true"] {
  opacity: 0.6;
}

/* The views and the map's names, folded under one line that says how many
   views the file holds. */
.pub__fold {
  display: grid;
  gap: var(--s-2);
  padding-top: var(--s-3);
  border-top: var(--border);
  min-width: 0;
}

/* The line is a flex row, which takes the browser's own disclosure triangle
   away: the mark is drawn here, pointing right when folded and down when
   open. */
.pub__fold-title {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: var(--s-1) var(--s-2);
  min-height: 28px;
  cursor: pointer;
  list-style: none;
}

.pub__fold-title::-webkit-details-marker {
  display: none;
}

.pub__fold-title::before {
  content: "";
  flex: none;
  align-self: center;
  width: 0;
  height: 0;
  border-style: solid;
  border-width: 5px 0 5px 7px;
  border-color: transparent transparent transparent var(--ink-2);
}

.pub__fold[open] > .pub__fold-title::before {
  transform: rotate(90deg);
}

.pub__fold-says {
  color: var(--ink-2);
  font-size: var(--t-sm);
  line-height: var(--lh-sm);
}

.pub__fold[open] > .pub__fold-title {
  margin-bottom: var(--s-2);
}

.pub__fold .pub__group:first-of-type {
  padding-top: 0;
  border-top: 0;
}

.pub__publish {
  display: grid;
  gap: var(--s-2);
  justify-items: start;
  padding-top: var(--s-4);
  border-top: var(--border);
}

.pub__says {
  margin: 0;
  font-weight: var(--w-medium);
  overflow-wrap: anywhere;
}

/* A file's name breaks between its words; its day ("2026-10-12.html") is one
   word and goes to the next line whole. */
.pub__file-day {
  white-space: nowrap;
}

/* The passcode a file asks for, exactly as typed. */
.pub__passcode {
  font-weight: var(--w-bold);
  white-space: pre-wrap;
}

.pub__says:empty {
  display: none;
}

.pub__batch {
  display: grid;
  gap: var(--s-2);
  justify-items: start;
}

.pub .btn {
  white-space: normal;
  text-align: left;
}
