/* ────────────────────────────────────────────────────────────
   Höfetour Zukunft – Buchungsformular CSS
   Farben entnommen aus kreislaufregion.at
   ──────────────────────────────────────────────────────────── */

:root {
  --ht-green:        #5F842D;
  --ht-green-dark:   #4a6622;
  --ht-green-light:  #f2f6ea;
  --ht-green-border: #c8d9b0;
  --ht-yellow:       #d4d98a;
  --ht-yellow-dark:  #b8bd60;
  --ht-text:         #2d3520;
  --ht-muted:        #6b7280;
  --ht-white:        #ffffff;
  --ht-radius:       12px;
  --ht-shadow:       0 4px 24px rgba(74,103,65,.12);
  --ht-transition:   .22s ease;
}

/* ── App wrapper ─────────────────────────────────────────── */
.ht-app {
  font-family: 'Nunito', 'Segoe UI', Arial, sans-serif;
  color: var(--ht-text);
  max-width: 860px;
  margin: 0 auto;
  /* iOS viewport fix: verhindert Layout-Sprung beim ersten Laden */
  min-height: 1px;
}

/* ── Event-Info (ersetzt Logo-Header) ───────────────────── */
.ht-event-info {
  display: flex;
  justify-content: center;
  gap: 24px;
  flex-wrap: wrap;
  font-size: 14px;
  color: var(--ht-muted);
  margin-bottom: 28px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--ht-green-border);
}
.ht-event-info strong { color: var(--ht-green); }

/* ── Timeslot-Sektionen ──────────────────────────────────── */
.ht-timeslot-section {
  margin-bottom: 32px;
}
.ht-timeslot-heading {
  font-size: 16px;
  font-weight: 700;
  color: var(--ht-green);
  margin: 0 0 14px;
  padding: 8px 14px;
  background: var(--ht-green-light);
  border-left: 3px solid var(--ht-green);
  border-radius: 0 6px 6px 0;
}
.ht-no-stations {
  color: var(--ht-muted);
  font-size: 14px;
  font-style: italic;
}
.ht-slot-remaining {
  display: inline-block;
  font-size: 12px;
  color: var(--ht-green);
  background: var(--ht-green-light);
  border-radius: 10px;
  padding: 2px 8px;
  margin-top: 6px;
}
.ht-slot-full {
  display: inline-block;
  font-size: 12px;
  color: #b91c1c;
  background: #fef2f2;
  border-radius: 10px;
  padding: 2px 8px;
  margin-top: 6px;
}

/* ── Skip-Button ─────────────────────────────────────────── */
.ht-btn-skip {
  background: #f3f4f6;
  border: 1.5px solid #d1d5db;
  color: #9ca3af;
  border-radius: 8px;
  padding: 10px 18px;
  font-size: 13px;
  font-family: inherit;
  cursor: pointer;
  transition: var(--ht-transition);
  font-weight: 500;
}
.ht-btn-skip:hover {
  border-color: #9ca3af;
  color: #6b7280;
  background: #e9eaec;
}
.ht-btn-skip.active {
  background: #fff8e1;
  border-color: #e0a800;
  border-style: solid;
  color: #78620a;
  font-weight: 600;
}

/* ── Nav-Back (zweite Nav-Zeile) ─────────────────────────── */
.ht-nav-back {
  display: flex;
  margin-top: 8px;
}

/* ── Header-Bereich (altes Logo – jetzt ausgeblendet) ────── */
.ht-header { display: none; }

/* ── Progress bar ────────────────────────────────────────── */
.ht-progress {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  margin-bottom: 40px;
  position: relative;
}
.ht-progress-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
  z-index: 1;
}
.ht-progress-step .circle {
  width: 36px; height: 36px;
  border-radius: 50%;
  border: 2px solid var(--ht-green-border);
  background: var(--ht-white);
  display: flex; align-items: center; justify-content: center;
  font-size: 14px; font-weight: 700;
  color: var(--ht-muted);
  transition: var(--ht-transition);
}
.ht-progress-step.active .circle {
  background: var(--ht-green);
  border-color: var(--ht-green);
  color: var(--ht-white);
  box-shadow: 0 0 0 4px rgba(74,103,65,.18);
}
.ht-progress-step.done .circle {
  background: var(--ht-yellow);
  border-color: var(--ht-yellow-dark);
  color: var(--ht-green-dark);
}
.ht-progress-step .label {
  font-size: 11px;
  margin-top: 6px;
  color: var(--ht-muted);
  white-space: nowrap;
  font-weight: 500;
}
.ht-progress-step.active .label { color: var(--ht-green); font-weight: 700; }
.ht-progress-line {
  flex: 1;
  height: 2px;
  background: var(--ht-green-border);
  margin: 0 8px;
  margin-bottom: 24px;
  min-width: 32px;
  transition: var(--ht-transition);
}
.ht-progress-line.done { background: var(--ht-yellow-dark); }

/* ── Step card ───────────────────────────────────────────── */
.ht-step {
  display: none;
  animation: htFadeIn .3s ease;
}
.ht-step.active { display: block; }
@keyframes htFadeIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

.ht-step-title {
  font-size: 22px;
  font-weight: 700;
  color: var(--ht-green);
  margin: 0 0 6px;
}
.ht-step-sub {
  color: var(--ht-muted);
  font-size: 14px;
  margin: 0 0 28px;
}

/* ── Station cards ───────────────────────────────────────── */
.ht-stations-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 16px;
  margin-bottom: 28px;
}
.ht-station-card {
  border: 2px solid var(--ht-green-border);
  border-radius: var(--ht-radius);
  background: var(--ht-white);
  overflow: hidden;
  cursor: pointer;
  transition: var(--ht-transition);
  position: relative;
}
.ht-station-card:hover { border-color: var(--ht-green); box-shadow: var(--ht-shadow); transform: translateY(-2px); }
.ht-station-card.selected { border-color: var(--ht-green); background: var(--ht-green-light); box-shadow: var(--ht-shadow); }
.ht-station-card.unavailable { opacity: .55; cursor: not-allowed; }
.ht-station-card.unavailable:hover { transform: none; box-shadow: none; }

.ht-station-img {
  width: 100%;
  height: 130px;
  object-fit: cover;
  display: block;
  background: linear-gradient(135deg, #c8d9b0 0%, #e8f0d0 100%);
}
.ht-station-img-placeholder {
  width: 100%;
  height: 130px;
  background: linear-gradient(135deg, #c8d9b0 0%, #e8f0d0 100%);
  display: flex; align-items: center; justify-content: center;
  font-size: 36px;
}

.ht-station-body { padding: 14px; }
.ht-station-name {
  font-size: 15px; font-weight: 700; color: var(--ht-green);
  margin: 0 0 4px;
}
.ht-station-meta {
  font-size: 12px; color: var(--ht-muted); margin: 0 0 10px;
}
.ht-station-excerpt {
  font-size: 13px; color: #4b5563; line-height: 1.5;
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical;
  overflow: hidden;
  margin: 0 0 12px;
}

/* Timeslot picker inside card */
.ht-timeslots {
  display: flex; gap: 8px; flex-wrap: wrap;
}
.ht-timeslot-btn {
  border: 1.5px solid var(--ht-green-border);
  background: var(--ht-white);
  border-radius: 20px;
  padding: 5px 14px;
  font-size: 13px;
  cursor: pointer;
  transition: var(--ht-transition);
  color: var(--ht-text);
}
.ht-timeslot-btn:hover { border-color: var(--ht-green); background: var(--ht-green-light); }
.ht-timeslot-btn.selected { background: var(--ht-green); color: #fff; border-color: var(--ht-green); }
/* Ausgewählt */
.ht-timeslot-btn.selected {
  background: var(--ht-green);
  color: #fff;
  border-color: var(--ht-green);
  font-weight: 700;
  box-shadow: 0 2px 8px rgba(95,132,45,.3);
}
/* Durch andere Auswahl blockiert */
.ht-timeslot-btn.blocked {
  opacity: .38;
  cursor: not-allowed;
  text-decoration: none;
  border-style: dashed;
}
/* Ausgebucht */
.ht-timeslot-btn.full {
  opacity: .45;
  cursor: not-allowed;
  text-decoration: line-through;
}
/* Kleine Hinweis-Labels innerhalb des Buttons */
.ht-ts-remaining {
  display: block;
  font-size: 10px;
  font-weight: 400;
  opacity: .8;
  margin-top: 2px;
}
.ht-ts-blocked-hint {
  display: block;
  font-size: 10px;
  opacity: .7;
  margin-top: 2px;
}
.ht-ts-full-hint {
  display: block;
  font-size: 10px;
  text-decoration: line-through;
  opacity: .7;
  margin-top: 2px;
}

/* Selected checkmark */
.ht-station-check {
  position: absolute; top: 10px; right: 10px;
  background: var(--ht-green);
  color: #fff;
  border-radius: 50%;
  width: 26px; height: 26px;
  display: none; align-items: center; justify-content: center;
  font-size: 14px;
  box-shadow: 0 2px 6px rgba(0,0,0,.2);
}
.ht-station-card.selected .ht-station-check { display: flex; }

/* ── Form fields ─────────────────────────────────────────── */
.ht-form { max-width: 520px; }
.ht-form-group { margin-bottom: 18px; }
.ht-form-group label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--ht-green-dark);
  margin-bottom: 6px;
}
.ht-form-group label .required { color: #dc2626; margin-left: 2px; }
.ht-form-group input[type="text"],
.ht-form-group input[type="email"] {
  width: 100%;
  box-sizing: border-box;
  border: 1.5px solid var(--ht-green-border);
  border-radius: 8px;
  padding: 10px 14px;
  font-size: 15px;
  font-family: inherit;
  color: var(--ht-text);
  background: var(--ht-white);
  transition: var(--ht-transition);
  outline: none;
}
.ht-form-group input:focus {
  border-color: var(--ht-green);
  box-shadow: 0 0 0 3px rgba(74,103,65,.15);
}
.ht-form-group input.ht-error { border-color: #dc2626; }

/* ── DSGVO-Checkbox ───────────────────────────────────────── */
.ht-dsgvo-group {
  background: var(--ht-green-light);
  border: 1.5px solid var(--ht-green-border);
  border-radius: 8px;
  padding: 14px 16px;
  margin-top: 8px;
}
.ht-dsgvo-group.ht-dsgvo-error {
  border-color: #dc2626;
  background: #fef2f2;
}
.ht-checkbox-label {
  display: flex !important;
  align-items: flex-start;
  gap: 12px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 400 !important;
  color: var(--ht-text);
  line-height: 1.5;
}
.ht-checkbox {
  width: 18px !important;
  height: 18px !important;
  min-width: 18px;
  margin-top: 2px;
  accent-color: var(--ht-green);
  cursor: pointer;
  border: none !important;
  box-shadow: none !important;
  padding: 0 !important;
}
.ht-checkbox-label a {
  color: var(--ht-green);
  font-weight: 600;
  text-decoration: underline;
}
.ht-checkbox-label a:hover { color: var(--ht-green-dark); }

.ht-dsgvo-hint {
  font-size: 12px;
  color: var(--ht-muted);
  margin: 6px 0 0;
  line-height: 1.5;
}
.ht-form-row { display: grid; grid-template-columns: 1fr 2fr; gap: 12px; }

.ht-persons-toggle {
  display: flex; gap: 10px; margin-bottom: 18px;
}
.ht-persons-btn {
  flex: 1;
  border: 2px solid var(--ht-green-border);
  background: var(--ht-white);
  border-radius: 10px;
  padding: 12px;
  font-family: inherit;
  font-size: 15px;
  cursor: pointer;
  transition: var(--ht-transition);
  color: var(--ht-text);
}
.ht-persons-btn.selected { border-color: var(--ht-green); background: var(--ht-green-light); font-weight: 700; color: var(--ht-green); }

/* ── Summary ─────────────────────────────────────────────── */
.ht-summary-section {
  background: var(--ht-green-light);
  border: 1px solid var(--ht-green-border);
  border-radius: var(--ht-radius);
  padding: 20px 24px;
  margin-bottom: 18px;
}
.ht-summary-section h3 {
  font-size: 14px; font-weight: 700; color: var(--ht-green);
  margin: 0 0 12px;
  text-transform: uppercase; letter-spacing: .5px;
}
.ht-summary-row {
  display: flex; justify-content: space-between;
  font-size: 14px; padding: 4px 0;
  border-bottom: 1px solid var(--ht-green-border);
}
.ht-summary-row:last-child { border-bottom: none; }
.ht-summary-row .key { color: var(--ht-muted); }
.ht-summary-row .val { font-weight: 600; }

.ht-slot-item {
  display: flex; justify-content: space-between;
  font-size: 14px; padding: 6px 0;
  border-bottom: 1px solid var(--ht-green-border);
}
.ht-slot-item:last-child { border-bottom: none; }
.ht-slot-name { font-weight: 600; }
.ht-slot-time { color: var(--ht-muted); font-size: 13px; }

.ht-price-box {
  background: var(--ht-green);
  color: var(--ht-white);
  border-radius: var(--ht-radius);
  padding: 18px 24px;
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 18px;
}
.ht-price-box .label { font-size: 14px; opacity: .85; }
.ht-price-box .amount { font-size: 28px; font-weight: 700; color: var(--ht-yellow); }

.ht-notice {
  background: #fff8e1;
  border: 1px solid #e0c96e;
  border-left: 4px solid #e0a800;
  border-radius: 8px;
  padding: 14px 16px;
  font-size: 13px;
  color: #78620a;
  margin-bottom: 18px;
}

/* ── Navigation buttons ──────────────────────────────────── */
.ht-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 28px;
  gap: 12px;
  flex-wrap: wrap;
}
.ht-btn {
  border: none; border-radius: 8px; padding: 13px 28px;
  font-size: 15px; font-weight: 700; font-family: inherit;
  cursor: pointer; transition: var(--ht-transition);
  display: inline-flex; align-items: center; gap: 8px;
}
.ht-btn-primary {
  background: var(--ht-green);
  color: var(--ht-white);
  box-shadow: 0 2px 8px rgba(74,103,65,.25);
}
.ht-btn-primary:hover { background: var(--ht-green-dark); transform: translateY(-1px); }
.ht-btn-primary:disabled { opacity: .6; cursor: not-allowed; transform: none; }
.ht-btn-secondary {
  background: transparent;
  border: 1.5px solid var(--ht-green-border);
  color: var(--ht-green);
}
.ht-btn-secondary:hover { background: var(--ht-green-light); }

/* ── Success screen ──────────────────────────────────────── */
.ht-success {
  text-align: center;
  padding: 48px 24px;
}
.ht-success-icon {
  width: 80px; height: 80px;
  background: var(--ht-green);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 36px;
  margin: 0 auto 24px;
  animation: htPop .4s cubic-bezier(.2,1.5,.5,1);
}
@keyframes htPop {
  from { transform: scale(0); opacity: 0; }
  to   { transform: scale(1); opacity: 1; }
}
.ht-success h2 { color: var(--ht-green); font-size: 26px; margin: 0 0 10px; }
.ht-success .ref { font-size: 18px; color: var(--ht-muted); margin: 0 0 20px; }
.ht-success .ref strong { color: var(--ht-green-dark); }

/* ── Error messages ──────────────────────────────────────── */
.ht-error-msg {
  background: #fef2f2;
  border: 1px solid #fca5a5;
  border-radius: 8px;
  color: #b91c1c;
  padding: 12px 16px;
  font-size: 14px;
  margin-bottom: 16px;
  display: none;
}
.ht-error-msg.visible { display: block; }

/* ── Loading spinner ─────────────────────────────────────── */
.ht-spinner {
  width: 20px; height: 20px;
  border: 2.5px solid rgba(255,255,255,.4);
  border-top-color: #fff;
  border-radius: 50%;
  animation: htSpin .7s linear infinite;
  display: none;
}
.ht-spinner.visible { display: inline-block; }
@keyframes htSpin { to { transform: rotate(360deg); } }

/* ── Loading state for initial fetch ─────────────────────── */
.ht-loading {
  text-align: center; padding: 60px 20px; color: var(--ht-muted);
}
.ht-loading-dots span {
  display: inline-block; width: 10px; height: 10px;
  border-radius: 50%; background: var(--ht-green);
  margin: 0 4px; animation: htDot 1.2s ease-in-out infinite;
}
.ht-loading-dots span:nth-child(2) { animation-delay: .2s; }
.ht-loading-dots span:nth-child(3) { animation-delay: .4s; }
@keyframes htDot { 0%,80%,100% { transform: scale(0); } 40% { transform: scale(1); } }

/* ── Responsive ──────────────────────────────────────────── */
@media (max-width: 600px) {
  .ht-stations-grid { grid-template-columns: 1fr; }
  .ht-form-row { grid-template-columns: 1fr; }
  .ht-progress-step .label { display: none; }
  .ht-price-box .amount { font-size: 22px; }
  /* Nav-Buttons: volle Breite, Skip oben, Weiter unten */
  .ht-nav {
    flex-direction: column-reverse;
  }
  .ht-nav .ht-btn {
    width: 100%;
    text-align: center;
    justify-content: center;
  }
  .ht-nav-back .ht-btn {
    width: 100%;
    text-align: center;
    justify-content: center;
  }
}
