/* Shared group-action UI. Business rules are in req/sa_bulk*.req. */
.sa-bulk-panel {
  position: fixed;
  right: 24px;
  bottom: 22px;
  width: 300px;
  z-index: 35;
  background: #234dda;
  color: #fff;
  border-radius: 16px;
  box-shadow: 0 12px 42px #17378138;
  padding: 12px;
  animation: sa-bulk-appear 0.15s ease-out;
}
.sa-bulk-panel header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 4px 8px;
  font-size: 13px;
}
.sa-bulk-panel header button {
  border: 0;
  background: none;
  color: #fff;
  font-size: 25px;
  line-height: 28px;
  width: 32px;
  border-radius: 6px;
}
.sa-bulk-tools {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 5px;
}
.sa-bulk-tools button {
  border: 1px solid #ffffff26;
  background: #ffffff10;
  color: #fff;
  min-height: 64px;
  border-radius: 9px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  align-items: center;
  justify-content: center;
  padding: 7px 2px;
  font-size: 10px;
}
.sa-bulk-tools button:hover,
.sa-bulk-tools button:focus-visible {
  background: #ffffff30;
  outline: 2px solid #fff;
  outline-offset: -2px;
}
.sa-bulk-tools svg {
  width: 21px;
  height: 21px;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.sa-bulk-panel p {
  font-size: 10px;
  line-height: 1.4;
  opacity: 0.8;
  margin: 9px 4px 0;
}
body.sa-has-selection .sa-catalog-results {
  padding-bottom: 230px;
}
.sa-dialog:has(.sa-bulk-steps) {
  width: min(940px, calc(100vw - 30px));
}
.sa-bulk-steps {
  display: flex;
  gap: 20px;
  font-size: 12px;
  color: #8b98ad;
  flex-wrap: wrap;
  border-bottom: 1px solid #e7ecf5;
  padding-bottom: 15px;
}
.sa-bulk-steps strong {
  color: #3154da;
}
.sa-bulk-intro {
  font-size: 16px;
  font-weight: 600;
  margin: 20px 0;
}
.sa-bulk-note {
  font-size: 12px;
  line-height: 1.6;
  color: #6d7c92;
}
.sa-bulk-notes {
  background: #f0f4ff;
  padding: 10px 14px;
  border-radius: 9px;
  margin: 12px 0;
}
.sa-bulk-notes p {
  font-size: 12px;
  line-height: 1.6;
  margin: 4px 0;
}
.sa-bulk-preview {
  max-height: 46dvh;
  overflow: auto;
  border: 1px solid #e8edf4;
  border-radius: 9px;
  scrollbar-width: thin;
}
.sa-bulk-preview table {
  width: 100%;
  table-layout: fixed;
  font-size: 12px;
}
.sa-bulk-preview thead {
  position: sticky;
  top: 0;
  background: #f6f8fc;
}
.sa-bulk-preview th,
.sa-bulk-preview td {
  padding: 12px;
  border-bottom: 1px solid #e8edf4;
  vertical-align: top;
  overflow-wrap: anywhere;
}
.sa-bulk-preview th {
  font-weight: 500;
}
.sa-bulk-preview small {
  display: block;
  margin-top: 5px;
  color: #8390a4;
}
.sa-bulk-preview img {
  width: 50px;
  height: 50px;
  object-fit: contain;
  border: 1px solid #e4eaf4;
  border-radius: 5px;
  margin: 2px;
  background: #fff;
}
.sa-bulk-value {
  white-space: pre-wrap;
  display: block;
  max-height: 180px;
  overflow: auto;
}
.sa-bulk-status {
  padding: 10px 0;
}
.sa-bulk-status-symbol {
  display: inline-flex;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: #eef3ff;
  color: #3154da;
  font-size: 26px;
  align-items: center;
  justify-content: center;
  margin-bottom: 12px;
}
.sa-bulk-status h3 {
  font-size: 20px;
}
.sa-bulk-choice {
  display: inline-flex;
  gap: 8px;
  margin: 6px 16px 6px 0;
}
.sa-bulk-recent {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  align-items: center;
  padding: 12px 16px;
  border: 1px solid #dde7ff;
  border-radius: 9px;
  background: #f5f8ff;
  margin-bottom: 16px;
  font-size: 12px;
}
@keyframes sa-bulk-appear {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
@media (max-width: 680px) {
  .sa-bulk-panel {
    right: 12px;
    bottom: 12px;
    width: min(300px, calc(100vw - 82px));
  }
  .sa-bulk-steps {
    gap: 12px;
    font-size: 10px;
  }
  .sa-bulk-preview th,
  .sa-bulk-preview td {
    padding: 8px;
    font-size: 11px;
  }
  .sa-bulk-preview th:first-child {
    width: 28%;
  }
  .sa-bulk-preview img {
    width: 34px;
    height: 34px;
  }
  .sa-bulk-preview {
    max-height: 40dvh;
  }
}
@media (prefers-reduced-motion: reduce) {
  .sa-bulk-panel {
    animation: none;
  }
}
.sa-queue-health {
  padding: 20px;
  border: 1px solid #e2e9f3;
  border-radius: 12px;
  background: #fff;
  margin: 0 0 20px;
}
.sa-queue-health header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}
.sa-queue-health h2 {
  font-size: 16px;
  margin: 0;
}
.sa-queue-health header > span {
  font-size: 10px;
  color: #8593a8;
}
.sa-queue-counts {
  display: flex;
  gap: 35px;
  margin: 18px 0;
}
.sa-queue-counts > div {
  display: flex;
  gap: 9px;
  align-items: baseline;
}
.sa-queue-counts strong {
  font-size: 26px;
  font-weight: 600;
}
.sa-queue-counts span {
  font-size: 12px;
  color: #73839b;
}
.sa-queue-workers {
  display: flex;
  gap: 24px;
  flex-wrap: wrap;
}
.sa-queue-worker {
  display: grid;
  grid-template-columns: 8px auto;
  gap: 4px 8px;
  align-items: center;
  font-size: 11px;
}
.sa-queue-worker small {
  grid-column: 2;
  color: #8290a4;
}
.sa-queue-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #dda544;
}
.sa-queue-dot.active {
  background: #32ad83;
}
.sa-queue-message {
  display: flex;
  flex-direction: column;
  gap: 4px;
  background: #f2f5fa;
  padding: 12px;
  border-radius: 8px;
  margin: 14px 0;
  font-size: 12px;
  line-height: 1.6;
}
.sa-queue-warning {
  background: #fff7e6;
  color: #85632b;
}
.sa-queue-message span:empty {
  display: none;
}
.sa-queue-facts {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px 16px;
  font-size: 13px;
}
.sa-queue-facts dt {
  font-weight: 500;
  color: #7b8a9f;
}
.sa-queue-facts dd {
  margin: 0;
  overflow-wrap: anywhere;
}
.sa-queue-command {
  display: block;
  overflow-wrap: anywhere;
  padding: 10px;
  background: #f5f7fb;
}
.sa-queue-target {
  font-size: 17px;
  font-weight: 600;
}
@media (max-width: 680px) {
  .sa-queue-counts {
    gap: 15px;
    flex-wrap: wrap;
  }
  .sa-queue-counts > div {
    flex-direction: column;
    gap: 0;
  }
  .sa-queue-health {
    padding: 14px;
  }
  .sa-queue-workers {
    gap: 16px;
  }
}
.sa-task-target {
  display: block;
  margin-top: 5px;
  color: #7b8caa;
  font-weight: 400;
}
.sa-quick-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 22px;
}
.sa-quick-actions a {
  text-decoration: none;
  font-size: 12px;
  color: #4562b4;
  border: 1px solid #dee6f8;
  padding: 10px 15px;
  border-radius: 9px;
  background: #fff;
}
.sa-quick-actions a:hover {
  background: #eef3ff;
}
.sa-bulk-select-all {
  display: block;
  border: 0;
  border-top: 1px solid #ffffff26;
  background: none;
  color: #fff;
  font-size: 11px;
  padding: 10px 4px;
  margin-bottom: 5px;
  text-align: left;
  width: 100%;
  text-decoration: underline;
}
@media (max-width: 680px) {
  .sa-bulk-preview { max-height: 30dvh; }
  #sa-dialog:has(.sa-bulk-steps) .sa-form-footer { position: sticky; bottom: -1px; background: #fff; padding-top: 14px; }
}
