/* Área "cliente sem conta" (agendar e gerenciar). Carregar DEPOIS de system.css.
   Sóbrio, mobile-first (375 px), alvos de toque >= 44 px, sem estilo inline. */

.card.guest-flow,
.card.guest-manage {
  display: flex;
  flex-direction: column;
  gap: 20px;
  min-width: 0;
  scroll-margin-top: 72px;
}
.guest-flow h2:focus,
.guest-manage h2:focus { outline: none; }
.guest-flow .card-title,
.guest-manage .card-title { margin: 0; font-size: clamp(1.4rem, 5.5vw, 1.75rem); line-height: 1.25; }

/* Topo do passo: voltar, contagem e progresso */
.guest-topbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 44px; }
.guest-shop { font-size: 15px; font-weight: 700; color: var(--c-muted); overflow-wrap: anywhere; }
.guest-step { font-size: 14px; color: var(--c-muted); white-space: nowrap; }
.card.guest-flow .guest-back { min-height: 44px; padding-inline: 14px 16px; }
.guest-back::before {
  content: '';
  width: 8px;
  height: 8px;
  margin-right: 6px;
  border-left: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(45deg);
}
.guest-progress { display: flex; gap: 6px; margin: -8px 0 0; padding: 0; list-style: none; }
.guest-progress li { flex: 1; height: 4px; border-radius: 2px; background: var(--c-border); }
.guest-progress li.is-done { background: color-mix(in srgb, var(--c-primary) 55%, var(--c-border)); }
.guest-progress li.is-current { background: var(--c-primary); }

/* Resumo e recibo (lista de definição) */
.card.guest-flow .guest-summary,
.card.guest-manage .guest-summary {
  position: static;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 8px 16px;
  margin: 0;
  padding: 14px 16px;
  background: var(--c-bg);
  border: 1px solid var(--c-border);
  border-radius: 12px;
  box-shadow: none;
  font-size: 15px;
  line-height: 1.45;
}
.guest-summary dt { color: var(--c-muted); }
.guest-summary dd { margin: 0; font-weight: 700; text-align: right; overflow-wrap: anywhere; }
.guest-summary-slot:empty { display: none; }

/* Listas de escolha */
.guest-list { gap: 12px; }
.card.guest-flow .selectable-card { padding: 16px; text-align: left; }
.card.guest-flow .selectable-card::after,
.card.guest-flow .selectable-card.selected::after { content: none; }
.guest-service { flex-direction: row; align-items: flex-start; justify-content: space-between; gap: 16px; }
.guest-service-main { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.guest-meta { font-size: 15px; line-height: 1.4; color: var(--c-muted); }
.guest-price { font-size: 16px; font-weight: 800; color: var(--c-text); white-space: nowrap; background: none; }
.card.guest-flow .selectable-card:active { transform: scale(.985); }

/* Forma de pagamento */
.card.guest-flow .guest-payment { grid-template-columns: minmax(0, 1fr); gap: 12px; }
.card.guest-flow .guest-option { position: relative; gap: 4px; padding: 16px 16px 16px 52px; }
.guest-option::before {
  content: '';
  position: absolute;
  left: 16px;
  top: 18px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 2px solid var(--c-border);
  background: transparent;
}
.guest-option.selected::before {
  border-color: var(--c-primary);
  background: var(--c-primary);
  box-shadow: inset 0 0 0 4px var(--c-surface);
}
.guest-option:disabled { opacity: .6; cursor: not-allowed; }
.guest-option-row { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }

/* Mensagens */
.guest-alert {
  margin: 0;
  padding: 12px 14px;
  font-size: 15px;
  font-weight: 600;
  line-height: 1.5;
  color: var(--c-text);
  background: color-mix(in srgb, var(--c-danger) 12%, var(--c-surface));
  border: 1px solid color-mix(in srgb, var(--c-danger) 45%, var(--c-border));
  border-left: 4px solid var(--c-danger);
  border-radius: 12px;
}
.guest-empty {
  margin: 0;
  padding: 16px;
  font-size: 15px;
  line-height: 1.5;
  text-align: center;
  color: var(--c-muted);
  border: 1px dashed var(--c-border);
  border-radius: 12px;
}
.card.guest-flow .guest-help,
.card.guest-manage .guest-help { margin: 0; font-size: 15px; line-height: 1.5; color: var(--c-muted); }
.guest-section-title { margin: 0; font-size: 18px; font-weight: 800; line-height: 1.3; }
.guest-time-box { display: grid; gap: 12px; min-width: 0; }
.guest-contact { display: grid; gap: 20px; }

/* Ação principal na zona do polegar, sem cobrir conteúdo */
.guest-actions {
  position: sticky;
  bottom: calc(env(safe-area-inset-bottom, 0px) + 8px);
  z-index: 5;
  display: grid;
  gap: 12px;
  margin-top: auto;
  padding: 12px 0 4px;
  background: var(--c-surface);
  box-shadow: 0 -8px 0 var(--c-surface);
}
body:has(#app-bottom-nav > *) .guest-actions { bottom: calc(env(safe-area-inset-bottom, 0px) + 80px); }

/* Pix */
.guest-pix {
  display: grid;
  gap: 12px;
  min-width: 0;
  padding: 16px;
  background: var(--c-bg);
  border: 1px solid var(--c-border);
  border-radius: 12px;
}
.guest-pix-title { margin: 0; font-size: 17px; font-weight: 800; }
.guest-pix-amount { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; font-size: 15px; }
.guest-pix-amount strong { text-align: right; overflow-wrap: anywhere; }
.guest-pix-qr { justify-self: center; width: 220px; max-width: 100%; height: auto; padding: 10px; background: #fff; border-radius: 12px; }
.guest-pix .guest-help { margin: 0; }
.guest-pix .pix-code-box { max-height: 112px; margin: 0; overflow: auto; font-size: 14px; overflow-wrap: anywhere; user-select: all; }

/* Situação do agendamento */
.guest-status {
  --dot: var(--c-muted);
  display: inline-flex;
  align-items: center;
  align-self: flex-start;
  margin: 0;
  padding: 6px 12px;
  font-size: 15px;
  font-weight: 700;
  color: var(--c-text);
  border: 1px solid var(--c-border);
  border-radius: 999px;
}
.guest-status::before { content: ''; width: 8px; height: 8px; margin-right: 8px; border-radius: 50%; background: var(--dot); }
.guest-status-ok { --dot: var(--c-success); }
.guest-status-warn { --dot: var(--c-warning); }

/* Sucesso */
.guest-success { display: grid; gap: 20px; min-width: 0; }
.guest-success-head { display: grid; gap: 8px; justify-items: center; text-align: center; }
.guest-success-head .card-subtitle { color: var(--c-muted); }
.guest-success-seal { display: block; width: 64px; height: 64px; margin-inline: auto; color: var(--c-success); }
.guest-success-seal circle { fill: none; stroke: currentColor; stroke-width: 2; }
.guest-success-seal path { fill: none; stroke: currentColor; stroke-width: 4; stroke-linecap: round; stroke-linejoin: round; }

/* Toque sem hover não deve deixar o card "levantado" */
@media (hover: none) {
  .card.guest-flow .selectable-card:hover { transform: none; border-color: var(--c-border); }
  .card.guest-flow .selectable-card.selected:hover { border-color: var(--c-primary); }
}
@media (prefers-reduced-motion: reduce) {
  .guest-flow *, .guest-manage * { animation: none !important; transition: none !important; }
}
