/* Work area: work orders, the schedule, recurring work, todos, notes and vendor orders.
   Builds on tasktracker.css; only what that stylesheet doesn't already draw. */

.assign-chip:has(input:checked) {
  border-color: var(--carbon);
  background: var(--carbon-wash);
}

.sheet-work {
  border-top-color: var(--carbon);
}

.checklist form {
  margin: 0;
}

.visit-list .button_to,
.visit-actions form {
  display: inline;
  margin: 0;
}

.page-actions form.button_to {
  display: inline-flex;
}

/* ----- schedule: FullCalendar drawn like the paper board */

.schedule-tools {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 10px;
  color: var(--ink-3);
  font-size: 13px;
}

.schedule-tools .input {
  width: auto;
}

/* The picker that replaces these selects copies their width, so leave room for the
   arrow beside the longest choice. */
#dispatch-slot {
  min-width: 140px;
}

#dispatch-layout {
  min-width: 190px;
}

.schedule-tools .muted {
  margin-left: auto;
}

.unscheduled h2 {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 17px;
}

.unscheduled .backlog-item {
  cursor: grab;
  text-align: left;
}

.tt-board {
  --fc-border-color: var(--steel-2);
  --fc-today-bg-color: #fffbe0;
  --fc-now-indicator-color: var(--danger, #c0392b);
  --fc-non-business-color: rgb(91 106 111 / 0.07);
  min-width: 640px;
  font-size: 13px;
}

.tt-board .fc-theme-classic,
.tt-board .fc {
  border: 0;
}

.tt-board .tt-card {
  --who: var(--carbon);
  --fc-event-color: color-mix(in srgb, var(--who) 13%, white);
  --fc-event-contrast-color: var(--ink);
  overflow: hidden;
  margin: 1px 2px;
  padding: 3px 6px 3px 7px;
  border: 0;
  border-left: 3px solid var(--who);
  border-radius: 3px;
  background: color-mix(in srgb, var(--who) 13%, white);
  color: var(--ink);
  line-height: 1.25;
  cursor: pointer;
}

.tt-board .tt-card > * {
  color: inherit;
}

.tt-card-body {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.tt-card-body > * {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tt-card-time {
  color: var(--ink-3);
  font-size: 12px;
}

.tt-card-body small {
  color: var(--ink-3);
}

.tt-board .tt-card.tt-completed {
  background-image: repeating-linear-gradient(135deg, transparent 0 6px, rgb(255 255 255 / 0.55) 6px 12px);
}

.tt-board .tt-card.tt-event {
  background: #fff6cc;
  border-left-style: dashed;
}

.tt-board .tt-month {
  display: block;
  padding: 1px 5px;
}

.tt-board .tt-month .tt-card-body {
  flex-direction: row;
  gap: 4px;
}

.tt-board .tt-month .tt-card-time {
  flex: none;
  overflow: visible;
}

.tt-board .tt-month .tt-card-body strong {
  font-weight: 500;
}

.dispatch-resource {
  padding: 4px 2px;
  line-height: 1.25;
}

.dispatch-resource-name {
  font-weight: 600;
}

.dispatch-resource-hours,
.dispatch-resource-sync {
  color: var(--ink-3);
  font-size: 12px;
}

.dispatch-resource-overtime,
.dispatch-resource-sync-stale {
  color: var(--warn);
}

.dispatch-results {
  max-height: 200px;
  margin: 6px 0 0;
  padding: 0;
  overflow-y: auto;
  list-style: none;
}

.dispatch-results button {
  width: 100%;
  padding: 6px 8px;
  border: 0;
  border-radius: var(--radius-sm);
  background: none;
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.dispatch-results button:hover {
  background: var(--steel);
}
