/* Shared by every page. */

.field-validation-error {
  color: var(--bs-danger);
  font-size: .875em;
}

.input-validation-error {
  border-color: var(--bs-danger);
}

/* The short text under a page's heading, beside its buttons. */
.page-intro {
  max-width: 760px;
}

/* Every popup ends the same way: popups.js's footer, with the form's audit note left and Annuleren/Opslaan right. */
.k-window .popup-footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  border-top: 1px solid var(--bs-border-color);
  padding-top: 0.875rem;
}

.k-window .popup-footer .popup-note {
  margin-right: auto;
  font-size: 0.75rem;
  color: var(--bs-secondary-color);
}

/* The example invitation under the conversation type form. */
.invitation-preview {
  background: var(--bs-tertiary-bg);
  border: 1px solid var(--bs-border-color);
  border-radius: var(--bs-border-radius);
  padding: 0.75rem 0.875rem;
  font-size: 0.875rem;
}

.invitation-preview .invitation-preview-title {
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--bs-secondary-color);
}

.invitation-preview .text-pre-line {
  white-space: pre-line;
}

/* Screen 21.3: the list of question sets. The ordered rows below serve 21.3 and 21.4 (wwwroot/js/ordered-list.js). */
.question-set-list {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.question-set-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  min-height: 3.25rem;
  padding: 0.5rem 0.75rem;
  border: 1px solid transparent;
  border-radius: var(--bs-border-radius);
  color: var(--bs-body-color);
  text-decoration: none;
}

.question-set-link:hover {
  background: var(--bs-tertiary-bg);
}

.question-set-link.active {
  background: var(--bs-primary-bg-subtle);
  border-color: var(--bs-primary-border-subtle);
  color: var(--bs-primary-text-emphasis);
}

.ordered-list {
  display: flex;
  flex-direction: column;
  gap: 0.625rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.list-empty {
  padding: 1.5rem 1rem;
  text-align: center;
  color: var(--bs-secondary-color);
  border: 1px dashed var(--bs-border-color);
  border-radius: var(--bs-border-radius);
}

.ordered-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem;
  padding: 0.625rem 0.75rem;
  background: var(--bs-body-bg);
  border: 1px solid var(--bs-border-color);
  border-radius: var(--bs-border-radius);
}

.ordered-row.is-archived {
  background: var(--bs-tertiary-bg);
}

.ordered-row .ordered-row-body {
  display: flex;
  flex: 1 1 20rem;
  flex-direction: column;
  gap: 0.375rem;
  min-width: 0;
}

.ordered-row .ordered-move {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.875rem;
  height: 1.625rem;
  padding: 0;
}

.ordered-drag-handle {
  display: inline-flex;
  align-items: center;
  align-self: stretch;
  padding: 0 0.25rem;
  color: var(--bs-secondary-color);
  cursor: move;
  touch-action: none;
  user-select: none;
}

.ordered-drag-hint {
  box-shadow: var(--bs-box-shadow);
  list-style: none;
}

.ordered-drag-placeholder {
  opacity: 0.4;
}

/* The prototype's pills and tags: a pale fill, a border a step stronger and the text in the colour itself.
   Mixed with the page background and the strongest text colour, so the same classes work in light and dark. */
.status-badge {
  --status-badge-colour: var(--twc-ink-3);
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.125rem 0.625rem;
  font-size: 0.78125rem;
  font-weight: var(--fw-semibold);
  line-height: 1.5;
  white-space: nowrap;
  vertical-align: middle;
  background: color-mix(in srgb, var(--status-badge-colour) 12%, var(--bs-body-bg));
  border: 1px solid color-mix(in srgb, var(--status-badge-colour) 35%, var(--bs-body-bg));
  border-radius: var(--radius-pill);
  color: color-mix(in srgb, var(--status-badge-colour) 60%, var(--bs-emphasis-color));
}

/* A tag: the smaller, squarer label for a note or a missing value, beside a pill for a status or role. */
.status-badge.status-badge-tag {
  padding: 0.0625rem 0.5rem;
  font-size: 0.75rem;
  border-radius: 0.375rem;
}

.status-badge-grey {
  --status-badge-colour: var(--twc-ink-3);
}

.status-badge-blue {
  --status-badge-colour: var(--twc-blue);
}

.status-badge-green {
  --status-badge-colour: var(--twc-success);
}

.status-badge-amber {
  --status-badge-colour: var(--bs-orange);
}

.status-badge-red {
  --status-badge-colour: var(--twc-error);
}

/* Messages in the prototype's colours, the same palette as the status badges (warning amber, not
   Bootstrap's yellow; info the brand blue, not cyan), with the text a shade darker as in the prototype. */
.alert-secondary,
.alert-info,
.alert-success,
.alert-warning,
.alert-danger {
  --bs-alert-bg: color-mix(in srgb, var(--alert-colour) 12%, var(--bs-body-bg));
  --bs-alert-border-color: color-mix(in srgb, var(--alert-colour) 35%, var(--bs-body-bg));
  --bs-alert-color: color-mix(in srgb, var(--alert-colour) 50%, var(--bs-emphasis-color));
  --bs-alert-link-color: var(--bs-alert-color);
}

.alert-secondary {
  --alert-colour: var(--twc-ink-3);
}

.alert-info {
  --alert-colour: var(--twc-blue);
}

.alert-success {
  --alert-colour: var(--twc-success);
}

.alert-warning {
  --alert-colour: var(--bs-orange);
}

.alert-danger {
  --alert-colour: var(--twc-error);
}

/* Screen 21.4: the grid of conversation type × job function, and the preview of a profile's questions. */
.profile-matrix th,
.profile-matrix td {
  padding: 0.375rem 0.5rem;
  vertical-align: middle;
}

.profile-matrix thead th {
  background: var(--bs-tertiary-bg);
  color: var(--bs-secondary-color);
  font-weight: var(--fw-semibold);
  white-space: nowrap;
}

.profile-matrix tbody th {
  font-weight: var(--fw-semibold);
  white-space: nowrap;
}

.profile-cell {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 9rem;
  min-height: 2.75rem;
  padding: 0 0.625rem;
  font-size: 0.875rem;
  color: var(--bs-secondary-color);
  text-decoration: none;
  background: var(--bs-tertiary-bg);
  border: 1px dashed var(--bs-border-color);
  border-radius: var(--bs-border-radius);
}

.profile-cell.has-profile {
  color: var(--bs-body-color);
  background: var(--bs-body-bg);
  border-style: solid;
}

.profile-cell:hover {
  border-color: var(--brand-primary);
}

.profile-cell.active {
  color: var(--bs-primary-text-emphasis);
  font-weight: var(--fw-semibold);
  background: var(--bs-primary-bg-subtle);
  border: 2px solid var(--brand-primary);
}

/* As in the prototype: the dropdown as wide as its options need, at least 280px, the button beside it. */
.profile-link-select {
  width: auto;
  min-width: 17.5rem;
}

.profile-preview {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  padding: 1rem;
  background: var(--bs-tertiary-bg);
  border-top: 1px solid var(--bs-border-color);
  border-radius: 0 0 var(--bs-border-radius) var(--bs-border-radius);
}

.profile-preview-title {
  font-size: 0.6875rem;
  font-weight: var(--fw-semibold);
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--bs-secondary-color);
}

.profile-preview-question {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0.5rem 0.75rem;
  background: var(--bs-body-bg);
  border: 1px solid var(--bs-border-color);
  border-radius: var(--bs-border-radius);
}

/* Screen 21.5: the steps of a new round, the tiles of a round and the fields of its wizard. */
.status-badge-dark {
  --status-badge-colour: var(--twc-ink);
}

.wizard-steps {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.wizard-step {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding-right: 0.5rem;
  color: var(--bs-secondary-color);
}

.wizard-step.is-current {
  color: var(--bs-primary-text-emphasis);
  font-weight: var(--fw-semibold);
}

.wizard-step-dot {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.625rem;
  height: 1.625rem;
  font-size: 0.8125rem;
  font-weight: var(--fw-semibold);
  color: var(--bs-secondary-color);
  background: var(--bs-body-bg);
  border: 1px solid var(--bs-border-color);
  border-radius: var(--radius-pill);
}

.wizard-step.is-done .wizard-step-dot {
  color: var(--bs-primary-text-emphasis);
  background: var(--bs-primary-bg-subtle);
  border-color: var(--bs-primary-border-subtle);
}

.wizard-step.is-current .wizard-step-dot {
  color: var(--text-on-brand);
  background: var(--brand-primary);
  border-color: var(--brand-primary);
}

.round-fields {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr));
  gap: 1rem;
  max-width: 47.5rem;
}

.round-choices {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.25rem;
  padding-left: 1.75rem;
}

.round-choices.round-choices-people {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(15rem, 1fr));
  gap: 0.375rem 1.25rem;
}

.round-tiles {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(10.5rem, 1fr));
  gap: 0.75rem;
}

.round-tile {
  min-width: 12.5rem;
  padding: 0.75rem 1rem;
  background: var(--bs-body-bg);
  border: 1px solid var(--bs-border-color);
  border-radius: var(--bs-border-radius);
}

.round-tiles .round-tile {
  min-width: 0;
}

.round-tile-label {
  font-size: 0.6875rem;
  font-weight: var(--fw-semibold);
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--bs-secondary-color);
}

.round-tile-number {
  font-size: 2rem;
  font-weight: var(--fw-semibold);
  line-height: 2.5rem;
  color: color-mix(in srgb, var(--status-badge-colour) 60%, var(--bs-emphasis-color));
}

/* The start page: the "Te doen" pills, which jump to where each thing can be done, and the counts on the status tabs. */
.start-todo-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  min-height: 2.25rem;
  padding: 0 0.75rem;
  background: var(--bs-body-bg);
  border: 1px solid var(--bs-border-color);
  border-radius: var(--radius-pill);
  color: var(--bs-body-color);
  font-size: 0.875rem;
  text-decoration: none;
}

.start-todo-pill:hover {
  background: var(--bs-tertiary-bg);
  color: var(--bs-body-color);
}

.start-todo-dot {
  flex: none;
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 50%;
}

.start-todo-dot-blue {
  background: var(--twc-blue);
}

.start-todo-dot-amber {
  background: var(--bs-orange);
}

.start-todo-dot-green {
  background: var(--twc-success);
}

.start-todo-dot-red {
  background: var(--twc-error);
}

.start-tab-count {
  display: inline-block;
  min-width: 1.375rem;
  margin-left: 0.5rem;
  padding: 0 0.4375rem;
  background: var(--bs-tertiary-bg);
  border: 1px solid var(--bs-border-color);
  border-radius: var(--radius-pill);
  color: var(--bs-secondary-color);
  font-size: 0.75rem;
  font-weight: var(--fw-semibold);
  text-align: center;
}

.start-tab-count-warn {
  background: color-mix(in srgb, var(--bs-orange) 12%, var(--bs-body-bg));
  border-color: color-mix(in srgb, var(--bs-orange) 35%, var(--bs-body-bg));
  color: color-mix(in srgb, var(--bs-orange) 60%, var(--bs-emphasis-color));
}

.preserve-lines {
  white-space: pre-line;
}

.preparation-unanswered {
  padding-left: 0.75rem;
  border-left: 3px solid var(--bs-orange);
}

.signature-panel {
  min-width: 22.5rem;
}

.signature-image {
  display: block;
  max-width: 22.5rem;
  max-height: 10rem;
  padding: 0.25rem;
  background: white;
  border: 1px solid var(--bs-border-color);
  border-radius: var(--bs-border-radius);
}

.previous-panel {
  --bs-offcanvas-width: min(42rem, 100vw);
}

/* The report's cards: the question set above the question, the average large on the left and the buckets beside it. */
.report-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(26rem, 100%), 1fr));
  gap: 1rem;
}

.report-card-set {
  font-family: var(--bs-font-monospace);
  font-size: 0.6875rem;
  font-weight: var(--fw-semibold);
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--bs-secondary-color);
}

.report-average {
  font-size: 2.5rem;
  font-weight: var(--fw-semibold);
  line-height: 2.75rem;
  color: color-mix(in srgb, var(--twc-blue) 60%, var(--bs-emphasis-color));
}

.report-bar-track {
  flex: 1 1 auto;
  height: 0.875rem;
  overflow: hidden;
  background: var(--bs-tertiary-bg);
  border-radius: 0.1875rem;
}

.report-bar {
  height: 100%;
  background: var(--twc-blue);
}

.report-bar-low {
  background: var(--bs-orange);
}

.report-legend-swatch {
  display: inline-block;
  width: 1.5rem;
  height: 0.5rem;
  border-radius: 0.25rem;
  background: var(--bs-orange);
}

.report-select-round {
  min-width: 20rem;
}

.report-later {
  min-height: 2.375rem;
}

.report-too-few {
  border: 1px dashed var(--bs-border-color);
}

.report-bucket-label {
  width: 2.625rem;
  flex: none;
}

.report-bucket-count {
  width: 1.75rem;
  flex: none;
}
