/* Clean Master Booking — Multi-Step UI */

:root {
  --cmb-primary: #0EA5E9;
  --cmb-primary-dark: #0369A1;
  --cmb-accent: #EC4899;
  --cmb-bg: #FFFFFF;
  --cmb-bg-soft: #F4F6F8;
  --cmb-border: #E5E7EB;
  --cmb-text: #1F2937;
  --cmb-text-dim: #6B7280;
  --cmb-error: #DC2626;
  --cmb-success: #16A34A;
}

.cmb-booking {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  max-width: 640px;
  margin: 0 auto;
  background: var(--cmb-bg);
  border-radius: 16px;
  padding: 32px 28px;
  box-shadow: 0 10px 40px rgba(14, 165, 233, 0.10);
  color: var(--cmb-text);
  position: relative;
}

/* Progress */
.cmb-progress { margin-bottom: 28px; }
.cmb-progress-bar {
  height: 6px;
  background: linear-gradient(90deg, var(--cmb-primary), var(--cmb-accent));
  border-radius: 999px;
  transition: width 0.4s ease;
}
.cmb-progress-steps {
  display: flex; justify-content: space-between;
  margin: 14px 0 4px;
}
.cmb-step {
  width: 32px; height: 32px;
  border-radius: 50%;
  background: var(--cmb-bg-soft);
  color: var(--cmb-text-dim);
  font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  font-size: 14px;
  transition: all 0.2s;
}
.cmb-step.active {
  background: var(--cmb-primary-dark);
  color: #fff;
  transform: scale(1.1);
}
.cmb-step.done {
  background: var(--cmb-success);
  color: #fff;
}
.cmb-progress-labels {
  display: flex; justify-content: space-between;
  font-size: 11px; color: var(--cmb-text-dim);
  text-transform: uppercase; letter-spacing: 0.04em;
}

/* Screens */
.cmb-screen { animation: cmb-slide-in 0.3s ease; }
.cmb-screen.hidden { display: none; }
@keyframes cmb-slide-in {
  from { opacity: 0; transform: translateX(10px); }
  to { opacity: 1; transform: translateX(0); }
}

.cmb-h {
  font-size: 22px;
  font-weight: 800;
  margin: 0 0 8px;
  color: var(--cmb-text);
  letter-spacing: -0.01em;
}
.cmb-sub {
  font-size: 14px;
  color: var(--cmb-text-dim);
  margin: 0 0 22px;
}

/* Inputs */
.cmb-booking input[type=text],
.cmb-booking input[type=tel],
.cmb-booking input[type=email],
.cmb-booking input[type=date],
.cmb-booking input[type=time],
.cmb-booking textarea {
  width: 100%;
  padding: 14px 16px;
  border: 2px solid var(--cmb-border);
  border-radius: 10px;
  font-size: 16px;
  font-family: inherit;
  margin-bottom: 12px;
  background: var(--cmb-bg-soft);
  color: var(--cmb-text);
  box-sizing: border-box;
  transition: border-color 0.15s, background 0.15s;
}
.cmb-booking input:focus, .cmb-booking textarea:focus {
  outline: 0;
  border-color: var(--cmb-primary);
  background: #fff;
}
.cmb-row { display: grid; grid-template-columns: 1fr 2fr; gap: 12px; }
@media (max-width:520px){ .cmb-row { grid-template-columns: 1fr; } }

.cmb-check {
  display: flex; align-items: flex-start; gap: 10px;
  font-size: 13px; color: var(--cmb-text-dim);
  margin: 8px 0 12px;
}
.cmb-check input { margin-top: 3px; }
.cmb-check a { color: var(--cmb-primary-dark); text-decoration: underline; }

/* Messages */
.cmb-msg {
  margin: 10px 0;
  padding: 0;
  font-size: 14px;
  min-height: 0;
}
.cmb-msg.error {
  padding: 12px 14px;
  background: #FEF2F2;
  color: var(--cmb-error);
  border-radius: 8px;
  border-left: 4px solid var(--cmb-error);
}
.cmb-msg.success {
  padding: 12px 14px;
  background: #F0FDF4;
  color: var(--cmb-success);
  border-radius: 8px;
  border-left: 4px solid var(--cmb-success);
}

/* Buttons */
.cmb-actions {
  display: flex; gap: 10px;
  margin-top: 18px;
  justify-content: space-between;
}
.cmb-btn {
  padding: 14px 24px;
  border: 0;
  border-radius: 10px;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s;
  font-family: inherit;
  flex: 1;
}
.cmb-btn-primary {
  background: linear-gradient(135deg, var(--cmb-primary), var(--cmb-primary-dark));
  color: #fff;
  box-shadow: 0 4px 14px rgba(14, 165, 233, 0.4);
}
.cmb-btn-primary:hover { box-shadow: 0 6px 20px rgba(14, 165, 233, 0.5); transform: translateY(-1px); }
.cmb-btn-primary:active { transform: translateY(0); }
.cmb-btn-secondary {
  background: var(--cmb-bg-soft);
  color: var(--cmb-text);
  flex: 0 1 auto;
}
.cmb-btn-secondary:hover { background: #E5E7EB; }
.cmb-btn-large { padding: 18px 30px; font-size: 17px; }

/* Wagen-Cards */
.cmb-cars {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 12px;
  margin-bottom: 14px;
}
@media (max-width:520px){ .cmb-cars { grid-template-columns: 1fr; } }
.cmb-car {
  background: var(--cmb-bg-soft);
  border: 2px solid var(--cmb-border);
  border-radius: 14px;
  padding: 20px 14px;
  text-align: center;
  cursor: pointer;
  transition: all 0.15s;
  font-family: inherit;
}
.cmb-car:hover {
  border-color: var(--cmb-primary);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(14, 165, 233, 0.2);
}
.cmb-car.selected {
  border-color: var(--cmb-primary-dark);
  background: #fff;
  box-shadow: 0 0 0 4px rgba(14, 165, 233, 0.15), 0 0 30px rgba(236, 72, 153, 0.2);
}
.cmb-car-ico { font-size: 40px; margin-bottom: 8px; }
.cmb-car-name { font-weight: 700; font-size: 15px; margin-bottom: 2px; }
.cmb-car-sub { font-size: 12px; color: var(--cmb-text-dim); }

/* Paket-Cards */
.cmb-packages {
  display: grid;
  gap: 12px;
  margin-bottom: 14px;
}
.cmb-pkg {
  background: var(--cmb-bg-soft);
  border: 2px solid var(--cmb-border);
  border-radius: 14px;
  overflow: hidden;
  transition: all 0.2s ease;
}
.cmb-pkg:hover { border-color: var(--cmb-primary); background: #fff; }
.cmb-pkg.selected {
  border-color: var(--cmb-primary-dark);
  background: #fff;
  box-shadow: 0 0 0 4px rgba(14, 165, 233, 0.15);
}
.cmb-pkg-head {
  display: flex; justify-content: space-between; align-items: center;
  padding: 16px 18px;
  cursor: pointer;
  user-select: none;
  gap: 12px;
}
.cmb-pkg-head > div:first-child { flex: 1; min-width: 0; }
.cmb-pkg-name { font-weight: 800; font-size: 16px; line-height: 1.25; }
.cmb-pkg-price-sub { font-weight: 700; font-size: 18px; color: var(--cmb-primary-dark); margin-top: 4px; line-height: 1; }
.cmb-pkg-expand {
  width: 36px; height: 36px;
  min-width: 36px;
  border-radius: 50%;
  background: var(--cmb-bg);
  border: 1.5px solid var(--cmb-border);
  font-size: 24px;
  color: var(--cmb-primary-dark);
  cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center;
  transition: transform 0.3s cubic-bezier(0.22,1,0.36,1), background 0.15s, color 0.15s, border-color 0.15s;
  font-family: inherit;
  line-height: 1;
  padding: 0;
  flex-shrink: 0;
  align-self: center;
}
.cmb-pkg.open .cmb-pkg-expand { transform: rotate(45deg); background: var(--cmb-primary-dark); color: #fff; border-color: var(--cmb-primary-dark); }
.cmb-pkg-details {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.35s ease, padding 0.35s ease;
  padding: 0 18px;
  font-size: 14px;
  color: var(--cmb-text-dim);
}
.cmb-pkg.open .cmb-pkg-details {
  max-height: 500px;
  padding: 0 18px 18px;
  border-top: 1px solid var(--cmb-border);
}
.cmb-pkg-details ul { margin: 12px 0 14px; padding-left: 18px; }
.cmb-pkg-details li { margin-bottom: 6px; line-height: 1.5; }
.cmb-pkg-select-btn { margin-top: 6px; width: 100%; }

/* Times */
.cmb-times {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 10px;
  margin: 6px 0 14px;
}
@media (max-width:520px){ .cmb-times { grid-template-columns: 1fr; } }
.cmb-time {
  background: var(--cmb-bg-soft);
  border: 2px solid var(--cmb-border);
  border-radius: 10px;
  padding: 14px 10px;
  cursor: pointer;
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  text-align: center;
  transition: all 0.15s;
}
.cmb-time:hover { border-color: var(--cmb-primary); }
.cmb-time.selected {
  background: var(--cmb-primary-dark);
  color: #fff;
  border-color: var(--cmb-primary-dark);
}
.cmb-time small { display: block; opacity: 0.7; margin-top: 2px; font-weight: 400; }

/* Summary */
.cmb-summary {
  background: var(--cmb-bg-soft);
  border-radius: 10px;
  padding: 14px;
  margin: 14px 0;
  font-size: 14px;
}
.cmb-summary strong { color: var(--cmb-primary-dark); }
.cmb-summary-row { display: flex; justify-content: space-between; margin-bottom: 4px; }

/* Success */
/* Field-Label */
.cmb-field-label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--cmb-text-dim);
  margin: 8px 0 8px;
  padding-left: 2px;
}
.cmb-booking input[readonly] {
  background: rgba(14,165,233,0.06);
  color: var(--cmb-text-dim);
  cursor: not-allowed;
  border-color: rgba(14,165,233,0.2);
}

.cmb-success {
  text-align: center;
  padding: 40px 20px;
}
.cmb-success-ico {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 80px; height: 80px;
  background: var(--cmb-success);
  color: #fff;
  border-radius: 50%;
  margin-bottom: 18px;
  animation: cmb-pop 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}
@keyframes cmb-pop {
  0% { transform: scale(0); }
  100% { transform: scale(1); }
}
.cmb-success h3 { font-size: 24px; margin: 0 0 10px; color: var(--cmb-text); }
.cmb-success p { color: var(--cmb-text-dim); margin: 0; }

.hidden { display: none !important; }

/* ── Slot-Picker (Step 5) ───────── */
.cmb-hours-note {
  background: #f1f5f9;
  border-left: 3px solid var(--cmb-primary);
  padding: 10px 14px;
  border-radius: 8px;
  font-size: 13px;
  color: #475569;
  margin-bottom: 12px;
}
.cmb-slot-info {
  margin: 12px 0 8px;
  font-size: 14px;
  color: #475569;
}
.cmb-slot-warn {
  color: #b91c1c;
  font-weight: 600;
}
.cmb-slots {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(82px, 1fr));
  gap: 8px;
  margin-bottom: 14px;
}
.cmb-slot {
  background: #fff;
  border: 2px solid #e2e8f0;
  padding: 10px 6px;
  border-radius: 10px;
  font-weight: 700;
  font-size: 15px;
  cursor: pointer;
  transition: all 0.15s;
  color: #0f172a;
}
.cmb-slot:hover { border-color: var(--cmb-primary); }
.cmb-slot.selected {
  background: var(--cmb-primary);
  color: #fff;
  border-color: var(--cmb-primary);
  box-shadow: 0 4px 12px rgba(14,165,233,0.3);
}

/* ── Success Checkmark Animation ───────── */
.cmb-success-ico { width: 96px; height: 96px; margin: 0 auto 18px; }
.cmb-success-ico svg { display: block; }
.cmb-check-circle {
  stroke: #22c55e;
  stroke-width: 3;
  stroke-dasharray: 151;
  stroke-dashoffset: 0;
  transform-origin: 50% 50%;
}
.cmb-check-mark {
  stroke: #22c55e;
  stroke-width: 4;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-dasharray: 48;
  stroke-dashoffset: 0;
}
.cmb-success-ico.play .cmb-check-circle {
  animation: cmb-circle 0.5s cubic-bezier(0.65,0,0.45,1) both;
}
.cmb-success-ico.play .cmb-check-mark {
  animation: cmb-mark 0.35s 0.45s cubic-bezier(0.65,0,0.45,1) both;
}
.cmb-success-ico.play {
  animation: cmb-pop 0.4s 0.7s ease;
}
@keyframes cmb-circle { from { stroke-dashoffset: 151; } to { stroke-dashoffset: 0; } }
@keyframes cmb-mark { from { stroke-dashoffset: 48; } to { stroke-dashoffset: 0; } }
@keyframes cmb-pop {
  0%,100% { transform: scale(1); }
  40% { transform: scale(1.12); }
}

/* Fix: alten grünen Vollkreis-BG entfernen, SVG sichtbar machen */
.cmb-success-ico {
  background: transparent !important;
  border-radius: 0 !important;
  width: 96px !important;
  height: 96px !important;
  display: block !important;
  animation: none !important;
}
.cmb-success-ico svg { width: 96px; height: 96px; }

/* Datum-Feld klarer (mobile) */
.cmb-date-label {
  display: block;
  font-size: 13px;
  font-weight: 700;
  color: var(--cmb-text);
  margin: 4px 0 8px;
}
.cmb-booking input[type=date] {
  -webkit-appearance: none;
  appearance: none;
  min-height: 52px;
  line-height: 1.2;
  position: relative;
  color: var(--cmb-text);
}
.cmb-booking input[type=date]:not([value]),
.cmb-booking input[type=date].cmb-empty {
  color: var(--cmb-text-dim);
}
/* iOS: Datums-Platzhalter + Kalender-Icon rechts */
.cmb-booking input[type=date]::-webkit-date-and-time-value { text-align: left; }
.cmb-booking input[type=date]::-webkit-calendar-picker-indicator {
  opacity: 0.6;
  cursor: pointer;
}

/* Scroll-Ziel nach Buchung: knapp unter Sticky-Header */
.cmb-screen[data-screen="success"] { scroll-margin-top: 90px; }
