/* tuning/ — Ganti & matikan blok (kartu Bahan + lembar Ganti blok). Token tema saja. */

.ae-material.has-actions {
  grid-template-columns: 28px 16px minmax(0, 1fr) auto auto;
  grid-template-areas: "icon sw name qty act" "icon sw bar bar act";
}
.ae-mat-acts { grid-area: act; display: flex; gap: 4px; margin-left: 2px; }
.ae-mat-act {
  display: inline-flex; align-items: center; justify-content: center;
  width: 36px; height: 36px; padding: 0; border-radius: 8px; cursor: pointer;
  border: 1px solid var(--wb-rule); background: transparent; color: var(--text-secondary);
}
.ae-mat-act:hover:not(:disabled), .ae-mat-act:focus-visible { color: var(--text-primary); border-color: var(--accent); }
.ae-mat-act:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.ae-mat-act:disabled { opacity: 0.35; cursor: not-allowed; }

.ae-mat-changes { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.ae-mat-changes[hidden] { display: none; }
.ae-mat-changes .ae-mat-chip { flex-direction: row; align-items: center; gap: 4px; min-height: 32px; padding: 2px 4px 2px 10px; max-width: 100%; font-size: 12px; }
.ae-mat-changes .ae-mat-chip > span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ae-mat-chip__x {
  display: inline-flex; align-items: center; justify-content: center; flex: none;
  width: 24px; height: 24px; padding: 0; border: 0; border-radius: 999px; cursor: pointer;
  background: transparent; color: var(--text-muted);
}
.ae-mat-chip__x:hover, .ae-mat-chip__x:focus-visible { color: var(--text-primary); background: var(--wb-inset); }
.ae-mat-reset {
  min-height: 32px; padding: 0 10px; border-radius: 8px; cursor: pointer; font: inherit; font-size: 12px;
  border: 1px solid var(--wb-rule); background: transparent; color: var(--text-secondary);
}
.ae-mat-reset:hover, .ae-mat-reset:focus-visible { color: var(--text-primary); border-color: var(--accent); }

.ae-replace-sheet .bottom-sheet__body { display: flex; flex-direction: column; gap: 10px; }
.ae-replace__from { display: flex; align-items: center; gap: 10px; }
.ae-replace__fromtext { display: flex; flex-direction: column; min-width: 0; }
.ae-replace__search { width: 100%; }
.ae-replace__note { margin: 0; font-size: 12px; }
.ae-replace__list { display: flex; flex-direction: column; gap: 2px; }
.ae-replace__row {
  display: grid; grid-template-columns: 28px 16px minmax(0, 1fr) auto; align-items: center; gap: 10px;
  width: 100%; min-height: 48px; padding: 6px 8px; border-radius: 8px; cursor: pointer; text-align: left;
  border: 1px solid transparent; background: transparent; color: var(--text-primary); font: inherit;
}
.ae-replace__row:hover, .ae-replace__row:focus-visible { background: var(--wb-inset); border-color: var(--wb-rule); }
.ae-replace__row:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.ae-replace__row.is-current { border-color: var(--accent); }
.ae-replace__name { display: flex; flex-direction: column; min-width: 0; font-size: 13px; }
.ae-replace__name > span:first-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ae-replace__flags { font-size: 11px; color: var(--accent-warning); }
.ae-replace__delta { display: flex; flex-direction: column; align-items: flex-end; font-size: 11px; color: var(--text-muted); }
.ae-replace__delta strong { font-family: var(--font-mono); font-size: 12px; color: var(--text-secondary); }
.ae-replace__empty { margin: 8px 0; }
.ae-replace__actions { display: flex; flex-wrap: wrap; gap: 8px; padding-top: 4px; border-top: 1px solid var(--wb-rule-soft); }

/* Tahap 2 — tombol Otomatis di kartu Gambar */
.ae-image__auto { width: 100%; min-height: 40px; justify-content: center; }
.ae-image__auto-note { margin: -4px 0 0; font-size: 12px; }
.ae-image__auto-note[hidden] { display: none; }
