/* ==========================================================================
   assets/css/inbound-multirow.css
   Material Inbound Multi-Row Horizontal Form Grid Styles (INBOUND-FORM-v1)
   Owned by: [AGY-GRID]
   ========================================================================== */

.inbound-multirow-wrap {
  --inbound-grid-cols:
    124px
    minmax(196px, 1.6fr)
    minmax(124px, 1.05fr)
    124px
    124px
    76px
    84px
    minmax(108px, 1fr)
    minmax(96px, 0.85fr)
    minmax(108px, 1fr)
    34px;
  --inbound-grid-min-width: 1310px;
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  min-height: 0;
  width: 100%;
  box-sizing: border-box;
  gap: 8px;
}

.inbound-multirow-wrap.cols-8,
.inbound-multirow-scroll.cols-8 {
  --inbound-grid-cols:
    124px
    minmax(210px, 1.7fr)
    minmax(132px, 1.05fr)
    124px
    88px
    minmax(120px, 1fr)
    minmax(104px, 0.9fr)
    minmax(120px, 1fr)
    34px;
  --inbound-grid-min-width: 1160px;
}

.inbound-multirow-wrap.cols-10,
.inbound-multirow-scroll.cols-10 {
  --inbound-grid-cols:
    124px
    minmax(196px, 1.6fr)
    minmax(124px, 1.05fr)
    124px
    124px
    76px
    84px
    minmax(108px, 1fr)
    minmax(96px, 0.85fr)
    minmax(108px, 1fr)
    34px;
  --inbound-grid-min-width: 1310px;
}

.inbound-multirow-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px 12px;
  padding: 2px 2px 6px;
  border-bottom: 1px solid var(--border, #2a3648);
}

.inbound-multirow-toolbar-left {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  min-width: 0;
  flex: 1 1 auto;
}

.inbound-multirow-hint {
  font-size: 11.5px;
  color: var(--muted, #8b9bb4);
  font-weight: 500;
}

.inbound-multirow-chips {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
}

.inbound-chip-btn {
  cursor: pointer;
  font-size: 11.5px;
  padding: 4px 10px;
  border: 1px solid rgba(128, 128, 128, 0.38);
  background: rgba(43, 94, 163, 0.08);
  color: var(--text, #e7ebf2);
  border-radius: 14px;
  font-weight: 600;
  line-height: 1.2;
  transition: background-color 0.15s ease, border-color 0.15s ease;
}

.inbound-chip-btn:hover {
  border-color: var(--accent, #5b90d6);
  background: rgba(43, 94, 163, 0.18);
}

.inbound-multirow-toolbar-right {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 0 0 auto;
}

.inbound-multirow-count {
  font-size: 11.5px;
  font-weight: 700;
  color: var(--accent, #5b90d6);
  padding: 2px 8px;
  border-radius: 10px;
  background: rgba(43, 94, 163, 0.12);
}

.inbound-multirow-scroll {
  flex: 1 1 auto;
  min-height: 0;
  overflow: auto;
  padding: 0 0 4px 0;
  box-sizing: border-box;
}

/* Shared 1-source column grid geometry for both header and rows */
.inbound-multirow-head,
.inbound-multirow-row {
  display: grid;
  grid-template-columns: var(--inbound-grid-cols);
  column-gap: 8px;
  row-gap: 0;
  align-items: center;
  width: 100%;
  min-width: var(--inbound-grid-min-width, 1310px);
  box-sizing: border-box;
  padding-left: 12px;
  padding-right: 12px;
}

.inbound-multirow-head {
  padding-top: 6px;
  padding-bottom: 6px;
  border: 1px solid transparent;
  border-bottom-color: var(--border, #2a3648);
  font-size: 11px;
  color: var(--muted, #8b9bb4);
  font-weight: 700;
  position: sticky;
  top: 0;
  background: var(--surface, #16202e);
  z-index: 2;
}

.inbound-multirow-head > span {
  min-width: 0;
  display: block;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  text-align: left;
  padding: 0 2px;
  box-sizing: border-box;
}

[data-theme="light"] .inbound-multirow-head {
  background: #ffffff;
}

.inbound-multirow-rows {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 6px 0 0 0;
  margin: 0;
  width: 100%;
  min-width: var(--inbound-grid-min-width, 1310px);
  box-sizing: border-box;
}

.inbound-multirow-row {
  padding-top: 8px;
  padding-bottom: 8px;
  border: 1px solid var(--border, #2a3648);
  border-radius: 8px;
  background: rgba(43, 94, 163, 0.03);
  transition: border-color 0.15s ease, background-color 0.15s ease;
}

.inbound-multirow-row.is-active {
  border-color: rgba(91, 144, 214, 0.55);
  background: rgba(43, 94, 163, 0.07);
}

.inbound-multirow-row.has-error {
  border-color: var(--danger, #ef4444);
  background: rgba(239, 68, 68, 0.06);
}

.inbound-multirow-cell {
  min-width: 0;
  width: 100%;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.inbound-multirow-cell.inbound-cell-del {
  align-items: center;
}

.inbound-multirow-row .cell-input {
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
}

.inbound-multirow-row .mpick {
  display: flex;
  gap: 4px;
  align-items: center;
  width: 100%;
  min-width: 0;
}

.inbound-multirow-row .mpick-label {
  flex: 1 1 auto;
  min-width: 0;
  cursor: pointer;
  background: rgba(128, 128, 128, 0.06);
  color: var(--text, #e7ebf2);
  font-weight: 600;
  text-overflow: ellipsis;
}

[data-theme="light"] .inbound-multirow-row .mpick-label {
  color: var(--text, #16233d);
}

.inbound-multirow-row .material-link-status {
  font-size: 10.5px;
  margin-top: 2px;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.inbound-multirow-row .inbound-col-lot_no {
  font-family: monospace;
  font-weight: 600;
}

.inbound-multirow-row .inbound-row-del-btn {
  width: 100%;
  height: 28px;
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
