/* --- The DATEV month-end close (#634) --- */

/* Four steps in a row, each a button carrying its number, its name and where it
   stands. Below 430 px the row gives way to a select, because four labels and
   four states do not fit side by side on a phone. */
.stepper-frame {
  margin-block: 1rem;
}

.stepper {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.5rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.stepper__step {
  min-width: 0;
}

.stepper__button {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  grid-template-rows: auto auto;
  column-gap: 0.6rem;
  align-items: center;
  width: 100%;
  padding: 0.6rem 0.75rem;
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  background: var(--surface);
  color: var(--text);
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.stepper__step.is-active .stepper__button {
  border-color: var(--brass);
  box-shadow: 0 0 0 1px var(--brass);
}

.stepper__number {
  grid-row: 1 / span 2;
  display: inline-grid;
  place-items: center;
  width: 1.8rem;
  height: 1.8rem;
  border-radius: 50%;
  background: var(--surface-2);
  font-variant-numeric: tabular-nums;
  flex-shrink: 0;
}

.stepper__label {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 600;
}

.stepper__state {
  min-width: 0;
  font-size: 0.8rem;
  color: var(--text-faint);
}

.stepper__step--bestaetigt .stepper__number {
  background: var(--pos-soft);
  color: var(--pos);
}

.stepper__step--bestaetigt .stepper__state {
  color: var(--pos);
}

.stepper__step--wieder-offen .stepper__number {
  background: var(--neg-soft);
  color: var(--neg);
}

.stepper__step--wieder-offen .stepper__state {
  color: var(--neg);
}

.stepper__select {
  display: none;
}

@media (max-width: 430px) {
  .stepper {
    display: none;
  }

  .stepper__select {
    display: grid;
  }
}

.stepper-body {
  min-width: 0;
}

.stepper-foot {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  margin-top: 1rem;
}

.datev-schritt {
  display: grid;
  gap: 1rem;
  min-width: 0;
}

.datev-warnung {
  color: var(--neg);
}

.datev-monatswahl {
  max-width: 22rem;
}
