/**
 * Laser Termin Buchung — Formular-Stile
 */

.ltb-termin {
  --ltb-primary: #00bcd4;
  --ltb-primary-dark: #0097a7;
  --ltb-text: #0f172a;
  --ltb-muted: #64748b;
  --ltb-border: #e2e8f0;
  --ltb-bg: #ffffff;
  --ltb-radius: 14px;
  --ltb-radius-sm: 12px;
  --ltb-shadow: 0 4px 24px rgba(15, 23, 42, 0.08);
  --ltb-shadow-hover: 0 8px 28px rgba(0, 188, 212, 0.18);
  --ltb-font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;

  max-width: 40rem;
  margin: 0 auto;
  font-family: var(--ltb-font);
  color: var(--ltb-text);
  -webkit-font-smoothing: antialiased;
}

.ltb-termin__inner {
  background: var(--ltb-bg);
  border: 1px solid var(--ltb-border);
  border-radius: calc(var(--ltb-radius) + 4px);
  box-shadow: var(--ltb-shadow);
  padding: clamp(1.25rem, 4vw, 1.85rem);
}

/* Fortschritt */
.ltb-progress {
  margin-bottom: 1.5rem;
}

.ltb-progress__track {
  height: 6px;
  background: #f1f5f9;
  border-radius: 999px;
  overflow: hidden;
  margin-bottom: 0.65rem;
}

.ltb-progress__fill {
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--ltb-primary) 0%, var(--ltb-primary-dark) 100%);
  transition: width 0.35s cubic-bezier(0.22, 1, 0.36, 1);
}

.ltb-progress__label {
  margin: 0;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--ltb-muted);
}

.ltb-progress__title {
  color: var(--ltb-text);
  font-weight: 600;
}

/* Schritte */
.ltb-steps {
  position: relative;
  min-height: 12rem;
}

.ltb-step {
  opacity: 0;
  visibility: hidden;
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  transform: translateX(12px);
  transition:
    opacity 0.3s ease,
    transform 0.3s ease,
    visibility 0.3s;
  pointer-events: none;
}

.ltb-step--active {
  opacity: 1;
  visibility: visible;
  position: relative;
  transform: translateX(0);
  pointer-events: auto;
}

.ltb-step__heading {
  margin: 0 0 0.35rem;
  font-size: clamp(1.2rem, 2.5vw, 1.45rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.2;
  color: var(--ltb-text);
}

.ltb-step__lead {
  margin: 0 0 1.25rem;
  font-size: 0.95rem;
  line-height: 1.55;
  color: var(--ltb-muted);
}

.ltb-step__error {
  margin: 1rem 0 0;
  font-size: 0.875rem;
  font-weight: 500;
  color: #b91c1c;
}

.ltb-step__error[hidden] {
  display: none !important;
}

/* Optionen Schritt 1 */
.ltb-option-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.65rem;
}

@media (min-width: 480px) {
  .ltb-option-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

.ltb-option {
  margin: 0;
  cursor: pointer;
}

.ltb-option__input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.ltb-option__card {
  display: block;
  padding: 0.85rem 1rem;
  text-align: center;
  font-size: 0.9375rem;
  font-weight: 600;
  border: 2px solid var(--ltb-border);
  border-radius: var(--ltb-radius-sm);
  background: #fafbfc;
  transition:
    border-color 0.2s ease,
    background 0.2s ease,
    box-shadow 0.2s ease,
    transform 0.2s ease;
}

.ltb-option__input:focus-visible + .ltb-option__card {
  outline: 2px solid var(--ltb-primary);
  outline-offset: 2px;
}

.ltb-option__input:checked + .ltb-option__card {
  border-color: var(--ltb-primary);
  background: rgba(0, 188, 212, 0.08);
  box-shadow: 0 4px 16px rgba(0, 188, 212, 0.12);
}

.ltb-option:hover .ltb-option__card {
  border-color: #cbd5e1;
}

.ltb-option__input:checked + .ltb-option__card {
  transform: translateY(-1px);
}

/* Felder */
.ltb-field {
  margin-bottom: 1rem;
}

.ltb-field__label {
  display: block;
  margin-bottom: 0.35rem;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--ltb-text);
}

.ltb-optional {
  font-weight: 500;
  color: var(--ltb-muted);
}

.ltb-field__input {
  width: 100%;
  max-width: 100%;
  padding: 0.6rem 0.85rem;
  font: inherit;
  font-size: 1rem;
  border: 1px solid var(--ltb-border);
  border-radius: var(--ltb-radius-sm);
  background: var(--ltb-bg);
  color: var(--ltb-text);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.ltb-field__input:focus {
  outline: none;
  border-color: var(--ltb-primary);
  box-shadow: 0 0 0 3px rgba(0, 188, 212, 0.22);
}

.ltb-field__input--date {
  min-height: 2.75rem;
}

/* Zeitslots */
.ltb-slots {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.35rem;
}

.ltb-slot {
  margin: 0;
  cursor: pointer;
}

.ltb-slot__input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.ltb-slot__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 4.5rem;
  padding: 0.5rem 0.65rem;
  font-size: 0.875rem;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  border: 2px solid var(--ltb-border);
  border-radius: 10px;
  background: #fafbfc;
  transition:
    border-color 0.2s ease,
    background 0.2s ease,
    box-shadow 0.2s ease;
}

.ltb-slot__input:focus-visible + .ltb-slot__btn {
  outline: 2px solid var(--ltb-primary);
  outline-offset: 2px;
}

.ltb-slot__input:checked + .ltb-slot__btn {
  border-color: var(--ltb-primary);
  background: rgba(0, 188, 212, 0.1);
  color: var(--ltb-primary-dark);
  box-shadow: 0 2px 10px rgba(0, 188, 212, 0.15);
}

.ltb-slot:hover .ltb-slot__btn {
  border-color: #cbd5e1;
}

/* Zusammenfassung */
.ltb-summary {
  margin: 0;
  padding: 1rem 1.1rem;
  background: #f8fafc;
  border: 1px solid var(--ltb-border);
  border-radius: var(--ltb-radius-sm);
}

.ltb-summary__row {
  display: grid;
  grid-template-columns: minmax(0, 7.5rem) 1fr;
  gap: 0.5rem 1rem;
  padding: 0.5rem 0;
  border-bottom: 1px solid #e8eef3;
  font-size: 0.9375rem;
}

.ltb-summary__row:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.ltb-summary__row:first-child {
  padding-top: 0;
}

.ltb-summary dt {
  margin: 0;
  font-weight: 600;
  color: var(--ltb-muted);
}

.ltb-summary dd {
  margin: 0;
  font-weight: 500;
  color: var(--ltb-text);
  word-break: break-word;
}

/* Aktionen */
.ltb-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  justify-content: flex-end;
  margin-top: 1.5rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--ltb-border);
}

.ltb-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.65rem;
  padding: 0.55rem 1.35rem;
  font: inherit;
  font-size: 0.9375rem;
  font-weight: 600;
  border-radius: var(--ltb-radius-sm);
  cursor: pointer;
  transition:
    transform 0.15s ease,
    box-shadow 0.2s ease,
    background 0.2s ease,
    color 0.2s ease,
    border-color 0.2s ease;
}

.ltb-btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  transform: none;
}

.ltb-btn--primary {
  border: none;
  color: #fff;
  background: linear-gradient(145deg, var(--ltb-primary) 0%, var(--ltb-primary-dark) 100%);
  box-shadow: 0 4px 14px rgba(0, 151, 167, 0.35);
}

.ltb-btn--primary:hover:not(:disabled) {
  filter: brightness(1.04);
  box-shadow: 0 6px 20px rgba(0, 188, 212, 0.35);
}

.ltb-btn--primary:focus-visible {
  outline: none;
  box-shadow:
    0 4px 14px rgba(0, 151, 167, 0.35),
    0 0 0 3px rgba(0, 188, 212, 0.35);
}

.ltb-btn--ghost {
  border: 2px solid var(--ltb-border);
  background: transparent;
  color: var(--ltb-muted);
}

.ltb-btn--ghost:hover:not(:disabled) {
  border-color: #cbd5e1;
  color: var(--ltb-text);
}

.ltb-btn--back {
  margin-right: auto;
}

/* Erfolg */
.ltb-success {
  text-align: center;
  padding: 2rem 1rem;
}

.ltb-success[hidden] {
  display: none !important;
}

.ltb-success__icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 3.5rem;
  height: 3.5rem;
  margin: 0 auto 1rem;
  font-size: 1.75rem;
  font-weight: 700;
  color: #fff;
  background: linear-gradient(145deg, var(--ltb-primary) 0%, var(--ltb-primary-dark) 100%);
  border-radius: 50%;
  box-shadow: 0 8px 24px rgba(0, 188, 212, 0.35);
}

.ltb-success__text {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 600;
  line-height: 1.5;
  color: var(--ltb-text);
}

/* Honeypot */
.ltb-hp {
  position: absolute !important;
  left: -9999px !important;
  top: auto !important;
  width: 1px !important;
  height: 1px !important;
  overflow: hidden !important;
}

@media (prefers-reduced-motion: reduce) {
  .ltb-step,
  .ltb-progress__fill,
  .ltb-option__card,
  .ltb-btn {
    transition: none;
  }

  .ltb-step {
    transform: none;
  }

  .ltb-step--active {
    transform: none;
  }
}
