/* Mobile Booking Wizard Styles */

/* Mobile-first responsive design */
.booking-wizard {
  /* Ensure proper touch targets on mobile */
  min-height: 100vh;
  position: relative;
}

/* Step progress indicator styling */
.step-indicator {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  position: relative;
}

.step-circle {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 2px solid #d1d5db; /* gray-300 */
  background: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 500;
  color: #6b7280; /* gray-500 */
  transition: all 0.3s ease;
  position: relative;
  z-index: 2;
}

.step-circle.active {
  border-color: #2563eb; /* blue-600 */
  background: #2563eb;
  color: white;
}

.step-circle.completed {
  border-color: #059669; /* green-600 */
  background: #059669;
  color: white;
}

.step-circle.completed::after {
  content: '✓';
  font-size: 12px;
  font-weight: bold;
}

.step-line {
  flex: 1;
  height: 2px;
  background: #d1d5db; /* gray-300 */
  margin: 0 8px;
  transition: background-color 0.3s ease;
  position: relative;
  z-index: 1;
}

.step-line.completed {
  background: #059669; /* green-600 */
}

.step-line.active {
  background: linear-gradient(to right, #059669 50%, #d1d5db 50%);
}

/* Unit card styling */
.unit-card {
  transition: all 0.2s ease;
  cursor: pointer;
  position: relative;
}

.unit-card:hover {
  border-color: #93c5fd; /* blue-300 */
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

.unit-card.selected {
  border-color: #2563eb; /* blue-600 */
  background: #eff6ff; /* blue-50 */
  box-shadow: 0 0 0 2px #93c5fd; /* blue-300 */
}

.unit-card.selected .unit-selected-indicator {
  display: block !important;
}

/* Form styling for better mobile UX */
.mobile-form-input {
  font-size: 16px; /* Prevents zoom on iOS */
  padding: 12px 16px;
  border-radius: 8px;
  border: 2px solid #d1d5db;
  transition: border-color 0.2s ease;
}

.mobile-form-input:focus {
  border-color: #2563eb;
  outline: none;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.mobile-form-input.error {
  border-color: #dc2626; /* red-600 */
  background: #fef2f2; /* red-50 */
}

/* Touch-friendly buttons */
.mobile-button {
  min-height: 48px; /* WCAG recommended touch target */
  font-size: 16px;
  font-weight: 500;
  padding: 12px 24px;
  border-radius: 8px;
  transition: all 0.2s ease;
  position: relative;
  overflow: hidden;
}

.mobile-button:active {
  transform: scale(0.98);
}

.mobile-button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

/* Loading states */
.loading-spinner {
  animation: spin 1s linear infinite;
}

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

/* Auto-save indicator animation */
.auto-save-indicator {
  animation: slideInDown 0.3s ease-out;
}

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

/* Filter button states */
.filter-button {
  border: 1px solid #d1d5db;
  background: white;
  color: #6b7280;
  transition: all 0.2s ease;
}

.filter-button.active {
  border-color: #2563eb;
  background: #2563eb;
  color: white;
}

.filter-button:hover:not(.active) {
  border-color: #93c5fd;
  background: #f8fafc;
}

/* Error banner styling */
.error-banner {
  animation: slideInDown 0.3s ease-out;
}

.error-banner.fade-out {
  animation: slideOutUp 0.3s ease-in;
}

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

/* Progress bar animation */
.progress-bar {
  transition: width 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Responsive adjustments */
@media (min-width: 640px) {
  /* Tablet adjustments */
  .booking-wizard {
    max-width: 768px;
    margin: 0 auto;
  }

  .step-circle {
    width: 40px;
    height: 40px;
    font-size: 16px;
  }

  .unit-card {
    margin-bottom: 16px;
  }
}

@media (min-width: 1024px) {
  /* Desktop adjustments */
  .booking-wizard {
    max-width: 1024px;
  }

  .unit-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
  }

  .step-content {
    padding: 32px;
  }
}

/* High DPI display optimization */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
  .step-circle {
    border-width: 1px;
  }

  .unit-card {
    border-width: 1px;
  }
}

/* Dark mode support (if needed) */
@media (prefers-color-scheme: dark) {
  .booking-wizard {
    background: #1f2937; /* gray-800 */
    color: #f9fafb; /* gray-50 */
  }

  .unit-card {
    background: #374151; /* gray-700 */
    border-color: #4b5563; /* gray-600 */
  }

  .mobile-form-input {
    background: #374151;
    border-color: #4b5563;
    color: #f9fafb;
  }
}

/* Accessibility enhancements */
@media (prefers-reduced-motion: reduce) {
  .step-circle,
  .step-line,
  .unit-card,
  .mobile-button,
  .progress-bar {
    transition: none;
  }

  .loading-spinner {
    animation: none;
  }

  .auto-save-indicator,
  .error-banner {
    animation: none;
  }
}

/* Focus management for keyboard navigation */
.mobile-button:focus,
.mobile-form-input:focus,
.unit-card:focus {
  outline: 2px solid #2563eb;
  outline-offset: 2px;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
  .step-circle {
    border-width: 3px;
  }

  .unit-card {
    border-width: 2px;
  }

  .mobile-button {
    border-width: 2px;
  }
}

/* Print styles (in case someone tries to print) */
@media print {
  .booking-wizard {
    background: white;
    color: black;
  }

  .mobile-button,
  .step-line,
  .auto-save-indicator,
  .error-banner {
    display: none;
  }
}