/* ==========================================================================
   #414 - Move cards by scan time. Scoped to #modalScanMove throughout.
   ========================================================================== */

#modalScanMove .scanmove-lede {
  margin: 0 0 12px;
  line-height: 1.45;
  opacity: 0.85;
}

#modalScanMove h4 {
  margin: 14px 0 6px;
  font-size: 1em;
}

#modalScanMove .scanmove-sessions {
  display: flex;
  flex-direction: column;
  gap: 4px;
  max-height: 22vh;
  overflow-y: auto;
}

#modalScanMove .scanmove-session {
  text-align: left;
  padding: 6px 10px;
  border-radius: 6px;
  border: 1px solid rgba(128, 128, 128, 0.45);
  background: transparent;
  color: inherit;
  cursor: pointer;
  font: inherit;
}

#modalScanMove .scanmove-session.is-picked {
  border-color: #e0a83a;
  background: rgba(224, 168, 58, 0.18);
  font-weight: 600;
}

#modalScanMove .scanmove-range {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
  align-items: center;
}

#modalScanMove .scanmove-range input {
  font: inherit;
}

#modalScanMove .scanmove-cards {
  max-height: 30vh;
  overflow-y: auto;
  border: 1px solid rgba(128, 128, 128, 0.35);
  border-radius: 6px;
}

#modalScanMove table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9em;
}

#modalScanMove td {
  padding: 3px 6px;
  border-bottom: 1px solid rgba(128, 128, 128, 0.2);
  vertical-align: middle;
}

#modalScanMove td.scanmove-group {
  background: rgba(224, 168, 58, 0.12);
  font-weight: 600;
}

#modalScanMove td.scanmove-time {
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

#modalScanMove td.scanmove-edge {
  white-space: nowrap;
  text-align: right;
}

#modalScanMove td.scanmove-edge button {
  font-size: 0.85em;
  padding: 1px 6px;
  margin-left: 4px;
}

#modalScanMove .scanmove-note {
  font-size: 0.88em;
  opacity: 0.8;
  margin: 6px 0 0;
  line-height: 1.4;
}

#modalScanMove .scanmove-warn {
  color: #b3541e;
  margin: 8px 0 0;
  line-height: 1.4;
}

#modalScanMove .scanmove-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  justify-content: flex-end;
  margin-top: 14px;
}

#modalScanMove .scanmove-actions select {
  max-width: 260px;
  font: inherit;
}

@media (prefers-color-scheme: dark) {
  #modalScanMove .scanmove-warn { color: #f0a868; }
}

@media (max-width: 600px) {
  #modalScanMove td.scanmove-set,
  #modalScanMove td.scanmove-storage { display: none; }
}

/* The site's global rules do not suit this table or these inputs, and they are
   overridden here rather than changed at the source - they are relied on elsewhere:
     table { table-layout: fixed }   gave every column the same width, so names overlapped
     td    { white-space: nowrap }   stopped a long card name from wrapping
     input { width: 100% }           stretched each date box over its neighbour's label */
#modalScanMove table {
  table-layout: auto;
}

#modalScanMove td {
  white-space: normal;
  overflow-wrap: anywhere;
}

#modalScanMove td.scanmove-time,
#modalScanMove td.scanmove-edge {
  white-space: nowrap;
  width: 1%;
}

#modalScanMove .scanmove-range label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

#modalScanMove .scanmove-range input {
  width: auto;
}

#modalScanMove .scanmove-actions button,
#modalScanMove .scanmove-actions select {
  width: auto;
  flex: 0 0 auto;
  margin: 0;
}
