/*
 * KOrder styles · public/css/12-order-edit.css
 * Manager order edit / cancel modal and the change snapshot.
 *
 * public/css/*.css used to be one public/styles.css. The files are cut from it in order
 * and index.html loads them in that same order, which is the CSS cascade order: do not
 * reorder the <link> tags, and add a rule to the file that owns its screen.
 * Map: public/css/README.md
 */
/* ---- Manager order edit / cancel ---- */
.order-edit-modal {
  position: relative;
  display: grid;
  gap: 14px;
  width: min(640px, 100%);
  padding: 24px;
  border-radius: 18px;
  background: var(--panel, #fff);
  color: var(--ink, #1f2328);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.3);
}

.order-edit-modal h2 {
  margin: 0;
  padding-right: 48px;
}

.order-edit-modal p {
  margin: 0;
}

.order-edit-lines {
  display: grid;
  gap: 4px;
  max-height: 42vh;
  overflow: auto;
}

.order-edit-line {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  padding: 10px 8px;
  border-bottom: 1px solid var(--line);
  border-radius: 8px;
}

.order-edit-line > div:first-child {
  display: grid;
  gap: 2px;
}

.order-edit-line.changed {
  background: rgba(194, 122, 24, 0.1);
}

.order-edit-line.added {
  background: rgba(47, 125, 72, 0.12);
}

.order-edit-line.removed > div:first-child {
  opacity: 0.5;
  text-decoration: line-through;
}

.order-edit-stepper {
  display: flex;
  gap: 6px;
  align-items: center;
}

.order-edit-stepper .item-qty {
  min-width: 24px;
  text-align: center;
}

.order-edit-add,
.order-edit-field {
  display: grid;
  gap: 8px;
  font-weight: 700;
}

.order-edit-options {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 14px;
  margin: 0;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 10px;
  font-weight: 600;
}

.order-edit-add-row {
  display: grid;
  grid-template-columns: 100px auto;
  gap: 8px;
  justify-content: start;
}

.order-edit-totals {
  display: flex;
  justify-content: space-between;
  font-size: 16px;
}

.order-edit-auth {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.order-edit-auth label {
  display: grid;
  gap: 6px;
  font-weight: 700;
}

.order-edit-error {
  padding: 10px 12px;
  border-radius: 10px;
  color: #8f2a1b;
  background: #ffe6df;
  font-weight: 700;
}

.order-edit-actions {
  margin-top: -2px;
}

.counter-state-chip.edited {
  background: #5b6470;
}

.manager-list,
.order-change-list {
  display: grid;
  gap: 8px;
}

.manager-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: space-between;
  align-items: center;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
}

.manager-row > div:first-child {
  display: grid;
  gap: 2px;
}

.manager-row.is-inactive {
  opacity: 0.55;
}

.order-change-row {
  display: grid;
  gap: 6px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
}

.order-change-row.is-cancel {
  border-color: rgba(214, 83, 63, 0.5);
}

.order-change-head {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 14px;
  align-items: center;
  padding: 0;
  border: 0;
  color: inherit;
  background: transparent;
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.order-change-summary {
  font-size: 14px;
}

.order-change-detail {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.order-change-snapshot {
  display: grid;
  gap: 4px;
  padding: 10px;
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.04);
  font-size: 14px;
}

.order-change-snapshot h4 {
  margin: 0 0 4px;
}

.order-change-snapshot > div,
.order-change-total {
  display: flex;
  justify-content: space-between;
  gap: 8px;
}

@media (max-width: 640px) {
  .order-edit-auth,
  .order-change-detail {
    grid-template-columns: 1fr;
  }
}

