/* Erster Start (#105): drei Schritte bis zum ersten buchbaren Termin.  Farben, Schrift, Radien, Material und Bewegung
   kommen aus @gurkendevteam/design (Tokens, senjara-*); hier stehen nur Layout, Abstände (4er-Raster) und Zustände.
   Personen- und Raum-Chips, Dauer-Segmente und der Wochenbalken sind dieselben wie in Angebot und Team & Räume. */
.start {
  max-width: 640px;
  margin: 0 auto;
  padding: 8px 0 48px;
}
.start-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 24px;
}
.start-progress {
  margin: 0;
  color: var(--muted-foreground);
  font-size: var(--type-label);
  line-height: var(--type-label-leading);
  font-variant-numeric: tabular-nums;
}

/* Speicheranzeige: Punkt und ein Wort; bei Fehler „Erneut versuchen“. */
.start-save {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  color: var(--muted-foreground);
  font-size: var(--type-label);
  line-height: var(--type-label-leading);
}
.start-save:not([data-state]),
.start-save[data-state=""] {
  visibility: hidden;
}
.start-save::before {
  width: 8px;
  height: 8px;
  flex-shrink: 0;
  border-radius: var(--radius-pill);
  background: var(--tertiary-foreground);
  content: "";
}
.start-save[data-state="saved"]::before {
  background: var(--success);
}
.start-save[data-state="conflict"]::before {
  background: var(--ochre);
}
.start-save[data-state="error"] {
  color: var(--danger);
}
.start-save[data-state="error"]::before {
  background: var(--danger);
}
.start-retry,
.start-link {
  min-height: 44px;
  border: 0;
  padding: 0 4px;
  background: none;
  color: var(--forest);
  font: inherit;
  font-weight: var(--weight-medium);
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}
.start-retry[hidden] {
  display: none;
}

/* Schritte: drei gleich breite Leisten mit Namen; erledigte sind Knöpfe zurück. */
.start-track {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin: 12px 0 32px;
  padding: 0;
  list-style: none;
}
.start-track-step {
  display: grid;
  align-content: start;
  gap: 8px;
  width: 100%;
  min-height: 44px;
  border: 0;
  padding: 8px 0 0;
  background: none;
  color: var(--muted-foreground);
  font: inherit;
  font-size: var(--type-label);
  line-height: var(--type-label-leading);
  text-align: left;
}
button.start-track-step {
  cursor: pointer;
}
button.start-track-step:hover {
  color: var(--foreground);
}
button.start-track-step:focus-visible {
  border-radius: var(--radius-small);
  outline: 2px solid var(--ring);
  outline-offset: 2px;
}
.start-track-bar {
  display: block;
  height: 4px;
  border-radius: var(--radius-pill);
  background: var(--border);
  transition: background-color var(--motion-base) var(--ease-out);
}
.start-track [data-state="done"] .start-track-bar,
.start-track [data-state="current"] .start-track-bar {
  background: var(--forest);
}
.start-track [data-state="current"] .start-track-step {
  color: var(--foreground);
  font-weight: var(--weight-strong);
}

.start-title {
  margin: 0;
  color: var(--foreground);
  font-size: var(--type-title);
  font-weight: var(--weight-strong);
  line-height: var(--type-title-leading);
  letter-spacing: -0.02em;
}
.start-title:focus:not(:focus-visible) {
  outline: none;
}
.start-lead {
  max-width: 60ch;
  margin: 8px 0 0;
  color: var(--muted-foreground);
  font-size: var(--type-lead);
  line-height: var(--type-lead-leading);
}
.start-form {
  margin-top: 32px;
}
.start-body {
  display: grid;
  gap: 32px;
}

/* Felder: 44 px hoch, 16 px Schrift (auch mobil, kein Zoom beim Fokus). */
.start-field input:not([type="radio"]):not([type="checkbox"]),
.start-people input,
#start-room,
.start-zone {
  width: 100%;
  max-width: 400px;
  min-height: 44px;
  border: 1px solid var(--border);
  border-radius: var(--radius-small);
  padding: 0 12px;
  background: var(--card);
  color: var(--foreground);
  font: inherit;
  font-size: var(--type-lead);
  caret-color: var(--primary);
  transition: border-color var(--motion-fast) var(--ease-out);
}
.start-zone {
  max-width: none;
}
.start-field input:hover:not(:disabled),
.start-people input:hover:not(:disabled),
#start-room:hover:not(:disabled) {
  border-color: var(--muted-foreground);
}
.start-field input:focus-visible,
.start-people input:focus-visible,
#start-room:focus-visible {
  border-color: var(--ring);
  outline: 2px solid var(--ring);
  outline-offset: 1px;
}
.start [aria-invalid="true"]:not([type="radio"]):not([type="checkbox"]) {
  border-color: var(--danger);
}
.start input:disabled {
  opacity: 0.6;
}
.start-field-error {
  color: var(--danger);
  font-size: var(--type-label);
  line-height: var(--type-label-leading);
}
.start-field-error:empty {
  display: none;
}
.start-field > .angebot-chips + .start-people:not(:empty) {
  margin-top: 4px;
}
.start-people {
  display: grid;
  gap: 8px;
}
.start-people:empty {
  display: none;
}
.start-person {
  display: flex;
  align-items: center;
  gap: 4px;
  max-width: 448px;
}
.start-remove {
  display: inline-grid;
  place-items: center;
  width: 44px;
  height: 44px;
  flex-shrink: 0;
  border: 0;
  border-radius: var(--radius-pill);
  padding: 0;
  background: none;
  color: var(--muted-foreground);
  cursor: pointer;
}
.start-remove:hover:not(:disabled) {
  background: var(--accent);
  color: var(--foreground);
}
.start-remove:focus-visible {
  outline: 2px solid var(--ring);
  outline-offset: 2px;
}
.start-add {
  display: inline-flex;
  align-items: center;
  justify-self: start;
  gap: 8px;
}
.start-hint {
  max-width: 60ch;
  margin: 0;
  color: var(--muted-foreground);
  font-size: var(--type-label);
  line-height: var(--type-label-leading);
}
.start-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0 4px;
  margin: 0;
  color: var(--foreground);
  font-size: var(--type-body);
  line-height: var(--type-body-leading);
}
.start-week {
  display: grid;
  gap: 8px;
}
.start-week:focus {
  outline: none;
}
.start-own {
  display: grid;
  gap: 4px;
  margin: -24px 0 0;
  padding: 0;
  list-style: none;
}
.start-own li {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 44px;
  font-size: var(--type-body);
}
.start-own-hours {
  margin-left: auto;
  color: var(--muted-foreground);
  font-variant-numeric: tabular-nums;
}

.start-problem {
  margin: 24px 0 0;
  color: var(--danger);
  font-size: var(--type-body);
  line-height: var(--type-body-leading);
}
.start-problem:empty {
  display: none;
}
.start-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 32px;
  border-top: 1px solid var(--border);
  padding-top: 24px;
}
.start-state .start-actions,
.start-done .start-actions {
  border-top: 0;
  padding-top: 0;
}
.start-actions .button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 16px;
  text-decoration: none;
}
.start-actions [hidden] {
  display: none;
}
.start-primary {
  margin-left: auto;
}
.start-actions .start-later {
  border-color: transparent;
  background: transparent;
  color: var(--muted-foreground);
}
.start-actions .start-later:hover:not(:disabled) {
  border-color: transparent;
  background: var(--accent);
  color: var(--foreground);
}
.start-actions .button:disabled {
  opacity: 0.4;
}
.start-form[aria-busy="true"] .start-primary:disabled {
  opacity: 1;
}

/* Abschluss: buchbar, Link mit „Link kopieren“, „Testbuchung machen“, „Zum Kalender“. */
.start-done-mark {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  margin-bottom: 24px;
  border-radius: var(--radius-pill);
  background: var(--forest);
  color: var(--paper);
}
.start-share {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 24px;
  border: 1px solid var(--border);
  border-radius: var(--radius-medium);
  padding: 8px 8px 8px 16px;
  background: var(--card);
}
.start-share-link {
  display: block;
  flex: 1;
  min-width: 0;
  padding: 12px 0;
  overflow: hidden;
  color: var(--foreground);
  font-size: var(--type-body);
  font-variant-numeric: tabular-nums;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.start-share .button {
  display: inline-flex;
  flex-shrink: 0;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 16px;
}
.start-done .start-hint {
  margin-top: 16px;
}

@media (max-width: 560px) {
  .start {
    padding-top: 0;
  }
  .start-head {
    flex-wrap: wrap;
  }
  .start-actions {
    flex-direction: column;
    align-items: stretch;
  }
  .start-primary {
    order: -1;
    margin-left: 0;
  }
  .start-share {
    flex-direction: column;
    align-items: stretch;
    padding: 12px;
  }
  .start-share-link {
    overflow-wrap: anywhere;
    white-space: normal;
  }
  .start-own-hours {
    font-size: var(--type-label);
  }
}

@media (prefers-reduced-motion: reduce) {
  .start-track-bar,
  .start-field input {
    transition: none;
  }
}
