/* Screens 02 and 04: the sale screen and the held tables. */
/* Sale screen */
.sale-screen {
  display: flex;
  height: calc(100vh - 64px);
}

.sale-screen__left {
  width: 66%;
  padding: var(--space-lg);
  overflow-y: auto;
}

.search {
  width: 100%;
  height: 56px;
  border: 2px solid var(--primary);
  border-radius: var(--radius-sm);
  padding: 0 var(--space-md);
  font-size: var(--font-body-size);
  margin-bottom: var(--space-md);
  background: var(--surface);
}

.search-error {
  color: var(--danger);
  margin-bottom: var(--space-md);
}

.cat-row-wrap {
  position: relative;
  z-index: var(--z-sticky);
  margin-bottom: var(--space-md);
}

.cat-row {
  display: flex;
  gap: var(--space-sm);
  overflow-x: auto;
  flex-wrap: nowrap;
  padding-bottom: var(--space-xs);
  scrollbar-width: none;
}

.cat-row::-webkit-scrollbar {
  display: none;
}

.cat-row-wrap::after {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  bottom: var(--space-xs);
  width: 24px;
  pointer-events: none;
  background: linear-gradient(to right, rgba(239, 242, 245, 0), var(--bg));
}

.grid-empty {
  text-align: center;
  color: var(--text-secondary);
  margin-top: var(--space-xl);
}

.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: var(--space-md);
}

.product-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: var(--space-md);
  min-height: 80px;
  text-align: left;
}

.product-card__name {
  font-size: var(--font-body-size);
  font-weight: 600;
}

.product-card__price {
  color: var(--text-secondary);
  margin-top: var(--space-sm);
}

.order-rail {
  width: 34%;
  min-width: 420px;
  background: var(--surface-alt);
  padding: var(--space-lg);
  display: flex;
  flex-direction: column;
  overflow-y: auto;
}

.order-rail__lines {
  flex: 1;
}

.order-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-sm);
  background: var(--surface);
  border-radius: var(--radius-sm);
  padding: var(--space-md);
  margin-bottom: var(--space-sm);
}

.order-line__name {
  font-weight: 600;
}

.order-line__meta {
  color: var(--text-secondary);
  font-size: var(--font-caption-size);
}

.stepper {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}

.stepper input {
  width: 48px;
  height: 48px;
  text-align: center;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
}

.totals {
  background: var(--surface);
  border-radius: var(--radius-sm);
  padding: var(--space-md);
  margin: var(--space-md) 0;
}

.totals__row {
  display: flex;
  justify-content: space-between;
  color: var(--text-secondary);
  margin-bottom: var(--space-xs);
}

.totals__total {
  display: flex;
  justify-content: space-between;
  font-size: var(--font-display-size);
  font-weight: 700;
  margin-top: var(--space-sm);
}

.actions {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

.actions .btn {
  width: 100%;
}

.over-limit-alert {
  color: var(--danger);
  font-size: var(--font-label-size);
}

/* Tabs */
.tab-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

.tab-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-lg);
  width: 100%;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: var(--space-md) var(--space-lg);
  text-align: left;
}

.tab-row__location {
  color: var(--text-secondary);
  font-size: var(--font-label-size);
}
