/* BatchProgressList Component Styles (6b)
   Rows + hairlines, status by shape, counts in mono. Progress fill is
   --color-primary; --mint-info appears only on the "processing" dot. */

.mint-batch-progress {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

/* Dark --border-light equals --bg-card; row and band hairlines need --border-color there. */
:where(html.dark) .mint-batch-progress {
  --border-light: var(--border-color);
}

.mint-batch-progress__header {
  display: flex;
  align-items: baseline;
  gap: 0.5rem;
}

.mint-batch-progress__title {
  font-weight: 600;
  font-size: 0.875rem;
  color: var(--text-primary);
}

.mint-batch-progress__count,
.mint-batch-progress__percent {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-variant-numeric: tabular-nums;
}

.mint-batch-progress__count {
  color: var(--text-primary);
}

.mint-batch-progress__percent {
  margin-left: auto;
  color: var(--text-secondary);
}

.mint-batch-progress__overall {
  width: 100%;
  height: 4px;
  background-color: var(--bg-tertiary);
  border-radius: 9999px;
  overflow: hidden;
}

.mint-batch-progress__overall-bar {
  height: 100%;
  background-color: var(--color-primary);
  transition: width 0.18s ease;
}

/* One line of shape + mono count + word. */
.mint-batch-progress__summary {
  display: flex;
  flex-wrap: wrap;
  gap: 0.875rem;
  font-size: 0.75rem;
  color: var(--text-secondary-strong);
}

.mint-batch-progress__summary-item {
  display: inline-flex;
  align-items: center;
  gap: 0.3125rem;
}

.mint-batch-progress__summary-count {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
}

.mint-batch-progress__summary .mint-batch-progress__shape {
  width: 0.75rem;
  height: 0.75rem;
}

/* ---------- Shapes ---------- */

.mint-batch-progress__shape {
  display: block;
  width: 0.875rem;
  height: 0.875rem;
}

.mint-batch-progress__check {
  stroke: var(--mint-success-hover);
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.mint-batch-progress__error-disc { fill: var(--mint-error); }

.mint-batch-progress__error-mark {
  stroke: white;
  stroke-width: 1.8;
  stroke-linecap: round;
}

.mint-batch-progress__arc-track {
  stroke: var(--bg-tertiary);
  stroke-width: 2;
}

.mint-batch-progress__arc {
  stroke: var(--color-primary);
  stroke-width: 2;
  stroke-linecap: round;
}

.mint-batch-progress__dash {
  stroke: var(--text-secondary);
  stroke-width: 2;
  stroke-linecap: round;
}

.mint-batch-progress__running-dot {
  width: 0.375rem;
  height: 0.375rem;
  border-radius: 9999px;
  background: var(--mint-info);
}

.mint-batch-progress__pending-ring {
  display: block;
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 9999px;
  box-shadow: inset 0 0 0 1.5px var(--_control-border-strong);
}

/* ---------- Rows ---------- */

.mint-batch-progress__list {
  display: flex;
  flex-direction: column;
  border-top: 1px solid var(--border-light);
}

.mint-batch-progress__item {
  display: flex;
  flex-direction: column;
  border-bottom: 1px solid var(--border-light);
}

.mint-batch-progress__item-row {
  display: grid;
  grid-template-columns: 1rem minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.625rem;
  min-height: 2.25rem;
  padding: 0.5rem 0;
}

.mint-batch-progress__item-icon {
  display: flex;
  align-items: center;
  justify-content: center;
}

.mint-batch-progress__item-icon--processing .mint-batch-progress__shape {
  animation: mint-batch-spin 1s linear infinite;
}

@keyframes mint-batch-spin {
  to { transform: rotate(360deg); }
}

.mint-batch-progress__item-label {
  min-width: 0;
  overflow: hidden;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text-primary);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mint-batch-progress__item--processing .mint-batch-progress__item-label,
.mint-batch-progress__item--error .mint-batch-progress__item-label {
  font-weight: 600;
}

.mint-batch-progress__item-meta {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  font-variant-numeric: tabular-nums;
  color: var(--text-secondary);
}

.mint-batch-progress__item-progress {
  width: 4.5rem;
  height: 2px;
  background-color: var(--bg-tertiary);
  border-radius: 9999px;
  overflow: hidden;
}

.mint-batch-progress__item-progress-bar {
  display: block;
  height: 100%;
  background-color: var(--color-primary);
  transition: width 0.18s ease;
}

/* Failed rows show the error in place. */
.mint-batch-progress__item-message {
  margin: 0 0 0.625rem 1.625rem;
  padding: 0.375rem 0.625rem;
  border-radius: var(--radius);
  background: var(--mint-error-bg);
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  line-height: 1.5;
  color: var(--text-secondary-strong);
}

/* ---------- Text actions ---------- */

.mint-batch-progress__retry-btn,
.mint-batch-progress__cancel-btn,
.mint-batch-progress__completed-toggle {
  padding: 0.125rem 0.25rem;
  border: none;
  border-radius: var(--radius-sm);
  background: transparent;
  font-family: var(--font-sans);
  font-size: 0.75rem;
  font-weight: 500;
  cursor: pointer;
  transition: background-color 0.15s ease;
}

.mint-batch-progress__retry-btn,
.mint-batch-progress__completed-toggle {
  color: var(--_ink-primary);
}

.mint-batch-progress__cancel-btn {
  color: var(--text-secondary-strong);
}

.mint-batch-progress__retry-btn:hover,
.mint-batch-progress__cancel-btn:hover,
.mint-batch-progress__completed-toggle:hover {
  background-color: var(--bg-hover);
}

.mint-batch-progress__retry-btn:focus-visible,
.mint-batch-progress__cancel-btn:focus-visible,
.mint-batch-progress__completed-toggle:focus-visible {
  outline: none;
  box-shadow: var(--focus-ring-offset);
}

.mint-batch-progress__completed-toggle {
  align-self: flex-start;
  margin-top: 0.25rem;
  padding: 0.375rem 0.25rem;
}

@media (prefers-reduced-motion: reduce) {
  .mint-batch-progress__item-icon--processing .mint-batch-progress__shape {
    animation: none;
  }

  .mint-batch-progress__overall-bar,
  .mint-batch-progress__item-progress-bar {
    transition: none;
  }
}

/* Empty / loading / error placeholder host (content comes from EmptyState) */
.mint-batch-progress__state {
  display: flex;
  align-items: center;
  justify-content: center;
}
