/**
 * Fixplus v2 - Booking Flow Styles
 * Neue Stile für M1/N1 Vehicle Selection, Main Services, Add-ons
 */

/* ===== Vehicle Type Selection ===== */
.vehicle-type-buttons {
  display: flex;
  gap: 1rem;
  margin-bottom: 1rem;
}

.vehicle-type-btn {
  flex: 1;
  padding: 1rem;
  border: 2px solid var(--border-color, #e0e0e0);
  border-radius: 8px;
  background: var(--surface-color, #fff);
  cursor: pointer;
  transition: all 0.2s ease;
  font-size: 0.95rem;
  font-weight: 500;
  text-align: center;
}

.vehicle-type-btn:hover {
  border-color: var(--primary-color, #3b82f6);
  background: var(--primary-light, #eff6ff);
}

.vehicle-type-btn.active {
  border-color: var(--primary-color, #3b82f6);
  background: var(--primary-color, #3b82f6);
  color: white;
}

/* ===== Vehicle Category Selection ===== */
.category-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.category-btn {
  padding: 0.75rem 1rem;
  border: 2px solid var(--border-color, #e0e0e0);
  border-radius: 6px;
  background: var(--surface-color, #fff);
  cursor: pointer;
  transition: all 0.2s ease;
  font-size: 0.875rem;
}

.category-btn:hover {
  border-color: var(--primary-color, #3b82f6);
}

.category-btn.active {
  border-color: var(--primary-color, #3b82f6);
  background: var(--primary-light, #eff6ff);
  color: var(--primary-color, #3b82f6);
}

.category-btn.hidden {
  display: none;
}

/* ===== Fuel Type Selection ===== */
.fuel-type-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.fuel-btn {
  padding: 0.5rem 1rem;
  border: 2px solid var(--border-color, #e0e0e0);
  border-radius: 20px;
  background: var(--surface-color, #fff);
  cursor: pointer;
  transition: all 0.2s ease;
  font-size: 0.875rem;
}

.fuel-btn:hover {
  border-color: var(--primary-color, #3b82f6);
}

.fuel-btn.active {
  border-color: var(--primary-color, #3b82f6);
  background: var(--primary-color, #3b82f6);
  color: white;
}

/* ===== Parts Band Info ===== */
.parts-band-info {
  padding: 0.75rem 1rem;
  background: var(--info-bg, #e0f2fe);
  border-radius: 6px;
  font-size: 0.875rem;
  color: var(--info-color, #0369a1);
}

.parts-band-info.hidden {
  display: none;
}

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

.service-card {
  border: 2px solid var(--border-color, #e0e0e0);
  border-radius: 10px;
  padding: 1rem;
  background: var(--surface-color, #fff);
  cursor: pointer;
  transition: all 0.2s ease;
}

.service-card:hover {
  border-color: var(--primary-color, #3b82f6);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.service-card.selected {
  border-color: var(--success-color, #22c55e);
  background: var(--success-light, #f0fdf4);
}

.service-card.recommended {
  border-color: var(--warning-color, #f59e0b);
}

.service-card.recommended::before {
  content: '★ Empfohlen';
  display: block;
  margin-bottom: 0.5rem;
  font-size: 0.75rem;
  color: var(--warning-color, #f59e0b);
  font-weight: 600;
}

.service-card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 0.75rem;
}

.service-name {
  font-weight: 600;
  font-size: 1rem;
}

.badge-recommended {
  background: var(--warning-color, #f59e0b);
  color: white;
  padding: 2px 8px;
  border-radius: 12px;
  font-size: 0.7rem;
  font-weight: 600;
}

.badge-optional {
  background: var(--muted-color, #9ca3af);
  color: white;
  padding: 2px 8px;
  border-radius: 12px;
  font-size: 0.7rem;
}

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

.service-scope {
  font-size: 0.875rem;
  color: var(--text-muted, #6b7280);
  margin: 0 0 0.5rem 0;
}

.service-meta {
  display: flex;
  gap: 1rem;
  font-size: 0.75rem;
  color: var(--text-muted, #6b7280);
}

.service-card-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 0.75rem;
  border-top: 1px solid var(--border-color, #e0e0e0);
}

.service-price {
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--primary-color, #3b82f6);
}

.service-toggle {
  font-size: 0.875rem;
  color: var(--text-muted, #6b7280);
}

.service-card.selected .service-toggle {
  color: var(--success-color, #22c55e);
  font-weight: 600;
}

/* ===== No Service Warning ===== */
#no-main-service-warning {
  padding: 1rem;
  background: var(--warning-light, #fef3c7);
  border: 1px solid var(--warning-color, #f59e0b);
  border-radius: 6px;
  margin-top: 1rem;
  font-size: 0.875rem;
  color: var(--warning-dark, #92400e);
}

#no-main-service-warning.hidden {
  display: none;
}

/* ===== Add-ons Section ===== */
.addon-category {
  margin-bottom: 1.5rem;
}

.addon-category-title {
  font-size: 1rem;
  font-weight: 600;
  margin: 0 0 0.75rem 0;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--border-color, #e0e0e0);
}

.addon-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 0.75rem;
}

.addon-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 1rem;
  border: 2px solid var(--border-color, #e0e0e0);
  border-radius: 8px;
  background: var(--surface-color, #fff);
  cursor: pointer;
  transition: all 0.2s ease;
  text-align: center;
}

.addon-card:hover {
  border-color: var(--primary-color, #3b82f6);
}

.addon-card.selected {
  border-color: var(--success-color, #22c55e);
  background: var(--success-light, #f0fdf4);
}

.addon-icon {
  font-size: 1.5rem;
  margin-bottom: 0.5rem;
}

.addon-name {
  font-size: 0.875rem;
  font-weight: 500;
  margin-bottom: 0.25rem;
  line-height: 1.3;
  word-break: break-word;
  hyphens: auto;
}

/* Keep parenthetical suffixes together on one line */
.addon-name-suffix {
  display: block;
  white-space: nowrap;
  font-size: 0.8rem;
  color: var(--text-muted, #6b7280);
}

.addon-price {
  font-size: 0.875rem;
  color: var(--primary-color, #3b82f6);
  font-weight: 600;
}

.addon-toggle {
  margin-top: 0.5rem;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: 2px solid var(--border-color, #e0e0e0);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  color: var(--border-color, #e0e0e0);
}

.addon-card.selected .addon-toggle {
  background: var(--success-color, #22c55e);
  border-color: var(--success-color, #22c55e);
  color: white;
}

/* ===== Calendar V2 ===== */
.calendar-container {
  max-width: 100%;
  margin: 0 auto;
  padding: 1rem;
  box-sizing: border-box;
}

/* Calendar header with navigation - the row with arrows and month title */
.calendar-container .calendar-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
  padding: 0.5rem 0;
  gap: 0.5rem;
}

.calendar-nav {
  background: var(--primary-color, #3b82f6);
  border: none;
  font-size: 1.25rem;
  cursor: pointer;
  padding: 0.5rem 1rem;
  color: white;
  border-radius: 6px;
  min-width: 44px;
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s ease;
  flex-shrink: 0;
}

.calendar-nav:hover {
  background: var(--primary-dark, #2563eb);
}

.calendar-nav:active {
  transform: scale(0.95);
}

.calendar-title {
  font-weight: 600;
  font-size: 1.1rem;
  text-align: center;
  flex: 1;
  white-space: nowrap;
}

/* Calendar grid container */
#calendar-grid,
.calendar-days {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 4px;
  width: 100%;
}

/* Calendar weekdays header */
.calendar-weekdays {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  text-align: center;
  font-weight: 600;
  font-size: 0.875rem;
  padding: 0.5rem 0;
  border-bottom: 1px solid var(--border-color, #e0e0e0);
  margin-bottom: 0.5rem;
  gap: 4px;
}

.calendar-weekdays span {
  padding: 0.25rem;
}

.calendar-day {
  aspect-ratio: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  font-size: 0.875rem;
  cursor: default;
  transition: all 0.15s ease;
  min-height: 36px;
}

.calendar-day.empty {
  background: transparent;
}

.calendar-day.past {
  color: var(--text-muted, #9ca3af);
}

.calendar-day.weekend {
  color: var(--text-muted, #9ca3af);
}

.calendar-day.available {
  background: var(--success-light, #dcfce7);
  color: var(--success-dark, #166534);
  cursor: pointer;
  font-weight: 500;
}

.calendar-day.available:hover {
  background: var(--success-color, #22c55e);
  color: white;
}

.calendar-day.full {
  background: var(--error-light, #fee2e2);
  color: var(--error-color, #dc2626);
}

.calendar-day.selected {
  background: var(--primary-color, #3b82f6) !important;
  color: white !important;
  font-weight: 600;
}

/* Calendar Legend */
.calendar-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border-color, #e0e0e0);
  justify-content: center;
}

.calendar-legend .legend-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.8rem;
}

.calendar-legend .legend-color {
  width: 16px;
  height: 16px;
  border-radius: 4px;
}

.calendar-legend .legend-color.available {
  background: var(--success-light, #dcfce7);
  border: 1px solid var(--success-color, #22c55e);
}

.calendar-legend .legend-color.selected {
  background: var(--primary-color, #3b82f6);
}

.calendar-legend .legend-color.unavailable {
  background: var(--error-light, #fee2e2);
  border: 1px solid var(--error-color, #dc2626);
}

/* Mobile optimizations for calendar */
@media (max-width: 480px) {
  .calendar-container {
    padding: 0.5rem;
  }

  .calendar-nav {
    padding: 0.5rem 0.75rem;
    font-size: 1.1rem;
    min-width: 40px;
    min-height: 40px;
  }

  .calendar-title {
    font-size: 1rem;
  }

  .calendar-weekdays {
    font-size: 0.75rem;
  }

  .calendar-days {
    gap: 2px;
  }

  .calendar-day {
    font-size: 0.8rem;
    min-width: 32px;
    min-height: 32px;
    border-radius: 6px;
  }

  .calendar-legend {
    gap: 0.5rem;
    flex-direction: column;
    align-items: flex-start;
  }
}

/* ===== Time Slots ===== */
.timeslot-container {
  margin-top: 1rem;
}

#selected-date-display {
  font-weight: 600;
  font-size: 1.1rem;
  margin-bottom: 1rem;
  text-align: center;
}

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

.timeslot-btn {
  padding: 1rem 0.5rem;
  border: 3px solid;
  border-radius: 10px;
  background: white;
  cursor: pointer;
  transition: all 0.25s ease;
  font-size: 0.9rem;
  font-weight: 600;
  text-align: center;
  min-height: 60px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.25rem;
}

/* Icon vor dem Text */
.timeslot-btn::before {
  display: block;
  font-size: 1.2rem;
  line-height: 1;
}

/* Status: Verfügbar (Grün) */
.timeslot-btn.available {
  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-btn.available::before {
  content: '✓';
  color: #2e7d32;
}

.timeslot-btn.available:hover:not(:disabled) {
  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);
}

/* Status: Ausgewählt (Blau/Primary) */
.timeslot-btn.selected {
  background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
  color: white;
  border-color: #1d4ed8;
  font-weight: 700;
  box-shadow: 0 4px 10px rgba(59, 130, 246, 0.4);
  transform: scale(1.05);
}

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

/* Status: Mittagspause (Gelb/Orange) */
.timeslot-btn.lunch {
  background: linear-gradient(135deg, #fff3cd 0%, #ffe082 100%);
  border-color: #ffc107;
  color: #856404;
  opacity: 0.85;
  cursor: not-allowed;
  box-shadow: 0 2px 4px rgba(255, 193, 7, 0.2);
  text-decoration: line-through;
}

.timeslot-btn.lunch::before {
  content: '🍽️';
  text-decoration: none;
}

/* Status: Zu kurzfristig (Grau) */
.timeslot-btn.too-soon {
  background: #f3f4f6;
  border-color: #9ca3af;
  color: #6b7280;
  cursor: not-allowed;
  opacity: 0.75;
}

.timeslot-btn.too-soon::before {
  content: '⊗';
  color: #6b7280;
}

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

.timeslot-btn.booked::before {
  content: '✕';
  color: #dc2626;
}

/* Status: Nicht verfügbar (Grau) */
.timeslot-btn.unavailable {
  background: #e5e7eb;
  border-color: #9ca3af;
  color: #6b7280;
  cursor: not-allowed;
  opacity: 0.6;
}

.timeslot-btn.unavailable::before {
  content: '—';
}

/* Disabled state */
.timeslot-btn:disabled {
  cursor: not-allowed;
}

.timeslot-btn:disabled:hover {
  transform: none;
}

/* ===== Slot Legend Styles ===== */
.slot-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
  padding: 1rem;
  background: #f9fafb;
  border-radius: 10px;
}

.slot-legend .legend-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.85rem;
  padding: 0.5rem 0.75rem;
  background: white;
  border-radius: 8px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

.slot-legend .legend-color {
  width: 28px;
  height: 28px;
  border-radius: 6px;
  border: 2px solid;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9rem;
  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: #3b82f6;
  border-color: #2563eb;
  color: white;
}

.legend-color.slot-selected::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: #f3f4f6;
  border-color: #9ca3af;
  color: #6b7280;
}

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

/* ===== Terms & Confirmation ===== */
.checkout-terms {
  padding: 1rem;
  background: var(--surface-secondary, #f9fafb);
  border-radius: 8px;
  margin: 1rem 0;
}

.checkout-terms label {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  font-size: 0.875rem;
  cursor: pointer;
}

.checkout-terms input[type="checkbox"] {
  margin-top: 2px;
  width: 18px;
  height: 18px;
  accent-color: var(--primary-color, #3b82f6);
}

.checkout-terms a {
  color: var(--primary-color, #3b82f6);
}

.price-guarantee {
  padding: 1rem;
  background: var(--success-light, #dcfce7);
  border-radius: 8px;
  font-size: 0.875rem;
  color: var(--success-dark, #166534);
  text-align: center;
  margin: 1rem 0;
}

/* ===== Confirmation Box ===== */
.confirmation-box {
  background: var(--surface-color, #fff);
  border: 1px solid var(--border-color, #e0e0e0);
  border-radius: 12px;
  padding: 1.5rem;
  margin: 1rem 0;
}

.confirmation-box h4 {
  margin: 0 0 1rem 0;
  font-size: 1.25rem;
}

.confirmation-box h5 {
  margin: 1rem 0 0.5rem 0;
  font-size: 1rem;
}

.confirmation-box ul {
  margin: 0;
  padding-left: 1.25rem;
}

.confirmation-box li {
  margin-bottom: 0.25rem;
}

.confirmation-box .total {
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 2px solid var(--border-color, #e0e0e0);
  font-size: 1.25rem;
}

.confirmation-actions {
  display: flex;
  gap: 1rem;
  margin-top: 1.5rem;
}

/* ===== Loading ===== */
.loading {
  text-align: center;
  padding: 2rem;
  color: var(--text-muted, #6b7280);
}

.error {
  color: var(--error-color, #dc2626);
  padding: 1rem;
  background: var(--error-light, #fee2e2);
  border-radius: 6px;
}

/* ===== Field Status Indicators ===== */
.field-status {
  display: block;
  margin-top: 0.5rem;
  font-size: 0.8rem;
  color: #64748b;
}

.field-status.auto-detected {
  color: #16a34a;
}

.field-status.needs-check {
  color: #d97706;
  font-weight: 500;
}

.field-status.manual {
  color: #6366f1;
  font-weight: 500;
}

/* ===== Responsive ===== */
@media (max-width: 768px) {
  .vehicle-type-buttons {
    flex-direction: column;
  }

  .main-services-grid {
    grid-template-columns: 1fr;
  }

  .addon-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .timeslot-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .confirmation-actions {
    flex-direction: column;
  }
}

/* === COLLAPSIBLE SERVICES SECTIONS === */
.services-section {
  margin-bottom: 24px;
}

.services-section .section-title {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 8px;
  color: #1a1a2e;
  display: flex;
  align-items: center;
  gap: 8px;
}

.services-section .section-subtitle {
  font-size: 14px;
  color: #6c757d;
  margin: 0 0 16px 0;
  line-height: 1.5;
  padding: 10px 14px;
  background: linear-gradient(135deg, #f0f7ff 0%, #e8f4fd 100%);
  border-left: 3px solid #0d6efd;
  border-radius: 0 8px 8px 0;
}

.section-header-collapsible {
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
  padding: 12px 16px;
  background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
  border-radius: 8px;
  margin-bottom: 12px;
  transition: all 0.2s ease;
}

.section-header-collapsible:hover {
  background: linear-gradient(135deg, #e9ecef 0%, #dee2e6 100%);
}

.section-header-collapsible .section-title {
  margin: 0;
}

.collapse-icon {
  font-size: 12px;
  transition: transform 0.2s ease;
}

.section-hint {
  font-size: 12px;
  color: #6c757d;
}

/* Optional services list */
.optional-services-list {
  transition: max-height 0.3s ease, opacity 0.3s ease;
  overflow: hidden;
}

.optional-services-list.collapsed {
  max-height: 0;
  opacity: 0;
}

/* Optional service row */
.optional-service-row {
  background: #fff;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  margin-bottom: 8px;
  transition: all 0.2s ease;
}

.optional-service-row:hover {
  border-color: #4361ee;
  box-shadow: 0 2px 8px rgba(67, 97, 238, 0.1);
}

.optional-service-row.selected {
  border-color: #4361ee;
  background: #f0f4ff;
}

.optional-service-main {
  display: flex;
  align-items: center;
  padding: 12px 16px;
  gap: 12px;
  cursor: pointer;
}

.optional-service-main .service-name {
  flex: 1;
  font-weight: 500;
}

.optional-service-main .service-price {
  font-weight: 600;
  color: #4361ee;
}

.optional-service-main .btn-expand {
  background: none;
  border: 1px solid #dee2e6;
  border-radius: 4px;
  padding: 4px 8px;
  font-size: 11px;
  cursor: pointer;
  color: #6c757d;
  transition: all 0.2s ease;
}

.optional-service-main .btn-expand:hover {
  background: #f8f9fa;
  border-color: #adb5bd;
}

/* Checkbox styling */
.service-checkbox {
  display: flex;
  align-items: center;
  cursor: pointer;
}

.service-checkbox input[type= checkbox] {
  width: 20px;
  height: 20px;
  accent-color: #4361ee;
  cursor: pointer;
}

/* Service details */
.optional-service-details {
  padding: 0 16px;
  max-height: 0;
  overflow: hidden;
  transition: all 0.3s ease;
  border-top: 0 solid #e0e0e0;
}

.optional-service-details.expanded {
  max-height: 200px;
  padding: 12px 16px;
  border-top: 1px solid #e0e0e0;
}

.optional-service-details .service-scope {
  font-size: 13px;
  color: #495057;
  margin-bottom: 8px;
}

.optional-service-details .service-meta {
  display: flex;
  gap: 16px;
  font-size: 12px;
  color: #6c757d;
}

/* Recommended section - no background, just layout */
.recommended-section {
  padding: 0;
  margin-bottom: 16px;
  width: fit-content;
}

/* Optional section - match recommended section width */
.services-section.optional-section {
  width: fit-content;
}

.services-section.optional-section .section-header-collapsible {
  width: 100%;
}

.recommended-section .section-title {
  color: #856404;
}

/* Grid inside recommended section - responsive horizontal layout */
.recommended-section .main-services-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}

.recommended-section .main-services-grid .service-card {
  flex: 0 0 320px;
  min-width: 280px;
  max-width: 320px;
}

/* === MOBILE RESPONSIVE FIXES === */
@media (max-width: 768px) {
  .services-section {
    margin-bottom: 16px;
  }

  .recommended-section {
    padding: 12px;
    margin-left: -12px;
    margin-right: -12px;
    border-radius: 0;
    border-left: none;
    border-right: none;
  }

  .services-section .section-title {
    font-size: 16px;
  }

  .main-services-grid {
    display: flex;
    flex-direction: column;
    gap: 12px;
  }

  .service-card {
    width: 100%;
    margin: 0;
  }

  .service-card-header {
    flex-wrap: wrap;
    gap: 8px;
  }

  .service-card-header .service-name {
    width: 100%;
    font-size: 15px;
  }

  .badge-recommended,
  .badge-optional {
    font-size: 10px;
    padding: 2px 6px;
  }

  .service-card-body {
    padding: 8px 12px;
  }

  .service-card-footer {
    flex-wrap: wrap;
    gap: 8px;
    padding: 10px 12px;
  }

  .service-card-footer .service-price {
    font-size: 16px;
  }

  .service-card-footer .service-toggle {
    font-size: 12px;
  }

  /* Section header */
  .section-header-collapsible {
    padding: 10px 12px;
    flex-wrap: wrap;
    gap: 4px;
  }

  .section-header-collapsible .section-title {
    font-size: 14px;
    width: 100%;
  }

  .section-hint {
    font-size: 11px;
  }

  /* Optional service rows */
  .optional-service-main {
    padding: 10px 12px;
    flex-wrap: wrap;
    gap: 8px;
  }

  .optional-service-main .service-checkbox {
    order: 1;
  }

  .optional-service-main .service-name {
    order: 2;
    flex: 1;
    min-width: calc(100% - 40px);
    font-size: 14px;
  }

  .optional-service-main .service-price {
    order: 3;
    font-size: 14px;
    margin-left: 32px;
  }

  .optional-service-main .btn-expand {
    order: 4;
    font-size: 10px;
    padding: 3px 6px;
  }

  .optional-service-details.expanded {
    padding: 10px 12px;
  }

  .optional-service-details .service-meta {
    flex-wrap: wrap;
    gap: 8px;
  }
}

@media (max-width: 480px) {
  .services-section .section-title {
    font-size: 14px;
  }

  .optional-service-main {
    padding: 8px 10px;
  }

  .optional-service-main .service-name {
    font-size: 13px;
  }

  .optional-service-main .service-price {
    font-size: 13px;
    font-weight: 700;
  }

  .service-card-header .service-name {
    font-size: 14px;
  }

  .service-card-body .service-scope {
    font-size: 12px;
  }

  .service-meta {
    font-size: 11px;
    flex-direction: column;
    gap: 4px;
  }
}

/* === SERVICE CARD FIXES === */
.service-card {
  position: relative;
  overflow: visible;
  box-sizing: border-box;
}

.service-card-header {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 8px;
  padding: 12px;
}

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

.service-toggle {
  background: #4361ee;
  color: white;
  padding: 6px 12px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 500;
  white-space: nowrap;
}

.service-card.selected .service-toggle {
  background: #28a745;
}

/* Fix overflow issues */
@media (max-width: 768px) {
  .service-card {
    overflow: hidden;
  }

  .service-toggle {
    padding: 5px 10px;
    font-size: 11px;
  }
}

/* === STEP PROGRESS BAR === */
.step-progress-bar {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 24px;
  padding: 16px 0;
  border-bottom: 1px solid #e0e0e0;
  overflow-x: auto;
  gap: 4px;
}

.step-indicator {
  display: flex;
  flex-direction: column;
  align-items: center;
  flex: 1;
  min-width: 50px;
  cursor: default;
  opacity: 0.4;
  transition: all 0.2s ease;
}

.step-indicator.clickable {
  cursor: pointer;
  opacity: 0.7;
}

.step-indicator.clickable:hover {
  opacity: 1;
}

.step-indicator.active {
  opacity: 1;
  cursor: default;
}

.step-indicator.completed {
  opacity: 1;
}

.step-dot {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #e0e0e0;
  color: #6c757d;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 14px;
  margin-bottom: 6px;
  transition: all 0.2s ease;
}

.step-indicator.active .step-dot {
  background: #4361ee;
  color: white;
  box-shadow: 0 2px 8px rgba(67, 97, 238, 0.3);
}

.step-indicator.completed .step-dot {
  background: #28a745;
  color: white;
  position: relative;
  font-size: 0; /* Hide the number */
}

.step-indicator.completed .step-dot::after {
  content: '✓';
  position: absolute;
  font-size: 16px;
  font-weight: bold;
  color: white;
}

.step-indicator.clickable:hover .step-dot {
  transform: scale(1.1);
  box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

.step-label {
  font-size: 10px;
  color: #6c757d;
  text-align: center;
  white-space: nowrap;
}

.step-indicator.active .step-label {
  color: #4361ee;
  font-weight: 600;
}

.step-indicator.completed .step-label {
  color: #28a745;
}

/* Mobile Progress Bar */
@media (max-width: 768px) {
  .step-progress-bar {
    padding: 12px 0;
    margin-bottom: 16px;
    gap: 2px;
  }

  .step-indicator {
    min-width: 40px;
  }

  .step-dot {
    width: 28px;
    height: 28px;
    font-size: 12px;
  }

  .step-label {
    font-size: 8px;
  }
}

@media (max-width: 480px) {
  .step-dot {
    width: 24px;
    height: 24px;
    font-size: 11px;
  }

  .step-label {
    display: none;
  }
}

/* Step Connector Lines */
.step-connector {
  flex: 1;
  height: 2px;
  background: #e0e0e0;
  margin: 0 -4px;
  margin-top: 15px;
  min-width: 10px;
}

.step-indicator.completed + .step-connector {
  background: #28a745;
}

/* === MOBILE ADDON GRID FIX === */
@media (max-width: 768px) {
  .addon-grid {
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 12px !important;
  }

  .addon-card {
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 !important;
  }

  .booking-container {
    padding: 0 16px !important;
  }

  .booking-steps {
    padding: 0 4px !important;
  }

  .step-content {
    padding: 0 4px !important;
  }

  .page-title {
    padding: 0 8px !important;
  }

  .step-header {
    padding: 0 4px !important;
  }

  .form-group {
    margin-bottom: 16px;
  }

  .form-control {
    font-size: 16px !important; /* Prevents zoom on iOS */
  }
}

@media (max-width: 480px) {
  .booking-container {
    padding: 0 12px !important;
  }

  .addon-card {
    padding: 12px !important;
  }

  .addon-card .addon-name {
    font-size: 13px !important;
  }

  .addon-card .addon-price {
    font-size: 12px !important;
  }

  .step-connector {
    min-width: 5px;
  }

  .step-progress-bar {
    padding: 8px 4px !important;
    margin: 0 -4px 16px -4px;
  }
}

/* === GLOBAL MOBILE SPACING === */
@media (max-width: 768px) {
  body {
    overflow-x: hidden;
  }

  .booking-main {
    padding: 16px !important;
  }

  .vehicle-type-buttons {
    flex-direction: column;
    gap: 8px;
  }

  .vehicle-type-btn {
    padding: 12px !important;
  }

  .category-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
  }

  .category-btn {
    flex: 1 1 calc(50% - 4px);
    min-width: 100px;
    padding: 10px 8px !important;
    font-size: 13px;
  }

  .fuel-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
  }

  .fuel-btn {
    flex: 1 1 calc(50% - 4px);
    padding: 10px 8px !important;
    font-size: 13px;
  }

  .services-section {
    margin: 0 -8px;
    padding: 0 8px;
  }

  .recommended-section {
    margin: 0 -16px 16px -16px !important;
    padding: 16px !important;
    border-radius: 0 !important;
  }
}

/* ===== Step 7: Booking Summary Card ===== */
.booking-summary-card {
  background: #fff;
  border: 1px solid var(--border-color, #e0e0e0);
  border-radius: 12px;
  padding: 1.5rem;
  margin-bottom: 1.5rem;
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.summary-title {
  font-size: 1.1rem;
  font-weight: 600;
  margin: 0 0 1rem 0;
  padding-bottom: 0.75rem;
  border-bottom: 2px solid var(--primary-color, #3b82f6);
}

.summary-section {
  margin-bottom: 1rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border-color, #e0e0e0);
}

.summary-section:last-of-type {
  border-bottom: none;
}

.summary-section h4 {
  font-size: 0.9rem;
  font-weight: 600;
  margin: 0 0 0.5rem 0;
  color: var(--text-secondary, #6b7280);
}

.summary-section p {
  margin: 0.25rem 0;
  font-size: 0.95rem;
}

.summary-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.5rem 0;
  font-size: 0.9rem;
}

.summary-item:not(:last-child) {
  border-bottom: 1px dashed var(--border-color, #e0e0e0);
}

/* Mobile: Stack service name and price vertically */
@media (max-width: 480px) {
  .summary-item {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.25rem;
  }

  .summary-item .item-name {
    font-weight: 500;
    color: var(--text-primary, #1f2937);
  }

  .summary-item .item-price {
    font-weight: 700;
    color: var(--primary-color, #3b82f6);
    font-size: 0.95rem;
  }
}

.subtotal-row {
  display: flex;
  justify-content: space-between;
  padding: 0.5rem 0;
  font-weight: 500;
  font-size: 0.9rem;
  color: var(--text-secondary, #6b7280);
}

.summary-total {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 1.25rem 1.5rem;
  margin-top: 1rem;
  background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
  border-radius: 8px;
  color: white;
  text-align: center;
}

.summary-total .total-label {
  font-size: 0.85rem;
  font-weight: 500;
  color: white;
  opacity: 0.95;
  margin-top: 0.25rem;
  text-shadow: 0 1px 2px rgba(0,0,0,0.1);
}

.summary-total .total-amount {
  font-size: 1.75rem;
  font-weight: 700;
  color: white;
  text-shadow: 0 1px 2px rgba(0,0,0,0.1);
}

.no-items {
  color: var(--text-muted, #9ca3af);
  font-style: italic;
  font-size: 0.9rem;
}

/* ===== Mobile Cart Button (Floating) ===== */
.mobile-cart-btn {
  display: none; /* Hidden on desktop */
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 1000;
  background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
  color: white;
  border: none;
  border-radius: 50px;
  padding: 12px 20px;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 4px 15px rgba(59, 130, 246, 0.4);
  transition: all 0.3s ease;
  align-items: center;
  gap: 8px;
}

.mobile-cart-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(59, 130, 246, 0.5);
}

.mobile-cart-btn .cart-icon {
  font-size: 1.1rem;
}

/* Show on mobile */
@media (max-width: 768px) {
  .mobile-cart-btn {
    display: flex;
  }

  /* Hide sidebar on mobile */
  .booking-sidebar {
    display: none !important;
  }
}

/* ===== Mobile Cart Popover ===== */
.mobile-cart-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 1001;
}

.mobile-cart-popover {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  max-height: 80vh;
  background: white;
  border-radius: 20px 20px 0 0;
  z-index: 1002;
  display: flex;
  flex-direction: column;
  box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.15);
  animation: slideUp 0.3s ease;
}

@keyframes slideUp {
  from {
    transform: translateY(100%);
  }
  to {
    transform: translateY(0);
  }
}

.cart-popover-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--border-color, #e0e0e0);
}

.cart-popover-header h3 {
  margin: 0;
  font-size: 1.1rem;
  font-weight: 600;
}

.cart-close-btn {
  background: #f3f4f6;
  border: none;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  font-size: 1rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.cart-popover-content {
  flex: 1;
  overflow-y: auto;
  padding: 1rem 1.25rem;
}

.cart-section {
  margin-bottom: 1rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border-color, #e0e0e0);
}

.cart-section:last-child {
  border-bottom: none;
}

.cart-section h4 {
  font-size: 0.85rem;
  font-weight: 600;
  margin: 0 0 0.5rem 0;
  color: var(--text-secondary, #6b7280);
}

.cart-section p {
  margin: 0;
  font-size: 0.95rem;
}

.cart-item {
  display: flex;
  justify-content: space-between;
  padding: 0.4rem 0;
  font-size: 0.9rem;
}

.cart-subtotal {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-secondary, #6b7280);
  margin-top: 0.5rem;
  text-align: right;
}

.cart-empty {
  text-align: center;
  color: var(--text-muted, #9ca3af);
  padding: 2rem;
}

.cart-popover-footer {
  padding: 1rem 1.25rem;
  border-top: 1px solid var(--border-color, #e0e0e0);
  background: #f9fafb;
}

.cart-total-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 1rem;
  font-weight: 600;
}

.cart-total-price {
  font-size: 1.2rem;
  color: var(--primary-color, #3b82f6);
}

/* ===== Success Message (After Booking) ===== */
.success-message {
  max-width: 700px;
  margin: 2rem auto;
  padding: 2rem;
  text-align: center;
  background: var(--surface-color, #fff);
  border-radius: 12px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.success-message.hidden {
  display: none;
}

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

.success-message h2 {
  color: var(--success-color, #10b981);
  font-size: 1.75rem;
  margin-bottom: 0.5rem;
}

.success-message .success-subtitle {
  color: var(--text-secondary, #666);
  font-size: 1.1rem;
  margin-bottom: 1.5rem;
}

.success-info-box {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  background: #fff8e1;
  border: 1px solid #ffc107;
  border-radius: 8px;
  padding: 1rem 1.25rem;
  margin: 1.5rem 0;
  text-align: left;
}

.success-info-box .info-icon {
  font-size: 1.5rem;
  flex-shrink: 0;
}

.success-info-box .info-content p {
  margin: 0.25rem 0;
  font-size: 0.95rem;
  color: #856404;
}

.success-booking-summary,
#success-booking-summary {
  background: var(--background-color, #f8fafc);
  border-radius: 8px;
  padding: 1.5rem;
  margin: 1.5rem 0;
  text-align: left;
}

.success-booking-summary .summary-group,
#success-booking-summary .summary-group {
  margin-bottom: 1rem;
}

.success-booking-summary .summary-group h4,
#success-booking-summary .summary-group h4 {
  font-size: 0.9rem;
  color: var(--text-secondary, #666);
  margin-bottom: 0.5rem;
}

.success-booking-summary .summary-group p,
#success-booking-summary .summary-group p {
  margin: 0.25rem 0;
  font-size: 1rem;
}

.success-booking-summary .summary-group p.small,
#success-booking-summary .summary-group p.small {
  font-size: 0.85rem;
  color: var(--text-secondary, #666);
}

.success-booking-summary .summary-group ul,
#success-booking-summary .summary-group ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.success-booking-summary .summary-group ul li,
#success-booking-summary .summary-group ul li {
  display: flex;
  justify-content: space-between;
  padding: 0.5rem 0;
  border-bottom: 1px solid var(--border-color, #e5e7eb);
}

/* Mobile: Prices below service name in success summary */
@media (max-width: 576px) {
  .success-booking-summary .summary-group ul li,
  #success-booking-summary .summary-group ul li {
    flex-direction: column !important;
    align-items: flex-start !important;
    gap: 0.35rem;
  }

  .success-booking-summary .summary-group ul li .price,
  #success-booking-summary .summary-group ul li .price {
    font-size: 0.95rem;
    font-weight: 700;
    color: #3b82f6;
  }

  .success-booking-summary .summary-total-box,
  #success-booking-summary .summary-total-box {
    flex-direction: column;
    text-align: center;
    gap: 0.5rem;
  }
}

.success-booking-summary .summary-group ul li:last-child,
#success-booking-summary .summary-group ul li:last-child {
  border-bottom: none;
}

.success-booking-summary .summary-group ul li .price,
#success-booking-summary .summary-group ul li .price {
  font-weight: 600;
  color: var(--primary-color, #3b82f6);
}

.success-booking-summary .summary-total-box,
#success-booking-summary .summary-total-box {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: var(--primary-color, #3b82f6);
  color: white;
  padding: 1rem;
  border-radius: 8px;
  margin-top: 1rem;
  font-size: 1.1rem;
}

.success-booking-summary .summary-total-box .price,
#success-booking-summary .summary-total-box .price {
  font-size: 1.25rem;
  font-weight: 700;
}

.success-message .booking-reference {
  font-size: 1rem;
  margin: 1rem 0;
}

.success-message .booking-reference strong {
  font-family: monospace;
  background: var(--background-color, #f1f5f9);
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
}

.success-message .email-note {
  font-size: 0.95rem;
  color: var(--text-secondary, #666);
  margin-bottom: 1.5rem;
}

.success-message .success-actions {
  margin-top: 2rem;
}

.success-message .btn-lg {
  padding: 1rem 2.5rem;
  font-size: 1.1rem;
}

