/* Booking Page Styles */

.booking-page {
  min-height: 100vh;
  background: #ffffff;
}

/* Route Flow Connectors */
.form-group {
  position: relative;
}

#stopsContainer {
  position: relative;
}

/* Only show connectors when stops exist */
#stopsContainer:not(:empty)::before,
#stopsContainer:not(:empty)::after {
  content: '';
  position: absolute;
  left: 20px;
  width: 2px;
  background: linear-gradient(to bottom, #DBA958, transparent);
  z-index: 0;
}

#stopsContainer:not(:empty)::before {
  top: -12px;
  height: 12px;
}

#stopsContainer:not(:empty)::after {
  bottom: -12px;
  height: 12px;
  background: linear-gradient(to top, #DBA958, transparent);
}

/* Drag and Drop Styles */
.stop-item {
  cursor: move;
  user-select: none;
  position: relative;
  z-index: 1;
  padding: 0.75rem !important;
}

.stop-item.dragging {
  opacity: 0.5;
  transform: rotate(2deg);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
  z-index: 1000;
}

.stop-item:hover {
  box-shadow: 0 4px 12px rgba(219, 169, 88, 0.15);
}

/* Compact stop design */
.stop-item .stop-number {
  width: 1.5rem !important;
  height: 1.5rem !important;
  font-size: 0.75rem !important;
}

.stop-item input.stop-address {
  padding: 0.5rem 0.75rem !important;
  font-size: 0.9rem !important;
}

.stop-item select.stop-duration {
  padding: 0.375rem 0.5rem !important;
  font-size: 0.85rem !important;
}

/* Flatpickr custom styling */
.flatpickr-calendar {
  border-radius: 12px !important;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15) !important;
}

.flatpickr-day.selected {
  background: #DBA958 !important;
  border-color: #DBA958 !important;
}

.flatpickr-day.selected:hover {
  background: #c49645 !important;
  border-color: #c49645 !important;
}

.flatpickr-time input {
  color: #1a1a1a !important;
}

/* Google Places Autocomplete Dropdown Styling */
.pac-container {
  background-color: #ffffff !important;
  border-radius: 12px !important;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15) !important;
  border: 1px solid #e5e7eb !important;
  margin-top: 4px !important;
  padding: 8px 0 !important;
  min-width: 400px !important;
  max-width: 600px !important;
  z-index: 9999 !important;
}

.pac-item {
  padding: 10px 16px !important;
  cursor: pointer !important;
  border: none !important;
  background-color: #ffffff !important;
  transition: background-color 0.2s ease !important;
  color: rgb(57, 57, 57) !important;
}

.pac-item:hover {
  background-color: #f9fafb !important;
}

.pac-item-selected,
.pac-item-selected:hover {
  background-color: #f3f4f6 !important;
}

.pac-matched {
  font-weight: 600 !important;
  color: #DBA958 !important;
}

.pac-item-query {
  color: #1a1a1a !important;
  font-size: 14px !important;
}

.pac-icon {
  background-image: none !important;
  display: none !important;
}

.pac-icon-marker {
  background-image: none !important;
  display: none !important;
}

/* Ensure dropdown appears above other elements */
.pac-container::after {
  display: none !important;
}

/* Route Info Display */
#routeInfo {
  animation: slideDown 0.3s ease-out;
}

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

/* Car Selection Section */
.car-selection-section {
  min-height: 100vh;
  background: #ffffff;
  padding-top: 3rem;
  transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.5s ease;
}

.car-selection-section.slide-out-left {
  transform: translateX(-100%);
  opacity: 0;
}

/* Booking Form Section */
.booking-form-section {
  min-height: 100vh;
  padding-top: 3rem;
  transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.5s ease;
  transform: translateX(100%);
  opacity: 0;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 40;
  background: #f9fafb;
  overflow-y: auto;
}

.booking-form-section.active {
  transform: translateX(0);
  opacity: 1;
  position: relative;
  z-index: 1;
}

.booking-form-section.hidden {
  display: none;
}

/* Fleet Cards - Matching homepage style */
.fleet-card {
  transition: all 0.3s ease;
}

.fleet-card:hover {
  transform: translateY(-8px);
}

.fleet-card.selected {
  border-color: var(--color-primary);
  box-shadow: 0 20px 40px rgba(219, 169, 88, 0.2);
}

/* Car Card Compatibility */
.car-card {
  background: white;
  border: 1px solid #e5e7eb;
  border-radius: 20px;
  overflow: hidden;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  cursor: pointer;
  position: relative;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.car-card:hover {
  transform: translateY(-8px);
  border-color: var(--color-primary);
  box-shadow: 0 20px 40px rgba(219, 169, 88, 0.15), 0 4px 12px rgba(0, 0, 0, 0.08);
}

.car-card.selected {
  border-color: var(--color-primary);
  background: linear-gradient(to bottom, white, #fffbf5);
  box-shadow: 0 20px 40px rgba(219, 169, 88, 0.2), 0 4px 12px rgba(0, 0, 0, 0.1);
}

/* Car Image */
.car-image-wrapper {
  position: relative;
  padding: 2rem;
  background: linear-gradient(180deg, #f9fafb 0%, white 100%);
  min-height: 220px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.car-image {
  width: 100%;
  height: auto;
  object-fit: contain;
  max-height: 200px;
  filter: drop-shadow(0 10px 20px rgba(0, 0, 0, 0.3));
  transition: transform 0.4s ease;
}

.car-card:hover .car-image {
  transform: scale(1.05);
}

.car-image-placeholder {
  width: 100%;
  height: 180px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #f9fafb;
  border-radius: 12px;
}

.car-glow {
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 80%;
  height: 40px;
  background: radial-gradient(ellipse, rgba(219, 169, 88, 0.2) 0%, transparent 70%);
  filter: blur(20px);
  opacity: 0;
  transition: opacity 0.4s ease;
}

.car-card:hover .car-glow {
  opacity: 1;
}

/* Car Details */
.car-details {
  padding: 1.5rem;
  background: white;
}

.car-name {
  font-family: var(--font-brygada-1918);
  font-size: 1.5rem;
  font-weight: 600;
  color: #111827;
  margin-bottom: 0.25rem;
}

.car-type {
  color: #6b7280;
  font-size: 0.875rem;
  margin-bottom: 1rem;
}

.car-features {
  display: flex;
  gap: 1.5rem;
  margin-bottom: 1.5rem;
  padding: 1rem 0;
  border-top: 1px solid #e5e7eb;
  border-bottom: 1px solid #e5e7eb;
}

.car-features .feature {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: #374151;
  font-size: 0.875rem;
}

.select-car-btn {
  transition: all 0.3s ease;
}

.car-card:hover .select-car-btn {
  background: var(--color-primary-dark);
}

/* Booking Form Section */
.booking-form-section {
  background: linear-gradient(135deg, #f9fafb 0%, #f3f4f6 100%);
  padding-top: 2rem;
}

.booking-form-section.hidden {
  display: none;
}

/* Selected Car Summary */
.selected-car-summary {
  padding: 1.5rem;
  background: linear-gradient(135deg, #fffbf5 0%, white 100%);
  border: 2px solid var(--color-primary);
  border-radius: 15px;
  box-shadow: 0 4px 12px rgba(219, 169, 88, 0.1);
}

/* Section Header */
.section-header {
  margin-bottom: 1.5rem;
}

/* Form Styles */
.form-group {
  margin-bottom: 1.5rem;
}

.form-label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: #111827;
  font-weight: 500;
  margin-bottom: 0.5rem;
  font-size: 0.875rem;
  font-family: var(--font-outfit);
}

.form-input {
  width: 100%;
  padding: 0.875rem 1rem;
  background: white;
  border: 1px solid #d1d5db;
  border-radius: 12px;
  color: #111827;
  font-size: 1rem;
  transition: all 0.3s ease;
  font-family: var(--font-outfit);
}

.form-input:focus {
  outline: none;
  border-color: var(--color-primary);
  background: white;
  box-shadow: 0 0 0 3px rgba(219, 169, 88, 0.1);
}

.form-input::placeholder {
  color: #9ca3af;
}

.form-input::-webkit-calendar-picker-indicator {
  cursor: pointer;
}

/* Stops Container */
.stops-container {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-bottom: 1rem;
}

.stop-item {
  position: relative;
  padding: 1rem;
  background: #f9fafb;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  display: flex;
  gap: 1rem;
  align-items: start;
}

.stop-number {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--color-primary);
  color: #111827;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.875rem;
  flex-shrink: 0;
}

.stop-content {
  flex: 1;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 1rem;
}

.stop-address-input {
  grid-column: 1 / -1;
}

.stop-duration-input {
  width: 120px;
}

.remove-stop-btn {
  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
  padding: 0.25rem;
  background: #fee2e2;
  border: none;
  border-radius: 6px;
  color: #dc2626;
  cursor: pointer;
  transition: all 0.2s ease;
}

.remove-stop-btn:hover {
  background: #fecaca;
  color: #b91c1c;
}

/* Animations */
@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

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

@keyframes slideInRight {
  from {
    transform: translateX(100%);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

@keyframes slideOutLeft {
  from {
    transform: translateX(0);
    opacity: 1;
  }
  to {
    transform: translateX(-100%);
    opacity: 0;
  }
}

@keyframes slideInLeft {
  from {
    transform: translateX(-100%);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

.animate-fade-in {
  animation: fadeIn 0.6s ease-out;
}

.animate-fade-in-up {
  animation: fadeInUp 0.6s ease-out;
}

.slide-in-right {
  animation: slideInRight 0.5s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

.slide-out-left {
  animation: slideOutLeft 0.5s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

.slide-in-left {
  animation: slideInLeft 0.5s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

.delay-200 {
  animation-delay: 0.2s;
  animation-fill-mode: backwards;
}

/* Map Styling */
#bookingMap {
  background: #f3f4f6;
}

/* Responsive adjustments */
@media (max-width: 1024px) {
  #bookingMap {
    min-height: 400px;
  }
}

@media (max-width: 768px) {
  .booking-form-section {
    position: relative;
  }
  
  .car-selection-section.slide-out-left {
    display: none;
  }
}

.delay-400 {
  animation-delay: 0.4s;
  animation-fill-mode: backwards;
}

/* Responsive */
@media (max-width: 768px) {
  .booking-hero {
    padding-top: 80px;
  }

  .car-cards-container {
    grid-template-columns: 1fr;
  }

  .car-image-wrapper {
    min-height: 180px;
  }

  .car-image {
    max-height: 160px;
  }
}
