/*
 * Live counter booking (P2-T06) — real API flow.
 *
 * Owner rule: zero raw color literals; every color, spacing, radius and
 * shadow resolves to css/design-tokens.css. The screen is a single
 * column on phones and a comfortable counter layout on tablets.
 */

.live {
  max-width: 1100px;
  margin: 0 auto;
  padding: var(--space-6);
  display: grid;
  gap: var(--space-4);
}

.live__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  flex-wrap: wrap;
}

.live__title {
  margin: 0;
  font-size: var(--text-2xl);
  font-weight: var(--weight-extrabold);
}

.live-steps {
  display: flex;
  gap: var(--space-2);
  margin: 0;
  padding: 0;
  list-style: none;
  overflow-x: auto;
}

.live-step {
  flex: 1 0 auto;
  min-height: var(--touch-min);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 var(--space-3);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  background: var(--surface-elevated);
  color: var(--chalk-muted);
  font-size: var(--text-sm);
  font-weight: var(--weight-semibold);
  white-space: nowrap;
}

.live-step--active {
  border-color: var(--brand-brass);
  background: var(--brass-faint);
  color: var(--brand-brass-ink);
}

.live-status {
  min-height: 1.5em;
  margin: 0;
  color: var(--chalk-muted);
  font-size: var(--text-sm);
}
.live-status--error { color: var(--status-danger); }

.live-panel[hidden] { display: none; }

.live-panel {
  display: grid;
  gap: var(--space-4);
  padding: var(--space-6);
  background: var(--surface-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
}

.live-panel__title {
  margin: 0;
  font-size: var(--text-xl);
  font-weight: var(--weight-semibold);
}

.live-subtitle {
  margin: var(--space-2) 0 0;
  font-size: var(--text-md);
  font-weight: var(--weight-semibold);
  color: var(--chalk-muted);
}

.live-search {
  display: flex;
  align-items: end;
  gap: var(--space-3);
  flex-wrap: wrap;
}

.live-search .field { flex: 1 1 260px; }

.live-results {
  display: grid;
  gap: var(--space-2);
}

.live-result {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  min-height: var(--touch-min);
  padding: 0 var(--space-4);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  background: var(--surface-elevated);
  color: var(--chalk-white);
  font-family: var(--font-ui);
  font-size: var(--text-md);
  cursor: pointer;
  text-align: left;
}
.live-result:hover { border-color: var(--brand-brass); }
.live-result__name { font-weight: var(--weight-semibold); }
.live-result__meta { color: var(--chalk-muted); font-family: var(--font-mono); }

.live-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-4);
}
.live-grid__wide { grid-column: 1 / -1; }

.live-fields {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--space-4);
}

.live-field .input { font-family: var(--font-mono); }

.live-selected {
  margin: 0;
  padding: var(--space-3);
  border-left: 3px solid var(--brand-brass);
  background: var(--brass-faint);
  border-radius: var(--radius-sm);
  font-weight: var(--weight-semibold);
}

.live-hint {
  margin: 0;
  color: var(--chalk-muted);
  font-size: var(--text-sm);
}

.live-summary {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-2) var(--space-4);
}

.live-kv {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--space-3);
  padding: var(--space-2) 0;
  border-bottom: 1px dashed var(--border-subtle);
}
.live-kv__label { color: var(--chalk-muted); font-size: var(--text-sm); }
.live-kv__value {
  font-family: var(--font-mono);
  font-weight: var(--weight-semibold);
  font-variant-numeric: tabular-nums;
}

.live-receipt {
  max-height: 420px;
  overflow: auto;
  margin: 0;
  padding: var(--space-4);
  background: var(--canvas-dark);
  color: var(--chalk-white);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  font-family: var(--font-mono);
  font-size: var(--text-sm);
  line-height: 1.4;
  white-space: pre;
}

@media (max-width: 900px) {
  .live-fields { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 560px) {
  .live { padding: var(--space-3); }
  .live-grid, .live-fields, .live-summary { grid-template-columns: 1fr; }
  .live-panel { padding: var(--space-4); }
}
