/* ============================================================
   EASY INVENTORY  —  DESIGN-easy-inventory.md
   One screen for service. The minus is the largest control on every
   row; everything else is quiet.
   ============================================================ */

.easy {
  position: fixed; inset: 0; z-index: 905;
  display: flex; flex-direction: column;
  background: var(--desk);
  color: var(--ink);
  font-family: var(--font-ui);
}
body.easy-open { overflow: hidden; }
body.exporting .easy { display: none !important; }

.ez-bar {
  display: flex; align-items: center; gap: 14px;
  padding: 12px max(18px, env(safe-area-inset-right)) 12px max(18px, env(safe-area-inset-left));
  padding-top: max(12px, env(safe-area-inset-top));
  background: var(--chrome);
  border-bottom: 1px solid var(--chrome-line);
}
.ez-title { margin: 0; display: flex; flex-direction: column; gap: 1px; min-width: 0; font-weight: 400; }
.ez-title:focus { outline: none; }
.ez-k {
  font-family: var(--font-ui-2); font-size: 11px; font-weight: 600;
  letter-spacing: .14em; text-transform: uppercase; color: var(--accent-ink);
}
.ez-est { font-size: 22px; line-height: 1.15; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ez-q {
  flex: 1; min-width: 0; max-width: 420px; margin-left: auto;
  height: 44px; padding: 0 12px;
  font: inherit; font-size: 17px; color: var(--ink);
  background: var(--field); border: 1px solid var(--chrome-line); border-radius: var(--r);
}
.ez-q:focus { outline: 2px solid var(--accent-line); outline-offset: 0; }
.ez-done {
  flex: none; height: 44px; padding: 0 18px;
  font-family: var(--font-ui-2); font-size: 12px; font-weight: 600;
  letter-spacing: .14em; text-transform: uppercase;
  color: var(--accent-ink); background: var(--lift);
  border: 1px solid var(--accent-line); border-radius: var(--r); cursor: pointer;
}
.ez-done:hover { background: var(--accent-soft); }

.ez-list {
  flex: 1; overflow: auto; -webkit-overflow-scrolling: touch;
  padding: 6px max(18px, env(safe-area-inset-right)) 96px max(18px, env(safe-area-inset-left));
}
.ez-grp { max-width: 980px; margin: 0 auto; }
.ez-hd {
  margin: 20px 0 6px; padding: 0 2px;
  font-family: var(--font-ui-2); font-size: 11px; font-weight: 600;
  letter-spacing: .14em; text-transform: uppercase; color: var(--accent-ink);
}
.ez-row {
  display: flex; align-items: center; gap: 12px;
  min-height: 76px; padding: 8px 8px 8px 16px;
  background: var(--lift); border: 1px solid var(--chrome-line); border-radius: var(--r);
  transition: background var(--t) var(--ease);
}
.ez-row + .ez-row { margin-top: 6px; }
.ez-row.is-hit { background: var(--accent-soft); }
.ez-name { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.ez-nm { font-size: 19px; line-height: 1.22; }
.ez-name small { font-size: 14px; color: var(--ink-faint); }
.ez-n {
  flex: none; min-width: 2.2ch; text-align: right;
  font-size: 34px; line-height: 1; font-variant-numeric: tabular-nums;
}
.ez-row.is-out .ez-nm, .ez-row.is-out .ez-n { color: var(--ink-soft); }
.ez-row.is-none .ez-n { color: var(--ink-faint); }

.ez-plus, .ez-minus {
  flex: none; display: inline-flex; align-items: center; justify-content: center;
  border-radius: var(--r); cursor: pointer; padding: 0;
  -webkit-tap-highlight-color: transparent; touch-action: manipulation;
}
.ez-plus {
  width: 44px; height: 44px;
  font-family: var(--font-ui-2); font-size: 22px; line-height: 1;
  color: var(--accent-ink); background: transparent; border: 1px solid var(--chrome-line);
}
.ez-plus:hover { background: var(--accent-soft); }
.ez-minus {
  /* v0.199.1: the plus's size and weight, in red; no word on it, so it
     cannot be read as Sold out. */
  width: 44px; height: 44px;
  font-family: var(--font-ui-2); font-size: 22px; line-height: 1;
  color: var(--accent-ink); background: transparent; border: 1px solid var(--accent-line);
}
.ez-minus:hover:not(:disabled) { background: var(--accent-soft); }
.ez-minus:active:not(:disabled) { transform: translateY(1px); background: var(--accent-soft); }
.ez-minus:disabled { color: var(--ink-faint); border-color: var(--chrome-line); opacity: .6; cursor: default; }
.ez-plus:focus-visible, .ez-minus:focus-visible, .ez-done:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

.ez-none { max-width: 980px; margin: 28px auto; font-size: 17px; color: var(--ink-soft); }

.ez-undo {
  position: fixed; left: 50%; bottom: max(18px, env(safe-area-inset-bottom));
  transform: translate(-50%, 140%);
  display: flex; align-items: center; gap: 16px;
  max-width: calc(100vw - 32px); padding: 10px 10px 10px 18px;
  background: var(--toast-bg); color: var(--toast-ink);
  border-radius: var(--r); box-shadow: var(--menu-shadow);
  font-size: 16px; visibility: hidden;
  transition: transform var(--t) var(--ease), visibility 0s linear var(--t);
}
.ez-undo.is-on { transform: translate(-50%, 0); visibility: visible; transition: transform var(--t) var(--ease); }
.ez-undo span { min-width: 0; }
.ez-undo button {
  flex: none; height: 40px; padding: 0 14px;
  font-family: var(--font-ui-2); font-size: 12px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase;
  color: var(--toast-ink); background: transparent; border: 1px solid currentColor; border-radius: var(--r); cursor: pointer;
}

/* A phone: the field goes under the name, and the minus keeps its size
   while its word goes, so the wine's name has the room. */
@media (max-width: 640px) {
  .ez-bar { flex-wrap: wrap; gap: 10px; }
  .ez-title { flex: 1; }
  .ez-q { order: 3; flex-basis: 100%; max-width: none; margin-left: 0; }
  .ez-row { gap: 8px; padding-left: 12px; min-height: 72px; }
  .ez-nm { font-size: 17px; }
  .ez-n { font-size: 28px; }
  .ez-undo { left: 12px; right: 12px; max-width: none; font-size: 15px; transform: translateY(140%); }
  .ez-undo.is-on { transform: translateY(0); }
  .ez-undo span { flex: 1; }
}

@media (prefers-reduced-motion: reduce) {
  .ez-row, .ez-undo, .ez-undo.is-on { transition: none; }
}
