/* Quick Sale selection and mobile sizing; shared cards come from sc2-tech.css. */
#quickSaleModal .staff-grid-container {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
  padding: 0;
  overflow: hidden;
  background: var(--bs-surface-bg);
}

#quickSaleModal .staff-grid {
  flex: 1;
  align-content: start;
}

#quickSaleModal .staff-card {
  cursor: pointer;
}

#quickSaleModal .staff-card--active {
  outline: 2px solid var(--bs-accent);
  outline-offset: 2px;
}

#quickSaleModal .qs-tech--none {
  border-style: dashed;
}

#quickSaleModal .qs-tech--none .sc2-tech__service {
  height: auto;
  white-space: normal;
  overflow-wrap: anywhere;
}

/* Appended to #quickSaleModal, so it must clear .quicksale-modal-content (z-index 10000). */
#quickSaleModal .sc2-tech__tooltip--floating {
  z-index: 10002;
}

@media (max-width: 767.98px) {
  /* Shared profile cards include activity, last-done and turn rows. Let each
     mobile row contribute to the card height instead of overflowing 70px. */
  #quickSaleModal #lst-staff .staff-grid .sc2-tech--profile {
    grid-template-columns: 44px minmax(0, 1fr) auto;
    grid-template-rows: minmax(22px, auto);
    grid-auto-rows: auto;
    align-content: start;
    align-items: start;
    align-self: start;
    height: max-content;
    min-height: 70px;
    row-gap: 3px;
  }

  #quickSaleModal #lst-staff .staff-grid .sc2-tech__avatar-wrap {
    grid-column: 1;
    grid-row: 1 / 3;
    align-self: start;
  }

  #quickSaleModal #lst-staff .staff-grid .sc2-tech__name {
    grid-column: 2;
    grid-row: 1;
    max-width: 100%;
  }

  #quickSaleModal #lst-staff .staff-grid :is(.sc2-tech__meta, .sc2-tech__service, .sc2-tech__progress, .sc2-tech__last-done) {
    grid-column: 2 / -1;
    grid-row: auto;
    width: 100%;
    max-width: 100%;
    height: auto;
    min-height: 18px;
  }

  #quickSaleModal #lst-staff .staff-grid .sc2-tech__meta {
    flex-wrap: wrap;
  }

  #quickSaleModal #lst-staff .staff-grid .sc2-tech__progress[hidden] {
    display: none !important;
  }

  #quickSaleModal #lst-staff .staff-grid .sc2-tech__tooltip {
    grid-column: 1 / -1;
    grid-row: auto;
  }
}
