/* The export service invoice detail: the export-specific styles only. The pane
   shell, the header, the action bar, the status chip, the meta grid, and the
   buttons are the canonical `detail-pane__` vocabulary (ADR-038,
   `static/css/components/detail-pane.css`). What remains here is export-specific:
   the inline-compose line-items table, and the colour of the status chip for
   each state. */

/* The status-chip colours for each export workflow state (the sanctioned
   `detail-pane__` prefix, and the state codes are export-owned). */
.detail-pane__status--esi_issued {
  background-color: var(--md-sys-color-primary);
  color: var(--md-sys-color-on-primary);
}

.detail-pane__status--esi_canceled {
  background-color: var(--md-sys-color-error-container);
  color: var(--md-sys-color-on-error-container);
}

/* The line-items table: the inline add-row compose surface. */
.esi-lines__table {
  width: 100%;
  border-collapse: collapse;
  background-color: var(--md-sys-color-surface-container-low);
  border-radius: 16px;
  overflow: hidden;
}

.esi-lines__th {
  text-align: left;
  padding: 12px 16px;
  color: var(--md-sys-color-on-surface-variant);
  background-color: var(--md-sys-color-surface-container);
}

.esi-lines__th--num { text-align: right; }
.esi-lines__th--action { width: 44px; }

.esi-lines__cell {
  padding: 12px 16px;
  border-top: 1px solid var(--md-sys-color-outline-variant);
  color: var(--md-sys-color-on-surface);
  vertical-align: middle;
}

/* A money or quantity cell never breaks between the number and its currency or
   unit. `1,200.00 MDL` is one token. Without this, the auto table layout
   compressed the LAST numeric column first. So *Line total* wrapped onto two
   lines, while *Unit price* and *VAT* beside it did not (quick fix #106, the
   demand pane at full width). The header cells stay free to wrap. */
.esi-lines__cell--num {
  text-align: right;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.esi-lines__cell--action { text-align: center; }
.esi-lines__muted { color: var(--md-sys-color-on-surface-variant); }

.esi-lines__row--add .esi-lines__cell {
  background-color: var(--md-sys-color-surface-container-highest);
}

.esi-lines__input {
  width: 100%;
  box-sizing: border-box;
  padding: 8px 10px;
  border: 1px solid var(--md-sys-color-outline);
  border-radius: 8px;
  background-color: var(--md-sys-color-surface);
  color: var(--md-sys-color-on-surface);
  font-family: inherit;
  font-size: 14px;
}

.esi-lines__input--num { text-align: right; }

.esi-lines__input:focus {
  outline: none;
  border-color: var(--md-sys-color-primary);
}

/* The round icon buttons for add and remove */
.esi-lines__add,
.esi-lines__remove {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border: none;
  border-radius: 16px;
  cursor: pointer;
}

.esi-lines__add {
  background-color: var(--md-sys-color-primary);
  color: var(--md-sys-color-on-primary);
}

.esi-lines__remove {
  background-color: transparent;
  color: var(--md-sys-color-on-surface-variant);
}

.esi-lines__remove:hover {
  background-color: var(--md-sys-color-surface-container-highest);
  color: var(--md-sys-color-error);
}

.esi-lines__add .material-icons,
.esi-lines__remove .material-icons { font-size: 20px; }

.esi-lines__total-row .esi-lines__cell {
  border-top: 2px solid var(--md-sys-color-outline);
  background-color: var(--md-sys-color-surface-container);
}

.esi-lines__total-label {
  text-align: right;
  color: var(--md-sys-color-on-surface-variant);
}
