/* modules/session/editSessionView.css — the compact workout-setup dialog (participant
   picker, checklists). Extracted from index.css to live next to editSessionView.js. */

#dialog-workout-setup {
  padding: 16px 20px;
}
#dialog-workout-setup .modal-header {
  margin-bottom: 10px;
}
#dialog-workout-setup .dialog-desc {
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 12px;
  line-height: 1.4;
}
#dialog-workout-setup label {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  color: var(--text-muted);
  margin-bottom: 4px;
  display: block;
}
#dialog-workout-setup .form-control {
  padding: 6px 10px;
  font-size: 13px;
  height: 36px;
  background-color: var(--input-bg);
  border: 1px solid var(--border-color);
  color: var(--text-main);
  border-radius: var(--border-radius-sm, 6px);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
#dialog-workout-setup .form-control[list] {
  font-weight: 600;
}
#dialog-workout-setup .form-control:focus {
  border-color: var(--accent-cyan);
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--accent-cyan) 25%, transparent);
  outline: none;
}
/* Who is training. The form shows the people CHOSEN, not the whole client base, so
   this list is short by construction; the search above it is what a trainer with a hundred clients
   actually uses. Touch targets are sized for a thumb, because a wrong tap here books the wrong
   person into the session. */
#dialog-workout-setup .participant-setup-list,
.participant-setup-list {
  max-height: 260px;
  overflow-y: auto;
  padding-right: 2px;
  margin-top: 6px;
}
.participant-picker-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
}
.participant-count {
  font-size: 12px;
  color: var(--text-muted);
  white-space: nowrap;
}
.participant-match-list {
  list-style: none;
  margin: 6px 0 0;
  padding: 4px;
  max-height: 264px;
  overflow-y: auto;
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--border-radius-sm, 6px);
}
/* The offer to add the typed name as a new client looks like a match, and is not one. */
.participant-match,
.participant-add-new {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  min-height: 44px;
  padding: 10px 12px;
  background: transparent;
  border: 0;
  border-radius: var(--border-radius-sm, 6px);
  color: var(--text-main);
  font-size: 14px;
  text-align: left;
  cursor: pointer;
}
.participant-match:hover,
.participant-match:focus-visible,
.participant-add-new:hover,
.participant-add-new:focus-visible {
  background: color-mix(in srgb, var(--primary) 14%, transparent);
}
.participant-add-new {
  color: var(--primary);
  font-weight: 600;
}
.participant-match-empty {
  padding: 10px 12px;
  font-size: 13px;
  color: var(--text-muted);
}
.participant-empty {
  margin: 8px 0 0;
  font-size: 13px;
  color: var(--text-muted);
}
.participant-setup-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 6px;
  padding: 8px 10px;
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--border-radius-sm, 6px);
}
.participant-setup-row:hover {
  border-color: var(--accent-cyan);
}
.participant-name {
  font-size: 14px;
  font-weight: 600;
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.participant-setup-row .select-routine-dropdown {
  flex: 0 1 190px;
  min-width: 0;
  height: 38px;
  font-size: 13px;
  padding: 4px 8px;
}
.participant-remove {
  flex: 0 0 auto;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: 1px solid transparent;
  border-radius: var(--border-radius-sm, 6px);
  color: var(--text-muted);
  font-size: 15px;
  cursor: pointer;
}
.participant-remove:hover,
.participant-remove:focus-visible {
  color: var(--danger);
  border-color: color-mix(in srgb, var(--danger) 40%, transparent);
}
/* One line each on a phone: a name, its programme under it, and the remove button still reachable. */
@media (max-width: 520px) {
  .participant-setup-row {
    flex-wrap: wrap;
  }
  .participant-setup-row .select-routine-dropdown {
    flex: 1 1 100%;
    order: 3;
  }
}

/* Multi-select check checklist inside setup */
.checkbox-checklist {
  max-height: 150px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 10px;
}
.checklist-item {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  font-size: 14px;
  user-select: none;
}
.checklist-item input[type="checkbox"] {
  accent-color: var(--primary);
  width: 16px;
  height: 16px;
  cursor: pointer;
}

/* The repeating slot. Off by default and quiet when off: a one-off session is still
   what a trainer creates most often, so this must not read as a decision they owe an answer to. */
.setup-repeat-toggle {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  cursor: pointer;
}
.setup-repeat-toggle input[type="checkbox"] {
  width: 20px;
  height: 20px;
  flex: 0 0 auto;
}
.setup-repeat-detail {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 8px 0 0;
}
/* Seven targets that have to fit a 390px phone and still be hittable with a thumb: they wrap rather
   than shrink, because a 30px day button is a miss waiting to happen. */
.setup-repeat-days {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.setup-repeat-day {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 40px;
  padding: 0 10px;
  border: 1px solid var(--border-color);
  border-radius: 999px;
  cursor: pointer;
}
.setup-repeat-day input[type="checkbox"] {
  width: 16px;
  height: 16px;
}
/* Which evening is being edited. A statement, not a warning — nothing has gone wrong. */
.setup-occurrence-note {
  padding: 8px 10px;
  border-left: 3px solid var(--primary);
  border-radius: 6px;
  background: var(--primary-light);
  color: var(--text-main);
}
/* Three buttons — discard, save, open — are wider than a phone in Slovenian and German. They wrap
   rather than run off the edge, and the one that opens the clipboard stays last, on the right. */
.setup-actions {
  flex-wrap: wrap;
  /* On the screen while the form scrolls: it opened with Save 116 pixels below a phone screen.
     Clear of the notification bar by the same offset the board's sticky day footer uses
     (sessionsView.css explains the arithmetic), on the card's own glass. */
  position: sticky;
  bottom: calc(-1 * var(--main-content-bottom-gap, 24px));
  z-index: 1;
  padding-bottom: 8px;
  background: var(--card-bg);
  backdrop-filter: var(--glass-blur);
}

/* The "started off schedule" dialog: start and end each carry a row of time buttons, so two side by
   side need 570px. They stand one under the other; min-width 0 lets each shrink to the dialog. */
.form-row.session-start-time-fields {
  flex-direction: column;
  align-items: stretch;
}
.form-row.session-start-time-fields > .form-group {
  min-width: 0;
  width: 100%;
}
/* A session that has started or finished keeps its day and time: the arrows and marks that would
   change them are hidden, the fields stay readable. */
.is-slot-locked .stepped-field-steps,
.is-slot-locked .stepped-field-marks {
  display: none;
}
