/* inventory view styles, ported from prototypes/ui-ux/styles/views.css (step indicator) plus the
   Stock / Movimientos / Conteo físico layout pieces the prototype builds inline. */
@layer views {
  /* Step indicator of the physical stock count (1. Elegir, 2. Contar, 3. Revisar). */
  .stepper {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-2);
    margin-block-end: var(--space-4);
  }

  .stepper__item {
    display: inline-flex;
    align-items: center;
    gap: var(--space-2);
    padding: 0.45rem 0.85rem;
    border-radius: var(--radius-full);
    font-size: var(--text-xs);
    font-weight: 700;
    background-color: var(--surface-subtle);
    color: var(--text-muted);
    border: 1px solid var(--border-subtle);
  }

  .stepper__item[aria-current="step"] {
    background-color: var(--brand-primary);
    border-color: var(--brand-primary);
    color: #ffffff;
  }

  .stepper__item--done {
    background-color: var(--status-ok-bg);
    border-color: var(--status-ok-border);
    color: var(--status-ok-ink);
  }

  /* Row actions stay on one line in the table and wrap in the stacked (narrow) layout. */
  .inventory-actions {
    justify-content: flex-end;
  }

  /* Step 1 of the count: ingredient cards that adapt to the panel width. */
  .count-picker {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(15rem, 100%), 1fr));
    gap: var(--space-3);
  }

  .count-option {
    align-items: flex-start;
    min-inline-size: 0;
    padding: var(--space-3);
  }

  .count-option > span {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
    min-inline-size: 0;
    overflow-wrap: anywhere;
  }

  .count-option__meta {
    display: block;
  }

  /* Step 2 quantity box: wide enough for a decimal, never wider than its cell. */
  .count-input {
    inline-size: 100%;
    max-inline-size: 9rem;
  }

  /* Status text under a name inside stacked cards must wrap instead of widening the row. */
  .stock-warning {
    display: block;
    overflow-wrap: anywhere;
  }
}
