/*
 * KOrder styles · public/css/02f-tablet-orders.css
 * Cart lines, current/active table orders, point modal, order review.
 *
 * 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
 */

.cart-list {
  min-height: 240px;
  overflow: auto;
  padding: 10px 16px;
}

.cart-line {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}

.cart-line:last-child {
  border-bottom: 0;
}

.active-table-orders {
  display: grid;
  gap: 10px;
  padding: 8px 0 12px;
}

.current-orders-modal .active-table-orders {
  padding: 0;
}

.current-orders-empty {
  min-height: 140px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fbf8f2;
}

.current-orders-fee-note {
  margin: 0;
  padding: 12px 14px;
  border: 2px solid rgba(194, 122, 24, 0.32);
  border-radius: var(--radius);
  color: #382e22;
  background: #fff7e8;
  font-size: 15px;
  font-weight: 900;
  line-height: 1.35;
}

.active-orders-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 0;
}

.active-orders-head div {
  display: grid;
  gap: 3px;
}

.active-orders-head strong {
  font-size: 15px;
}

.active-orders-head span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  line-height: 1.35;
}

.active-orders-head em {
  display: grid;
  width: 28px;
  height: 28px;
  place-items: center;
  border-radius: 999px;
  color: #fff;
  background: var(--teal);
  font-style: normal;
  font-weight: 900;
}

.active-order-card {
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid rgba(8, 127, 117, 0.24);
  border-radius: var(--radius);
  background: #f8fbf7;
}

.active-order-top,
.active-order-total,
.active-order-item {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.active-order-top > div {
  display: grid;
  gap: 3px;
}

.active-order-top strong {
  font-size: 18px;
}

.active-order-top span:not(.status-pill) {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.active-order-items {
  display: grid;
  gap: 8px;
}

.active-order-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  padding-top: 8px;
  border-top: 1px solid rgba(31, 27, 22, 0.1);
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.active-order-item .option-summary,
.active-order-item .memo {
  grid-column: 1 / -1;
}

.active-order-total {
  padding-top: 10px;
  border-top: 1px solid rgba(31, 27, 22, 0.12);
  font-weight: 900;
}

.active-order-total strong {
  font-size: 20px;
}

.active-orders-grand-total {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 12px;
  border: 2px solid rgba(15, 118, 110, 0.32);
  border-radius: var(--radius);
  background: #edf8f5;
  font-weight: 900;
}

.active-orders-grand-total span {
  color: #17433f;
  font-size: 14px;
}

.active-orders-grand-total strong {
  font-size: 22px;
}

.line-title {
  font-weight: 800;
}

.line-sub {
  margin-top: 4px;
  color: var(--muted);
  font-size: 13px;
}

.qty-box {
  display: grid;
  grid-template-columns: 36px 42px 36px;
  align-items: center;
  height: 36px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  background: #fff;
}

.qty-box button {
  height: 36px;
  border: 0;
  background: #fff;
  font-weight: 900;
}

.qty-box span {
  text-align: center;
  font-weight: 800;
}

.cart-foot {
  display: grid;
  gap: 11px;
  padding: 16px;
  border-top: 1px solid var(--line);
  background: #fff;
}

.point-applied {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 10px 12px;
  border: 1px solid rgba(8, 127, 117, 0.24);
  border-radius: var(--radius);
  color: var(--teal-dark);
  background: rgba(8, 127, 117, 0.08);
  font-weight: 900;
}

.point-applied button,
.point-modal-head button {
  border: 0;
  color: inherit;
  background: transparent;
  font-weight: 900;
}

.point-modal {
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
}

.point-modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.point-scanner {
  width: 100%;
  max-height: 180px;
  border-radius: var(--radius);
  background: #111;
}

.point-actions {
  display: grid;
  gap: 8px;
}

.order-review-modal {
  position: relative;
  display: grid;
  width: min(720px, calc(100vw - 48px));
  max-height: min(820px, calc(100vh - 48px));
  gap: 16px;
  overflow: auto;
  padding: 30px;
  border-radius: var(--radius);
  background: #fff;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.32);
}

.order-review-head {
  display: grid;
  gap: 7px;
  padding-right: 48px;
}

.order-review-head span {
  color: var(--teal-dark);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

/* Guest tablet: show the label as written (Current Orders, Review Order), not upper-case.
   The counter hub's table modal keeps the upper-case label. */
.order-review-modal:not(.hub-table-modal) .order-review-head span {
  text-transform: none;
}

.order-review-head h2 {
  margin: 0;
  font-size: 30px;
  line-height: 1.15;
}

.order-review-head p {
  margin: 0;
  color: var(--muted);
  line-height: 1.45;
}

.order-review-meta {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.order-review-meta span {
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #faf7f0;
  font-size: 13px;
  font-weight: 900;
}

.order-review-list {
  display: grid;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.order-review-line {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 16px;
  padding: 14px;
  border-bottom: 1px solid var(--line);
  background: #fffdf8;
}

.order-review-line:last-child {
  border-bottom: 0;
}

.order-review-line-total {
  display: grid;
  gap: 4px;
  justify-items: end;
  align-content: start;
  font-weight: 900;
}

.order-review-line-total span {
  color: var(--muted);
  font-size: 13px;
}

.order-review-line-total strong {
  font-size: 18px;
}

.order-review-memo {
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--muted);
  background: #fbf8f2;
  font-weight: 800;
}

.order-review-totals {
  display: grid;
  gap: 8px;
}

.order-review-totals div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  font-weight: 900;
}

.order-review-totals .discount {
  color: var(--coral);
}

.order-review-totals .grand {
  padding-top: 10px;
  border-top: 1px solid var(--line);
}

.order-review-totals .grand strong {
  font-size: 28px;
}

.order-review-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

