/* Unified compact header (booking) */

/* Hide number input spinner buttons (km-stand) */
input[type="number"]::-webkit-outer-spin-button,
input[type="number"]::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}
input[type="number"] {
  -moz-appearance: textfield;
  appearance: textfield;
}

body {
  overflow-x: hidden;
}

.booking-header {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: .5rem;
  padding: 0.14rem 0.60rem;
  background: #fff;
  border-bottom: 1px solid #e5e7eb;
  box-shadow: 0 1px 2px rgba(0,0,0,0.05);
}
.booking-header .header-inner {
  display: contents;
}
.booking-header .header-left {
  justify-self: start;
  min-width: 0;
}
.booking-header .header-center {
  justify-self: center;
  text-align: center;
  min-width: 0;
}
.booking-header .header-right {
  justify-self: end;
  position: relative;
  min-width: 0;
}
.booking-header .logo { display:flex; align-items:center; gap:.3rem; text-decoration:none; }
.booking-header .logo-icon { font-size:.9rem; line-height:1; }
.booking-header .logo-text { font-size:.85rem; font-weight:700; color: var(--primary-color); }
.booking-header .garage-name-display { font-weight:700; font-size:.86rem; line-height:1; letter-spacing:.01em; color:#1f2a37; }
.booking-header .sidebar-toggle-btn { padding:0.16rem 0.5rem; font-size:.75rem; line-height:1; border-radius:.4rem; border:1px solid #e5e7eb; background:#fff; }
.booking-header .sidebar-toggle-btn:hover { background:#f8fafc; }
.booking-header .header-menu-popover { position:absolute; right:0; top:calc(100% + 6px); background:#fff; border:1px solid #e5e7eb; box-shadow:0 4px 16px rgba(0,0,0,0.08); border-radius:.5rem; padding:.3rem; min-width:180px; display:none; z-index:220; }
.booking-header .header-menu-popover[aria-hidden="false"] { display:block; }
.booking-header .header-menu-list { display:flex; flex-direction:column; gap:.15rem; }
.booking-header .header-menu-item { padding:.38rem .5rem; border:none; background:transparent; font-weight:600; color:#1f2a37; text-align:left; border-radius:.35rem; font-size:.8rem; text-decoration:none; }
.booking-header .header-menu-item:hover { background:#f1f5f9; color: var(--primary-color); }

/* Remove old multi-row mobile overrides */
@media (max-width: 768px) { .booking-header { padding:0.12rem 0.5rem; } }

/* Ensure content starts below the unified header using dynamic height */
/* Defensive: use !important to prevent cascade override issues */
:root { --unified-header-height: 70px; }

.booking-main {
  padding-top: calc(var(--unified-header-height, 70px) + 1rem) !important;
  min-height: calc(100vh - var(--unified-header-height, 70px));
}

.booking-container {
  margin-top: 0; /* booking-main handles the offset */
}

/* Ensure page title has breathing room */
.booking-steps .page-title {
  margin-top: 0.5rem;
}

@media (max-width: 992px) {
  .booking-main {
    padding-top: calc(var(--unified-header-height, 72px) + 1.25rem) !important;
  }
}


.booking-header-top .nav-toggle {
  margin-left: auto;
}

.booking-header .logo {
  font-size: 1rem;
}

.booking-header .logo-icon {
  font-size: 1rem;
}

.booking-header-pill-row {
  width: 100%;
  display: flex;
  justify-content: center;
  text-align: center;
}

.nav-garage-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.2s ease;
  min-width: min(360px, 100%);
  max-width: 100%;
}

.nav-garage-pill.is-visible {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.nav-garage-pill span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.4rem 1rem;
  border-radius: 999px;
  border: 1px solid rgba(37, 99, 235, 0.25);
  background: rgba(37, 99, 235, 0.08);
  color: #1f2a37;
  font-weight: 600;
  font-size: 1.05rem;
  letter-spacing: 0.01em;
  min-width: 140px;
  white-space: nowrap;
}

@media (max-width: 768px) {
  .booking-header {
    padding: 0.75rem 1rem 1rem;
  }

  .booking-header-top {
    gap: 0.5rem;
  }

  .booking-sidebar {
    display: none;
  }

  .booking-header .nav-menu {
    width: 100%;
    gap: 0.5rem;
    flex-direction: column;
    align-items: flex-start;
    padding: 0.5rem 0 0.75rem;
    display: none;
  }

  .booking-header .nav-menu.active {
    display: flex;
  }

  .booking-header .nav-toggle {
    display: flex;
  }

  .booking-header-pill-row {
    padding-top: 0.25rem;
  }
}

@media (max-width: 768px) {
  .booking-header {
    padding: 0.75rem 1rem 1rem;
  }

  .booking-header .nav-menu {
    width: 100%;
    gap: 0.5rem;
    flex-direction: column;
    align-items: flex-start;
    padding: 0.5rem 0 0.75rem;
    display: none;
    margin-left: 0;
  }

  .booking-header .nav-menu.active {
    display: flex;
  }

  .booking-header .nav-toggle {
    display: flex;
    margin-left: auto;
  }

  .nav-garage-pill {
    order: -1;
    flex: 0 0 auto;
    width: 100%;
    margin-bottom: 0.5rem;
  }
}

/* ================================
   Layout & Container
   ================================ */

.booking-main {
  /* min-height and padding-top defined above with !important */
  padding-bottom: 3rem;
  background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
  width: 100%;
  max-width: 100vw;
  /* Note: overflow-x:hidden moved to booking-container to preserve sticky */
}

.booking-container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 1rem;
  display: grid;
  grid-template-columns: 1fr 400px;
  gap: 2rem;
  align-items: start;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  /* Note: no overflow-x here to preserve sticky sidebar behavior */
  /* Ensure proper height for sticky sidebar */
  min-height: calc(100vh - var(--unified-header-height, 70px) - 4rem);
}

@media (max-width: 1024px) {
  .booking-container {
    grid-template-columns: 1fr;
  }

  .booking-sidebar {
    order: -1;
    position: static !important;
    display: none !important;
  }
}

/* ================================
   Steps Container
   ================================ */

.booking-steps {
  background: white;
  border-radius: 12px;
  padding: 2rem;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}

.page-title {
  font-size: 2rem;
  font-weight: 700;
  color: #2c3e50;
  margin-bottom: 2rem;
  text-align: center;
}

/* ================================
   Individual Step
   ================================ */

.booking-step {
  margin-bottom: 2rem;
  padding-bottom: 2rem;
  border-bottom: 2px solid #e9ecef;

  /* Initial hidden state before animation runs */
  opacity: 0;
  transform: translateY(50px);
  /* Fallback durations if CSS variables are not defined (prevent permanent invisibility) */
  animation: slideUpFadeIn var(--transition-duration, 0.45s) var(--transition-easing, cubic-bezier(.16,.8,.28,1)) forwards;

  /* Transition used by JS fade logic */
  transition: opacity 0.3s ease-in-out;
}

.booking-step:last-of-type {
  border-bottom: none;
}

.booking-step.hidden {
  display: none;
  opacity: 0;
  transform: translateY(50px);
}

/* Slide-up animation */
@keyframes slideUpFadeIn {
  from {
    opacity: 0;
    transform: translateY(50px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Provide variable fallbacks if not set in main.css */
:root {
  --transition-duration: 0.45s;
  --transition-easing: cubic-bezier(.16,.8,.28,1);
}

.step-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.step-number {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--primary-color, #4CAF50);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 1.25rem;
  flex-shrink: 0;
}

.step-title {
  font-size: 1.5rem;
  font-weight: 600;
  color: #2c3e50;
  margin: 0;
}

.step-content {
  padding-left: 56px;
}

/* ================================
   Form Fields
   ================================ */

.form-group {
  margin-bottom: 1.25rem;
}

.form-group label {
  display: block;
  margin-bottom: 0.625rem;
  font-weight: 600;
  color: #2c3e50;
  font-size: 0.95rem;
  letter-spacing: 0.3px;
}

.form-control {
  width: 100%;
  padding: 0.85rem 1.1rem;
  border: 1px solid rgba(15, 23, 42, 0.12);
  border-radius: 14px;
  font-size: 1rem;
  font-weight: 500;
  color: #1e293b;
  background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
  box-shadow: 0 6px 20px rgba(15, 23, 42, 0.06);
  transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.form-control:hover {
  border-color: rgba(37, 99, 235, 0.4);
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.08);
}

.form-control:focus {
  outline: none;
  border-color: var(--primary-color, #2563eb);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12), 0 12px 32px rgba(37, 99, 235, 0.18);
  background: #ffffff;
  transform: translateY(-1px);
}

.form-control::placeholder {
  color: #94a3b8;
  font-weight: 400;
}

select.form-control {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  padding-right: 2.75rem;
  background-image: linear-gradient(45deg, transparent 50%, #2563eb 50%),
    linear-gradient(135deg, #2563eb 50%, transparent 50%);
  background-position: calc(100% - 1.35rem) calc(50% - 0.1rem), calc(100% - 1rem) calc(50% - 0.1rem);
  background-size: 8px 8px, 8px 8px;
  background-repeat: no-repeat;
}

.form-text {
  display: block;
  margin-top: 0.375rem;
  font-size: 0.85rem;
  color: #718096;
  font-style: italic;
  font-weight: 500;
}

/* ================================
   Service Package Display - Simplified Single Card Design
   ================================ */

.service-package {
  margin: 1.75rem 0;
}

.service-package h3 {
  font-size: 1.15rem;
  font-weight: 700;
  color: #2c3e50;
  margin-bottom: 0.5rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* Single card design - no nested cards */
.package-card {
  padding: 1.75rem;
  background: linear-gradient(135deg, #e8f5e9 0%, #c8e6c9 100%);
  border-radius: 12px;
  border: 3px solid var(--primary-color, #4CAF50);
  box-shadow: 0 4px 12px rgba(76, 175, 80, 0.2);
  position: relative;
  cursor: pointer;
  transition: all 0.25s ease;
}

.package-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 16px rgba(76, 175, 80, 0.3);
}

/* Checkmark badge - only visible when selected (controlled by JS) */
.package-card .package-badge {
  position: absolute;
  top: 1rem;
  right: 1rem;
  width: 36px;
  height: 36px;
  background: var(--primary-color, #4CAF50);
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 1.25rem;
  box-shadow: 0 3px 8px rgba(76, 175, 80, 0.4);
  transition: all 0.2s ease;
}

/* Deselected state - hide badge via JS by adding .deselected class */
.package-card.deselected .package-badge {
  display: none;
}

.package-card.deselected {
  background: linear-gradient(135deg, #f5f5f5 0%, #e0e0e0 100%);
  border-color: #bdbdbd;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
  opacity: 0.75;
}

.package-card.deselected:hover {
  opacity: 0.9;
  border-color: #9e9e9e;
}

.package-card.deselected .package-name,
.package-card.deselected .package-price {
  color: #757575;
}

.package-card.deselected .package-description {
  color: #9e9e9e;
}

.package-name {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--primary-color, #4CAF50);
  margin-bottom: 0.625rem;
  line-height: 1.3;
}

.package-description {
  font-size: 1rem;
  color: #495057;
  margin-bottom: 1rem;
  line-height: 1.6;
  font-weight: 500;
}

.package-price {
  font-size: 1.75rem;
  font-weight: 700;
  color: #1b5e20;
  padding: 0.75rem 1rem;
  background: rgba(255, 255, 255, 0.7);
  border-radius: 8px;
  display: inline-block;
}

/* Toggle hint text at bottom */
.package-toggle-hint {
  margin-top: 1rem;
  padding-top: 0.75rem;
  border-top: 1px solid rgba(0, 0, 0, 0.1);
  font-size: 0.9rem;
  color: #666;
  text-align: center;
}

.package-card.deselected .package-toggle-hint {
  color: #888;
}

/* ================================
   Upsells - Enhanced
   ================================ */

.upsells {
  margin: 1.75rem 0;
}

.upsells h3 {
  font-size: 1.15rem;
  font-weight: 700;
  color: #2c3e50;
  margin-bottom: 0.625rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.upsell-subtitle {
  font-size: 0.95rem;
  color: #495057;
  margin-bottom: 1.25rem;
  font-style: italic;
  font-weight: 500;
}

.upsell-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.25rem;
}

.upsell-card {
  padding: 1.75rem;
  background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
  border: 3px solid #e9ecef;
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.25s ease;
  position: relative;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
}

.upsell-card:hover {
  border-color: var(--primary-color);
  box-shadow: 0 6px 16px rgba(76, 175, 80, 0.2);
  transform: translateY(-3px);
  background: white;
}

.upsell-card.selected {
  background: linear-gradient(135deg, #e8f5e9 0%, #c8e6c9 100%);
  border-color: var(--primary-color);
  box-shadow: 0 6px 16px rgba(76, 175, 80, 0.3);
  transform: translateY(-2px);
}

.upsell-card.selected::before {
  content: '✓';
  position: absolute;
  top: 1rem;
  right: 1rem;
  width: 32px;
  height: 32px;
  background: var(--primary-color);
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 1.2rem;
  box-shadow: 0 3px 8px rgba(76, 175, 80, 0.4);
}

.upsell-card .upsell-name {
  font-weight: 700;
  color: #2c3e50;
  margin-bottom: 0.625rem;
  font-size: 1.1rem;
  line-height: 1.3;
}

.upsell-card .upsell-description {
  font-size: 0.95rem;
  color: #495057;
  margin-bottom: 1rem;
  line-height: 1.6;
  font-weight: 500;
}

.upsell-card .upsell-price {
  font-size: 1.15rem;
  color: var(--primary-color);
  font-weight: 700;
  padding: 0.5rem 0.75rem;
  background: linear-gradient(135deg, #e8f5e9 0%, #f1f8f4 100%);
  border-radius: 6px;
  display: inline-block;
}

/* ================================
   Calendar
   ================================ */

/* ================================
   Calendar - Modern Design (matching timeslot style)
   ================================ */

.calendar-container {
  background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
  padding: 1.75rem;
  border-radius: 12px;
  border: 2px solid #e9ecef;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.calendar-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.5rem;
  padding-bottom: 1rem;
  border-bottom: 2px solid #e9ecef;
}

.calendar-nav {
  width: 44px;
  height: 44px;
  border: 2px solid #dee2e6;
  background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
  border-radius: 10px;
  cursor: pointer;
  font-size: 1.25rem;
  font-weight: 600;
  transition: all 0.25s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.calendar-nav:hover {
  border-color: var(--primary-color, #4CAF50);
  background: linear-gradient(135deg, #e8f5e9 0%, #c8e6c9 100%);
  color: var(--primary-color, #4CAF50);
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(76, 175, 80, 0.2);
}

.calendar-nav:active {
  transform: translateY(0);
}

.calendar-title {
  font-size: 1.35rem;
  font-weight: 700;
  color: #2c3e50;
  letter-spacing: 0.02em;
  flex: 1;
  text-align: center;
  min-width: 0;
}

.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 0.625rem;
}

.calendar-day {
  aspect-ratio: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  transition: all 0.25s ease;
  border: 2px solid transparent;
  position: relative;
}

.calendar-day.day-header {
  background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
  cursor: default;
  font-weight: 700;
  color: #495057;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border-radius: 8px;
}

/* Available day - green gradient like timeslots */
.calendar-day.available {
  background: linear-gradient(135deg, #e8f5e9 0%, #c8e6c9 100%);
  border-color: #4caf50;
  color: #1b5e20;
  box-shadow: 0 2px 4px rgba(76, 175, 80, 0.15);
}

.calendar-day.available:hover {
  background: linear-gradient(135deg, #c8e6c9 0%, #a5d6a7 100%);
  border-color: #388e3c;
  transform: translateY(-3px) scale(1.05);
  box-shadow: 0 6px 12px rgba(76, 175, 80, 0.3);
  z-index: 1;
}

/* Selected day - primary color */
.calendar-day.selected {
  background: linear-gradient(135deg, var(--primary-color, #4CAF50) 0%, #45a049 100%);
  color: white;
  border-color: #2e7d32;
  font-weight: 700;
  box-shadow: 0 4px 10px rgba(76, 175, 80, 0.4);
  transform: scale(1.08);
  z-index: 2;
}

.calendar-day.selected::after {
  content: '';
  position: absolute;
  inset: -4px;
  border: 2px solid var(--primary-color, #4CAF50);
  border-radius: 12px;
  opacity: 0.4;
}

/* Unavailable/past day - grey */
.calendar-day.unavailable,
.calendar-day.past {
  background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
  color: #adb5bd;
  cursor: not-allowed;
  border-color: #dee2e6;
}

/* Closed day (no working hours / holiday / Sunday) */
.calendar-day.closed {
  background: linear-gradient(135deg, #f5f5f5 0%, #eeeeee 100%);
  color: #9e9e9e;
  cursor: not-allowed;
  border-color: #e0e0e0;
  pointer-events: none;
}

.calendar-day.closed::before {
  content: '';
  position: absolute;
  width: 60%;
  height: 2px;
  background: #bdbdbd;
  transform: rotate(-45deg);
}

/* Special hours day (Sonderöffnungszeiten - z.B. 24.12. halber Tag) */
.calendar-day.special-hours {
  background: linear-gradient(135deg, #e8f5e9 0%, #c8e6c9 100%);
  color: #2e7d32;
  border-color: #81c784;
  position: relative;
}

.calendar-day.special-hours::after {
  content: '✦';
  position: absolute;
  top: 2px;
  right: 3px;
  font-size: 8px;
  color: #43a047;
}

.calendar-day.special-hours:hover {
  background: linear-gradient(135deg, #c8e6c9 0%, #a5d6a7 100%);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(76, 175, 80, 0.3);
}

.calendar-day.other-month {
  opacity: 0.3;
}

/* Calendar Legend - Modern styling */
.calendar-legend {
  display: flex;
  gap: 1.25rem;
  margin-top: 1.5rem;
  padding: 1.25rem;
  background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
  border-radius: 10px;
  flex-wrap: wrap;
  justify-content: center;
}

.calendar-legend .legend-item {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  font-size: 0.9rem;
  font-weight: 500;
  color: #495057;
  padding: 0.5rem 0.75rem;
  background: white;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.calendar-legend .legend-color {
  width: 28px;
  height: 28px;
  border-radius: 6px;
  border: 2px solid;
}

.calendar-legend .legend-color.available {
  background: linear-gradient(135deg, #e8f5e9 0%, #c8e6c9 100%);
  border-color: #4caf50;
}

.calendar-legend .legend-color.selected {
  background: linear-gradient(135deg, var(--primary-color, #4CAF50) 0%, #45a049 100%);
  border-color: #2e7d32;
}

.calendar-legend .legend-color.unavailable {
  background: linear-gradient(135deg, #f5f5f5 0%, #eeeeee 100%);
  border-color: #bdbdbd;
}

.legend-color {
  width: 20px;
  height: 20px;
  border-radius: 4px;
  border: 1px solid #dee2e6;
}

.legend-color.available {
  background: #e8f5e9;
}

.legend-color.selected {
  background: var(--primary-color, #4CAF50);
}

.legend-color.unavailable {
  background: #f8f9fa;
}

/* ================================
   Time Slots - Enhanced Visualization
   ================================ */

.slot-info {
  margin-bottom: 1.5rem;
  padding: 1rem 1.25rem;
  background: linear-gradient(135deg, #e3f2fd 0%, #bbdefb 100%);
  border-left: 5px solid #2196f3;
  border-radius: 8px;
  font-size: 1rem;
  color: #1565c0;
  font-weight: 500;
  box-shadow: 0 2px 4px rgba(33, 150, 243, 0.15);
}

/* Legende OBEN (vor Grid) */
.slot-legend {
  display: flex;
  gap: 1.25rem;
  flex-wrap: wrap;
  margin-bottom: 1.5rem;
  padding: 1.25rem;
  background: #f8f9fa;
  border-radius: 10px;
  border: 2px solid #e9ecef;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
}

.slot-legend .legend-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.9rem;
  font-weight: 500;
  color: #495057;
  padding: 0.5rem 0.75rem;
  border-radius: 6px;
  background: white;
  transition: all 0.2s;
}

.slot-legend .legend-item:hover {
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  transform: translateY(-1px);
}

.legend-color {
  width: 32px;
  height: 32px;
  border-radius: 6px;
  border: 2px solid;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  font-weight: 700;
  flex-shrink: 0;
}

.legend-color.slot-free {
  background: #e8f5e9;
  border-color: #4caf50;
  color: #2e7d32;
}

.legend-color.slot-free::after {
  content: '✓';
}

.legend-color.slot-selected {
  background: var(--primary-color, #4CAF50);
  border-color: var(--primary-color, #4CAF50);
  color: white;
}

.legend-color.slot-selected::after {
  content: '⏰';
}

.legend-color.slot-blocked {
  background: #fff3cd;
  border-color: #ffc107;
  color: #856404;
}

.legend-color.slot-blocked::after {
  content: '◷';
}

.legend-color.slot-occupied {
  background: #fee2e2;
  border-color: #ef4444;
  color: #dc2626;
}

.legend-color.slot-occupied::after {
  content: '✕';
}

.legend-color.slot-too-soon {
  background: #e9ecef;
  border-color: #adb5bd;
  color: #6c757d;
}

.legend-color.slot-too-soon::after {
  content: '⊗';
}

.timeslot-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.timeslot {
  padding: 1.25rem 0.75rem;
  text-align: center;
  border: 3px solid;
  border-radius: 10px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.25s ease;
  background: white;
  position: relative;
  min-height: 70px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.25rem;
}

/* Icon für jeden Slot */
.timeslot::before {
  content: attr(data-icon);
  display: block;
  font-size: 1.3rem;
  line-height: 1;
  margin-bottom: 0.25rem;
}

.timeslot-time {
  display: block;
  font-size: 1rem;
  font-weight: 700;
}

/* Status: Frei (Grün) */
.timeslot.free {
  background: linear-gradient(135deg, #e8f5e9 0%, #c8e6c9 100%);
  border-color: #4caf50;
  color: #1b5e20;
  box-shadow: 0 3px 6px rgba(76, 175, 80, 0.2);
}

.timeslot.free::before {
  content: '✓';
  color: #2e7d32;
}

.timeslot.free:hover {
  background: linear-gradient(135deg, #c8e6c9 0%, #a5d6a7 100%);
  border-color: #388e3c;
  transform: translateY(-3px) scale(1.02);
  box-shadow: 0 6px 12px rgba(76, 175, 80, 0.35);
  cursor: pointer;
}

/* Status: Ausgewählt (Blau/Primary) */
.timeslot.selected {
  background: linear-gradient(135deg, var(--primary-color, #4CAF50) 0%, #45a049 100%);
  color: white;
  border-color: #2e7d32;
  font-weight: 700;
  box-shadow: 0 4px 10px rgba(76, 175, 80, 0.4);
  transform: scale(1.05);
}

.timeslot.selected::before {
  content: '⏰';
  color: white;
}

/* Status: Teil des Blocks (Gelb) */
.timeslot.blocked {
  background: linear-gradient(135deg, #fff3cd 0%, #ffe082 100%);
  border-color: #ffc107;
  color: #856404;
  opacity: 0.8;
  cursor: not-allowed;
  box-shadow: 0 2px 4px rgba(255, 193, 7, 0.2);
}

.timeslot.blocked::before {
  content: '◷';
  color: #856404;
}

/* Status: Zu kurzfristig < 24h (Orange) */
.timeslot.too-soon {
  background: #e9ecef;
  border-color: #adb5bd;
  color: #6c757d;
  cursor: not-allowed;
  font-weight: 600;
  box-shadow: none;
  opacity: 0.8;
}

.timeslot.too-soon::before {
  content: '⊗';
  color: #6c757d;
  font-size: 1.3rem;
}

.timeslot.too-soon:hover {
  transform: none;
  cursor: not-allowed;
}

/* Status: Belegt (Rot) */
.timeslot.occupied {
  background: linear-gradient(135deg, #fee2e2 0%, #fecaca 100%);
  border-color: #ef4444;
  color: #b91c1c;
  cursor: not-allowed;
  font-weight: 700;
  box-shadow: 0 2px 4px rgba(239, 68, 68, 0.15);
  position: relative;
}

.timeslot.occupied::before {
  content: '✕';
  color: #dc2626;
  font-size: 1.3rem;
}

.timeslot.occupied:hover {
  transform: none;
  cursor: not-allowed;
}

/* Status: Nicht verfügbar (Grau) */
.timeslot.disabled {
  background: #e9ecef;
  border-color: #adb5bd;
  color: #6c757d;
  cursor: not-allowed;
  opacity: 0.6;
  box-shadow: none;
}

.timeslot.disabled::before {
  content: '⊗';
  color: #6c757d;
}

.timeslot.disabled:hover {
  transform: none;
  cursor: not-allowed;
}

/* Status: Mittagspause (Grau mit Besteck) */
.timeslot.lunch {
  background: linear-gradient(135deg, #f3f4f6 0%, #e5e7eb 100%);
  border-color: #cbd5e1;
  color: #6b7280;
  cursor: not-allowed;
  opacity: 0.9;
}

.timeslot.lunch::before {
  content: '🍽️';
  font-size: 1.4rem;
}

/* Hover-Tooltip für Zeitslots */
.timeslot[data-tooltip] {
  position: relative;
}

.timeslot[data-tooltip]::after {
  content: attr(data-tooltip);
  position: absolute;
  bottom: calc(100% + 10px);
  left: 50%;
  transform: translateX(-50%) scale(0.9);
  padding: 0.625rem 1rem;
  background: #2c3e50;
  color: white;
  border-radius: 8px;
  font-size: 0.85rem;
  font-weight: 500;
  white-space: nowrap;
  opacity: 0;
  visibility: hidden;
  transition: all 0.25s ease;
  z-index: 1000;
  pointer-events: none;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.timeslot[data-tooltip]:hover::after {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) scale(1);
}



/* ================================
   Sidebar
   ================================ */

.booking-sidebar {
  position: sticky;
  /* Use header height + small offset so sidebar stays below fixed header */
  top: calc(var(--unified-header-height, 70px) + 1rem);
  align-self: start; /* Ensure proper sticky behavior in grid */
  background: white;
  border-radius: 12px;
  padding: 2rem;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
  /* Adjust max-height to account for header height */
  max-height: calc(100vh - var(--unified-header-height, 70px) - 2rem);
  overflow-y: auto;
  z-index: 100; /* Ensure sidebar stays on top when scrolling */
}

.sidebar-content h3 {
  font-size: 1.5rem;
  font-weight: 700;
  color: #2c3e50;
  margin-bottom: 1.5rem;
  padding-bottom: 1rem;
  border-bottom: 2px solid #e9ecef;
}

.sidebar-section {
  margin-bottom: 1.5rem;
}

.sidebar-section h4 {
  font-size: 0.95rem;
  font-weight: 600;
  color: #6c757d;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 0.5rem;
}

.sidebar-section p {
  font-size: 1rem;
  color: #2c3e50;
  line-height: 1.6;
  margin: 0.25rem 0;
}

.sidebar-section .placeholder {
  color: #adb5bd;
  font-style: italic;
}

.sidebar-divider {
  height: 2px;
  background: linear-gradient(90deg, transparent 0%, #e9ecef 50%, transparent 100%);
  margin: 1.5rem 0;
}

.sidebar-total {
  padding-top: 1rem;
  border-top: 2px solid #e9ecef;
}

.total-label {
  font-size: 1.1rem;
  font-weight: 600;
  color: #6c757d;
  margin-bottom: 0.5rem;
}

.total-price {
  font-size: 2rem;
  font-weight: 700;
  color: var(--primary-color, #4CAF50);
}

/* ================================
   Confirmation
   ================================ */

.confirmation-summary {
  background: #f8f9fa;
  padding: 2rem;
  border-radius: 8px;
  margin-bottom: 2rem;
}

.summary-block {
  margin-bottom: 1.5rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid #dee2e6;
}

.summary-block:last-child {
  border-bottom: none;
  margin-bottom: 0;
  padding-bottom: 0;
}

.summary-block h4 {
  font-size: 1.1rem;
  font-weight: 600;
  color: #2c3e50;
  margin-bottom: 0.75rem;
}

.summary-block p {
  margin: 0.25rem 0;
  color: #495057;
}

.summary-block strong {
  color: #2c3e50;
}

.checkbox-group {
  margin: 1.5rem 0;
}

.checkbox-label {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  cursor: pointer;
}

.checkbox-label input[type="checkbox"] {
  width: 20px;
  height: 20px;
  margin-top: 2px;
  cursor: pointer;
  flex-shrink: 0;
}

.checkbox-label span {
  font-size: 0.95rem;
  color: #495057;
  line-height: 1.5;
}

.checkbox-label a {
  color: var(--primary-color, #4CAF50);
  text-decoration: underline;
}

/* ================================
   Buttons
   ================================ */

.btn {
  padding: 0.875rem 2rem;
  border: none;
  border-radius: 8px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  display: inline-block;
  text-align: center;
  text-decoration: none;
}

.btn-primary {
  background: var(--primary-color, #4CAF50);
  color: white;
}

.btn-primary:hover:not(:disabled) {
  background: #45a049;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(76, 175, 80, 0.3);
}

.btn-primary:disabled {
  background: #ccc;
  cursor: not-allowed;
  opacity: 0.6;
}

.btn-secondary {
  background: #6c757d;
  color: white;
}

.btn-secondary:hover {
  background: #5a6268;
}

.btn-submit {
  width: 100%;
  font-size: 1.125rem;
  padding: 1.125rem;
}

/* ================================
   Success Message
   ================================ */

.success-message {
  text-align: center;
  padding: 3rem 2rem;
  background: white;
  border-radius: 12px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
}

.success-icon {
  font-size: 4rem;
  margin-bottom: 1rem;
}

.success-message h2 {
  font-size: 2rem;
  font-weight: 700;
  color: var(--primary-color, #4CAF50);
  margin-bottom: 1rem;
}

.success-message p {
  font-size: 1.125rem;
  color: #6c757d;
  margin-bottom: 1rem;
}

.booking-reference {
  background: #f8f9fa;
  padding: 1rem;
  border-radius: 8px;
  margin: 1.5rem 0;
  font-size: 1.125rem;
}

/* ================================
   Utility Classes
   ================================ */

.hidden {
  display: none !important;
}

.text-center {
  text-align: center;
}

/* ================================
   Loading Spinner
   ================================ */

.loading-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
}

.loading-spinner {
  width: 60px;
  height: 60px;
  border: 6px solid rgba(255, 255, 255, 0.3);
  border-top-color: var(--primary-color, #4CAF50);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.loading-text {
  color: white;
  margin-top: 1rem;
  font-size: 1.125rem;
  font-weight: 500;
}

/* ================================
   Tooltips
   ================================ */

.tooltip-wrapper {
  position: relative;
  display: inline-block;
}

.tooltip-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #6c757d;
  color: white;
  font-size: 12px;
  font-weight: 700;
  margin-left: 0.5rem;
  cursor: help;
  vertical-align: middle;
}

.tooltip-content {
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%);
  margin-bottom: 8px;
  padding: 0.75rem 1rem;
  background: #2c3e50;
  color: white;
  border-radius: 8px;
  font-size: 0.875rem;
  line-height: 1.5;
  white-space: nowrap;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s, visibility 0.2s;
  z-index: 1000;
  pointer-events: none;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.2);
}

.tooltip-content::after {
  content: '';
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  border: 6px solid transparent;
  border-top-color: #2c3e50;
}

.tooltip-wrapper:hover .tooltip-content {
  opacity: 1;
  visibility: visible;
}

/* ================================
   Smooth Animations
   ================================ */

.form-control, .upsell-item, .calendar-day, .timeslot {
  transition: all 0.2s ease-in-out;
}

.dropdown-animation {
  animation: fadeInDown 0.3s ease-out;
}

@keyframes fadeInDown {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ================================
   Mobile Responsive
   ================================ */

@media (max-width: 768px) {
  .booking-steps {
    padding: 1.5rem 1rem;
  }

  .page-title {
    font-size: 1.5rem;
  }

  .step-content {
    padding-left: 0;
  }

  .form-grid {
    grid-template-columns: 1fr;
  }

  .calendar-grid {
    gap: 0.25rem;
  }

  .timeslot-grid {
    grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
  }

  .booking-sidebar {
    position: static;
    margin-bottom: 2rem;
  }

  .step-title {
    font-size: 1.25rem;
  }
}

/* ================================
   V2 Booking Flow - Service Cards
   ================================ */

.main-services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1rem;
}

.service-card {
  background: #fff;
  border: 2px solid #e2e8f0;
  border-radius: 12px;
  padding: 1rem;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  flex-direction: column;
}

.service-card:hover {
  border-color: #94a3b8;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.service-card.selected {
  border-color: #3b82f6;
  background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%);
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.2);
}

.service-card.recommended {
  border-color: #22c55e;
}

.service-card.recommended.selected {
  border-color: #3b82f6;
}

.service-card-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
}

.service-card-header .service-name {
  font-weight: 600;
  font-size: 0.95rem;
  color: #1e293b;
  flex: 1;
}

.badge-recommended {
  background: #dcfce7;
  color: #166534;
  font-size: 0.65rem;
  font-weight: 600;
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
  text-transform: uppercase;
}

.badge-optional {
  background: #fef3c7;
  color: #92400e;
  font-size: 0.65rem;
  font-weight: 600;
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
  text-transform: uppercase;
}

.service-card-body {
  flex: 1;
  margin-bottom: 0.75rem;
}

.service-card-body .service-scope {
  font-size: 0.8rem;
  color: #64748b;
  margin: 0 0 0.5rem 0;
  line-height: 1.4;
}

.service-card-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 0.75rem;
  border-top: 1px solid #f1f5f9;
}

.service-card-footer .service-price {
  font-weight: 700;
  font-size: 1.1rem;
  color: #1e293b;
}

.service-card-footer .service-toggle {
  font-size: 0.8rem;
  font-weight: 500;
  color: #64748b;
  padding: 0.375rem 0.75rem;
  background: #f1f5f9;
  border-radius: 6px;
  transition: all 0.2s ease;
}

.service-card.selected .service-toggle {
  background: #3b82f6;
  color: #fff;
}

/* ================================
   V2 Booking Flow - Mobile Responsive
   ================================ */

@media (max-width: 768px) {
  .main-services-grid {
    grid-template-columns: 1fr;
    gap: 0.75rem;
  }

  .service-card {
    padding: 0.875rem;
    border-radius: 10px;
  }

  .service-card-header .service-name {
    font-size: 0.9rem;
  }

  .service-card-body .service-scope {
    font-size: 0.75rem;
  }

  .service-card-footer .service-price {
    font-size: 1rem;
  }

  .service-card-footer .service-toggle {
    font-size: 0.75rem;
    padding: 0.3rem 0.6rem;
  }

  .badge-recommended,
  .badge-optional {
    font-size: 0.6rem;
    padding: 0.2rem 0.4rem;
  }
}

@media (max-width: 480px) {
  .service-card {
    padding: 0.75rem;
  }

  .service-card-header {
    margin-bottom: 0.5rem;
  }

  .service-card-header .service-name {
    font-size: 0.85rem;
  }

  .service-card-body {
    margin-bottom: 0.5rem;
  }

  .service-card-footer {
    padding-top: 0.5rem;
  }

  .service-card-footer .service-price {
    font-size: 0.95rem;
  }
}

