/* Shared item-timer cell (all frames). Color roles kept local to avoid full-card paint wars. */

.item-timer-cell {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 0.25rem 0.35rem;
  flex-shrink: 0;
  max-width: 12rem;
  font-variant-numeric: tabular-nums;
}

.item-timer-badge {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--fg-muted, #666);
}

.item-timer-live {
  font-size: 0.95rem;
  font-weight: 800;
  color: var(--fg, #222);
}

.item-timer-overdue {
  font-size: 0.95rem;
  font-weight: 800;
  color: #b33a2b;
}

.item-timer-start-btn {
  border: 1px solid #c4c4c4;
  background: #f7f7f7;
  color: var(--fg, #222);
  border-radius: 0.25rem;
  padding: 0.18rem 0.4rem;
  font-size: 0.68rem;
  font-weight: 700;
  cursor: pointer;
  touch-action: manipulation;
}

.item-timer-start-btn:active {
  background: #ececec;
}

.item-timer-pause-btn {
  border: 1px solid #6b8cae;
  background: #eef5fb;
  color: #2a5080;
  border-radius: 0.25rem;
  padding: 0.18rem 0.4rem;
  font-size: 0.68rem;
  font-weight: 800;
  cursor: pointer;
  touch-action: manipulation;
  white-space: nowrap;
}

.item-timer-pause-btn.is-paused {
  border-color: #c4a020;
  background: #fff8dc;
  color: #8a5a10;
}

.item-timer-pause-btn:active {
  background: #e0ebf5;
}

.item-timer-started {
  display: block;
  width: 100%;
  text-align: right;
  font-size: 0.58rem;
  font-weight: 600;
  color: var(--fg-muted, #888);
  line-height: 1.1;
}

.item-timer-forgotten-flag {
  font-size: 0.58rem;
  font-weight: 800;
  color: #8a5a10;
  background: rgba(212, 160, 23, 0.2);
  border-radius: 0.15rem;
  padding: 0.05rem 0.22rem;
}

.item-timer-cell.is-start-forgotten {
  box-shadow: inset 2px 0 0 0 #d4a017;
  padding-left: 0.28rem;
}

.item-timer-cell.is-timer-overdue {
  box-shadow: inset 2px 0 0 0 #c23b3b;
  padding-left: 0.28rem;
}

/* Row-level short new highlight (not a full-card red). */
.is-item-new {
  background: rgba(255, 248, 220, 0.85) !important;
  box-shadow: inset 3px 0 0 0 #e0b000;
}

.is-start-forgotten-row {
  /* End accent only — avoid clashing with unserved card fill */
  box-shadow: inset -3px 0 0 0 #d4a017;
}

/* Table stall yellow (after first serve, nothing for N min). Lighter than unserved. */
.dishup-card.is-table-stall {
  border-color: #e0c46a;
  box-shadow: inset 3px 0 0 0 #e0b000;
}

.dishup-card.is-table-stall .dishup-card-head {
  background: #fffced;
}

.dishup-stall-flag {
  display: inline-block;
  margin-top: 0.28rem;
  padding: 0.08rem 0.28rem;
  border-radius: 0.2rem;
  font-size: 0.58rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  color: #7a6a10;
  background: rgba(224, 176, 0, 0.16);
}

/* Auxiliary overdue hint on card — timer cell remains primary overdue signal */
.dishup-card.has-overdue-timer {
  border-color: #d8a8a0;
}

@media (max-width: 700px) {
  .item-timer-started {
    display: none;
  }
}

.item-pin-btn {
  flex: 0 0 auto;
  border: 1px solid transparent;
  background: transparent;
  color: var(--fg-muted, #888);
  border-radius: 0.2rem;
  padding: 0.1rem 0.28rem;
  font-size: 0.62rem;
  font-weight: 700;
  line-height: 1.2;
  cursor: pointer;
  touch-action: manipulation;
}

.item-pin-btn.is-on {
  border-color: #6b8cae;
  background: #eef5fb;
  color: #2a5080;
}

.is-item-pinned {
  box-shadow: inset 3px 0 0 0 #4a7ab0;
}

.is-item-pinned.is-item-new {
  box-shadow: inset 3px 0 0 0 #4a7ab0, inset 0 0 0 1px rgba(224, 176, 0, 0.35);
}

.item-partial-menu {
  display: inline-flex;
  gap: 0.2rem;
  align-items: center;
}

.item-partial-qty-btn {
  min-width: 1.6rem;
  border: 1px solid #b0b8c4;
  background: #fff;
  color: var(--fg, #222);
  border-radius: 0.2rem;
  padding: 0.16rem 0.3rem;
  font-size: 0.72rem;
  font-weight: 800;
  cursor: pointer;
  touch-action: manipulation;
}

.item-partial-qty-btn:active {
  background: #e8eef6;
}

.item-timer-cooking-qty {
  font-size: 0.62rem;
  font-weight: 700;
  color: #3a5a7a;
}

/* Immediate Undo: floating overlay — must not push pane header / card rail. */
.dishup-undo-bar {
  position: fixed;
  left: 50%;
  bottom: max(1.1rem, env(safe-area-inset-bottom, 0px));
  transform: translateX(-50%);
  z-index: 40;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.65rem;
  padding: 0.45rem 0.75rem;
  margin: 0;
  border: 1px solid #c5d0dc;
  border-radius: 0.45rem;
  background: rgba(244, 247, 251, 0.97);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.12);
  max-width: min(22rem, calc(100vw - 5.5rem));
  pointer-events: auto;
}

.dishup-undo-bar[hidden] {
  display: none !important;
}

.dishup-undo-label {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--fg, #222);
}

.dishup-undo-btn {
  border: 1px solid #6b8cae;
  background: #fff;
  color: #2a5080;
  border-radius: 0.25rem;
  padding: 0.22rem 0.55rem;
  font-size: 0.72rem;
  font-weight: 800;
  cursor: pointer;
  touch-action: manipulation;
}

