/*
 * cron-builder.css — per-tool styles for the field editors, expression display
 * and next-run list. Tokens only; no inline styles (CSP).
 */

/* Field editors — one stacked block per cron position. */
.cron-fields {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.cron-field { min-width: 0; }

.cron-field-label {
  display: flex;
  align-items: baseline;
  gap: var(--space-2);
  margin-bottom: 6px;
  font: 500 14px/1.4 var(--font-sans);
  color: var(--text-primary);
}
.cron-field-range {
  font-size: 12px;
  font-weight: 400;
  color: var(--text-muted);
  font-family: var(--font-mono);
}

/* Mode select + value input sit side by side; the input flexes to fill. */
.cron-field-row {
  display: flex;
  gap: var(--space-2);
  align-items: stretch;
}
.cron-field-row .cron-mode {
  flex: 0 0 auto;
  width: auto;
  min-width: 9.5rem;
}
.cron-field-row .cron-value {
  flex: 1 1 auto;
  min-width: 0;
  font-family: var(--font-mono);
}
.cron-field-row .cron-value[hidden] { display: none; }

@media (max-width: 480px) {
  .cron-field-row { flex-direction: column; }
  .cron-field-row .cron-mode { width: 100%; min-width: 0; }
}

/* The generated / explained expression — large, spaced monospace. */
.cron-expr {
  font-size: 20px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-align: center;
  color: var(--blue-700);
}

/* Plain-language description line. */
.cron-desc {
  font-size: 16px;
  line-height: 1.5;
  color: var(--text-primary);
  overflow-wrap: anywhere;
}

/* Next-run list — numbered, monospace-tabular datetimes on hairline rows. */
.cron-runs {
  display: flex;
  flex-direction: column;
  gap: 0;
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: cron-run;
}
.cron-runs li {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-2) 0;
  border-bottom: 1px solid var(--neutral-100);
  font-size: 14px;
  color: var(--text-primary);
}
.cron-runs li:last-child { border-bottom: 0; }
.cron-runs li::before {
  counter-increment: cron-run;
  content: counter(cron-run);
  flex: none;
  width: 22px;
  height: 22px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--blue-50);
  color: var(--blue-600);
  font-size: 12px;
  font-weight: 600;
}
.cron-runs .cron-run-none {
  color: var(--warning-600);
  border-bottom: 0;
}
.cron-runs .cron-run-none::before { display: none; }
