/* Live SPA shell — mockup screens become one phone flow */

button,
input {
  font-family: inherit;
}

button {
  cursor: pointer;
}

button:disabled {
  opacity: 0.55;
  cursor: default;
}

button.logo {
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
}

.btn-primary,
.btn-ghost,
.btn-secondary,
.btn-outline-block,
.btn-sm,
.onboard-skip {
  -webkit-tap-highlight-color: transparent;
}

.btn-primary:active,
.btn-sm.primary:active {
  transform: translateY(1px);
}

body.live {
  background: #2a2a28;
  min-height: 100dvh;
  padding: 28px 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

.live-label {
  text-align: center;
  color: #a8a89e;
  font-size: 12px;
  letter-spacing: 0.04em;
  margin-bottom: 16px;
  font-weight: 500;
}

.live-label strong {
  color: #e8e4d8;
  font-weight: 600;
}

.live-label a {
  color: #c8e6c9;
}

.app-shell.phone {
  flex-shrink: 0;
}

.screen {
  display: none;
  flex: 1;
  flex-direction: column;
  min-height: 0;
  overflow: hidden;
}

.screen.active {
  display: flex;
}

.back-btn {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: var(--cream-deep);
  color: var(--ink-soft);
  font-size: 14px;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.back-btn[hidden] {
  display: none !important;
}

.ocr-cell {
  cursor: pointer;
  user-select: none;
}

.ocr-grid {
  overflow: auto;
}

button.ocr-cell {
  appearance: none;
}

button.chip-add {
  padding: 0;
}

.add-slot {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 2px;
}

.add-slot label {
  font-size: 13px;
  font-weight: 700;
  color: var(--ink-mute);
}

.add-slot input {
  width: 72px;
  border: 1.5px solid var(--line);
  background: #fff;
  border-radius: 10px;
  padding: 8px 10px;
  font-size: 14px;
  font-weight: 700;
  color: var(--ink);
}

.add-slot button {
  border: none;
  background: var(--cream-deep);
  border-radius: 10px;
  padding: 8px 12px;
  font-size: 12px;
  font-weight: 700;
  color: var(--ink-soft);
}

.toast {
  position: absolute;
  left: 16px;
  right: 16px;
  bottom: 36px;
  z-index: 40;
  background: var(--ink);
  color: var(--cream);
  font-size: 13px;
  font-weight: 600;
  text-align: center;
  padding: 12px 14px;
  border-radius: 12px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}

.toast.show {
  opacity: 1;
}

.toggle {
  cursor: pointer;
  transition: background 0.15s ease;
}

.toggle.on {
  background: var(--pitch);
}

.toggle.on::after {
  left: 21px;
}

.toggle:focus-visible {
  outline: 2px solid var(--pitch);
  outline-offset: 3px;
}

.cash-note {
  font-size: 11px;
  color: var(--ink-mute);
  font-weight: 500;
  margin-top: 8px;
}

.empty-col {
  font-size: 11px;
  color: var(--ink-mute);
  font-weight: 500;
  line-height: 1.35;
}

.nearby-cards {
  display: flex;
  flex-direction: column;
  gap: 10px;
  overflow: auto;
  min-height: 0;
  padding-bottom: 4px;
}

.camera-stage.scanning .scan-line {
  display: block;
}

.scan-line {
  display: none;
  position: absolute;
  left: 18%;
  right: 18%;
  height: 2px;
  background: var(--pitch);
  box-shadow: 0 0 12px rgba(31, 122, 63, 0.8);
  z-index: 7;
  animation: scanSweep 0.7s ease-in-out;
}

@keyframes scanSweep {
  from { top: 18%; opacity: 0.2; }
  20% { opacity: 1; }
  to { top: 78%; opacity: 0.2; }
}

/* Nearby empty uses the mock empty-sheet inside the live nearby screen */
#nearby-empty {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
}

#nearby-empty[hidden],
#nearby-list[hidden] {
  display: none !important;
}

#nearby-list {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.sheet.live-sheet {
  overflow: hidden;
}

.screen[data-screen="nearby"] .map-area {
  height: 168px;
}

.nearby-cards .trader-card {
  padding: 10px;
  gap: 6px;
}

.nearby-cards .btn-sm {
  padding: 8px 8px;
}

/* Full-bleed on phone width */
@media (max-width: 430px) {
  body.live {
    background: var(--cream);
    padding: 0;
  }

  .live-label {
    display: none;
  }

  body.live .phone {
    width: 100%;
    max-width: 100%;
    height: 100dvh;
    min-height: 100dvh;
    border-radius: 0;
    box-shadow: none;
  }

  body.live .phone-notch,
  body.live .status-bar,
  body.live .home-indicator {
    display: none;
  }

  body.live .app {
    padding-top: env(safe-area-inset-top);
    padding-bottom: env(safe-area-inset-bottom);
  }
}
