/* WAGTEC Booking System */
#wagtec-booking-app {
  max-width: 700px;
  margin: 0 auto;
  font-family: -apple-system, BlinkMacSystemFont, 'Inter', sans-serif;
  color: #333;
}
#wagtec-booking-app input, #wagtec-booking-app select, #wagtec-booking-app textarea,
#wagtec-booking-app label, #wagtec-booking-app p, #wagtec-booking-app h2,
#wagtec-booking-app h3 { color: inherit; }

/* ── Steps Indicator ── */
.wtb-steps {
  display: flex;
  gap: 4px;
  margin-bottom: 30px;
}
.wtb-step {
  flex: 1;
  text-align: center;
  padding: 10px 8px;
  background: #eee;
  border-radius: 6px;
  font-size: 0.85em;
  color: #888;
  transition: all 0.2s;
}
.wtb-step.active, .wtb-step.active * {
  background: #2b58ff;
  color: #fff !important;
  font-weight: 600;
}
.wtb-step.done {
  background: #d4edda;
  color: #155724;
}
.wtb-step-num {
  display: inline-block;
  width: 22px;
  height: 22px;
  line-height: 22px;
  border-radius: 50%;
  background: rgba(0,0,0,0.1);
  font-size: 0.8em;
  margin-right: 4px;
}
.wtb-step.active .wtb-step-num { background: rgba(255,255,255,0.3); }

/* ── Cards Grid ── */
.wtb-services-grid, .wtb-regions-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 16px;
  margin-bottom: 20px;
}
.wtb-card {
  border: 2px solid #e0e0e0;
  border-radius: 10px;
  overflow: hidden;
  cursor: pointer;
  transition: all 0.2s;
  background: #fff;
}
.wtb-card:hover {
  border-color: #2b58ff;
  box-shadow: 0 4px 12px rgba(43, 88, 255, 0.15);
  transform: translateY(-2px);
}
.wtb-card-img {
  width: 100%;
  height: 140px;
  object-fit: cover;
}
.wtb-card-body {
  padding: 16px;
}
.wtb-card-body h3 {
  margin: 0 0 8px;
  font-size: 1.05em;
}
.wtb-card-desc {
  font-size: 0.85em;
  color: #666;
  margin: 0 0 10px;
}
.wtb-card-meta {
  display: flex;
  justify-content: space-between;
  font-size: 0.9em;
}
.wtb-price { font-weight: 600; color: #2b58ff; }
.wtb-duration { color: #888; }

.wtb-region-card .wtb-card-body {
  padding: 24px 16px;
  text-align: center;
}
.wtb-region-card h3 { margin: 0; font-size: 1.1em; }

/* ── Calendar ── */
.wtb-calendar {
  margin-bottom: 20px;
}
.wtb-cal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 0;
  font-weight: 600;
  font-size: 1.1em;
}
#wagtec-booking-app .wtb-cal-prev,
#wagtec-booking-app .wtb-cal-next {
  background: #eee;
  color: #222 !important;
  border: 1px solid #ccc;
  border-radius: 6px;
  padding: 6px 14px;
  cursor: pointer;
  font-size: 1.1em;
  font-weight: 700;
}
#wagtec-booking-app .wtb-cal-prev:hover,
#wagtec-booking-app .wtb-cal-next:hover { background: #ddd; }

.wtb-cal-days {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 4px;
}
.wtb-cal-dayname {
  text-align: center;
  font-size: 0.8em;
  font-weight: 600;
  color: #888;
  padding: 8px 0;
}
.wtb-cal-day {
  text-align: center;
  padding: 10px 4px;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.15s;
  font-size: 0.95em;
}
.wtb-cal-day:hover:not(.disabled):not(.empty) { background: #e8edff; }
.wtb-cal-day.selected { background: #2b58ff; color: #fff; font-weight: 600; }
.wtb-cal-day.disabled { color: #999; background: #e9e9e9; cursor: default; }
.wtb-cal-day.loading { color: #888; background: #f5f5f5; cursor: wait; }
.wtb-cal-day.available { background: #4caf50; color: #fff !important; font-weight: 700; cursor: pointer; border-radius: 6px; }
.wtb-cal-day.available:hover { background: #388e3c; }
.wtb-cal-day.booked { background: #ef5350; color: #fff !important; font-weight: 600; cursor: not-allowed; border-radius: 6px; }
.wtb-cal-day.selected { background: #2b58ff !important; color: #fff !important; font-weight: 600; }
.wtb-cal-day.empty { cursor: default; }

/* ── Slots ── */
.wtb-slots {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 16px 0;
}
#wagtec-booking-app .wtb-slot-btn {
  padding: 14px 24px;
  border: 2px solid #ddd;
  border-radius: 8px;
  background: #f8f8f8;
  color: #222 !important;
  cursor: pointer;
  font-size: 1em;
  font-weight: 700;
  transition: all 0.15s;
  min-width: 160px;
  text-align: center;
}
#wagtec-booking-app .wtb-slot-btn:hover { border-color: #2b58ff; background: #e8edff; color: #222 !important; }
#wagtec-booking-app .wtb-slot-btn.selected { border-color: #2b58ff; background: #2b58ff; color: #fff !important; }

.wtb-no-slots {
  color: #888;
  font-style: italic;
  padding: 20px 0;
}
.wtb-loading-text {
  color: #888;
  padding: 20px 0;
}

/* ── Summary ── */
.wtb-summary {
  background: #f8f9fa;
  border-radius: 8px;
  padding: 20px;
  margin-bottom: 20px;
}
.wtb-summary-row {
  padding: 6px 0;
  border-bottom: 1px solid #eee;
}
.wtb-summary-row:last-child { border-bottom: none; }

/* ── Contact Form ── */
.wtb-contact-form {
  margin-bottom: 20px;
}
.wtb-form-row {
  margin-bottom: 14px;
}
.wtb-form-row label {
  display: block;
  font-weight: 600;
  margin-bottom: 4px;
  font-size: 0.9em;
}
.wtb-form-row input,
.wtb-form-row textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #ddd;
  border-radius: 6px;
  font-size: 0.95em;
  font-family: inherit;
}
.wtb-form-row input:focus,
.wtb-form-row textarea:focus {
  border-color: #2b58ff;
  outline: none;
  box-shadow: 0 0 0 3px rgba(43, 88, 255, 0.1);
}

/* ── Buttons ── */
.wtb-confirm-btn {
  display: block;
  width: 100%;
  padding: 14px;
  background: #2b58ff;
  color: #fff !important;
  border: none;
  border-radius: 8px;
  font-size: 1.05em;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s;
}
.wtb-confirm-btn:hover { background: #1e45d9; }
.wtb-confirm-btn:disabled { background: #99b0ff; cursor: wait; }

#wagtec-booking-app .wtb-back {
  display: inline-block;
  margin-top: 16px;
  background: none;
  border: none;
  color: #555 !important;
  cursor: pointer;
  font-size: 0.9em;
  padding: 8px 0;
}
#wagtec-booking-app .wtb-back:hover { color: #222 !important; }

/* ── Success ── */
.wtb-success {
  text-align: center;
  padding: 40px 20px;
}
.wtb-success h2 {
  color: #28a745;
  font-size: 1.5em;
}

/* ── Loading ── */
.wtb-loading {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(255,255,255,0.8);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
}
.wtb-spinner {
  width: 40px;
  height: 40px;
  border: 4px solid #e0e0e0;
  border-top-color: #2b58ff;
  border-radius: 50%;
  animation: wtb-spin 0.7s linear infinite;
}
@keyframes wtb-spin { to { transform: rotate(360deg); } }

/* ── Responsive ── */
@media (max-width: 768px) {
  #wagtec-booking-app { padding: 0 8px; }
  .wtb-services-grid, .wtb-regions-grid {
    grid-template-columns: 1fr 1fr;
  }
  .wtb-slot-btn { min-width: 120px; }
}

@media (max-width: 600px) {
  .wtb-steps { flex-wrap: wrap; gap: 4px; }
  .wtb-step { font-size: 0.75em; padding: 8px 4px; min-width: 0; }
  .wtb-services-grid, .wtb-regions-grid {
    grid-template-columns: 1fr;
  }
  .wtb-slot-btn { min-width: 0; flex: 1 1 calc(50% - 6px); }
  .wtb-cal-days { gap: 2px; font-size: 0.8em; }
  .wtb-cal-day { padding: 8px 2px; min-height: 36px; }
  .wtb-summary { font-size: 0.9em; }
}

@media (max-width: 400px) {
  .wtb-step { font-size: 0.7em; padding: 6px 2px; }
  .wtb-cal-days { gap: 1px; font-size: 0.75em; }
  .wtb-slot-btn { font-size: 0.85em; padding: 10px 8px; }
}

/* ── Terminverwaltung Responsive ── */
@media (max-width: 600px) {
  .wtb-termin-header { flex-direction: column; align-items: flex-start !important; }
  .wtb-termin-actions { width: 100%; }
  .wtb-termin-actions button { flex: 1; text-align: center; }
  .wtb-termin-details { grid-template-columns: 1fr 1fr !important; }
  .wtb-termin-card { padding: 12px !important; }
}
@media (max-width: 400px) {
  .wtb-termin-details { grid-template-columns: 1fr !important; }
}
