/* Custom Enhancements for The Melbourne Taxi Clone */

/* Slider styles */
.taxi-slider {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 6px;
  border-radius: 9999px;
  background: var(--primary);
  outline: none;
  cursor: pointer;
  margin: 12px 0;
}

.taxi-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #ffffff;
  border: 2px solid var(--primary);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.taxi-slider::-webkit-slider-thumb:hover {
  transform: scale(1.15);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
}

.taxi-slider::-moz-range-thumb {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #ffffff;
  border: 2px solid var(--primary);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
  cursor: pointer;
}

/* Autocomplete suggestion dropdown */
.autocomplete-dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  z-index: 50;
  margin-top: 4px;
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: 0.75rem;
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
  max-height: 240px;
  overflow-y: auto;
  list-style: none;
  padding: 4px;
}

.autocomplete-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  font-size: 0.875rem;
  border-radius: 0.5rem;
  cursor: pointer;
  color: var(--foreground);
  transition: background-color 0.15s ease;
}

.autocomplete-item:hover, .autocomplete-item.active {
  background-color: var(--secondary);
}

.autocomplete-item svg {
  color: var(--primary);
  flex-shrink: 0;
}

/* Smooth step transitions */
.wizard-step {
  display: none;
  animation: fadeInStep 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.wizard-step.active {
  display: block;
}

@keyframes fadeInStep {
  from {
    opacity: 0;
    transform: translateX(12px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

/* Accordion smooth expansion */
.faq-content {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s cubic-bezier(0, 1, 0, 1), padding 0.3s ease;
}

.faq-item.open .faq-content {
  max-height: 300px;
  transition: max-height 0.4s ease-in-out;
}

/* Vehicle card, time button, pill button, and extra toggle styles */
.vehicle-card.selected,
.time-btn.selected,
.pill-btn.selected,
.extra-btn.selected,
#btn-child-seat.selected,
#btn-extra-luggage.selected,
.tariff-btn.selected {
  background-color: var(--primary) !important;
  color: var(--primary-foreground) !important;
  box-shadow: var(--shadow-taxi) !important;
  border-color: var(--primary) !important;
}

.vehicle-card:not(.selected),
.time-btn:not(.selected),
.pill-btn:not(.selected),
.extra-btn:not(.selected),
#btn-child-seat:not(.selected),
#btn-extra-luggage:not(.selected) {
  background-color: hsl(var(--secondary)) !important;
  color: hsl(var(--foreground)) !important;
  box-shadow: none !important;
}

.vehicle-card.selected svg,
.tariff-btn.selected svg {
  color: var(--primary-foreground) !important;
}

.vehicle-card:not(.selected) svg {
  color: hsl(var(--foreground)) !important;
}

/* Pulse badge */
.pulse-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: currentColor;
  animation: pulse 1.5s infinite;
}

/* WhatsApp Floating Button */
.whatsapp-float {
  position: fixed;
  bottom: 24px;
  right: 24px;
  background: #25D366;
  width: 58px;
  height: 58px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.3);
  z-index: 999;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.whatsapp-float:hover {
  transform: scale(1.08);
  box-shadow: 0 6px 18px rgba(37, 211, 102, 0.45);
}

@media (max-width: 767px) {
  .whatsapp-float {
    bottom: 84px;
    right: 16px;
    width: 52px;
    height: 52px;
  }
}

/* Assigned Driver & Taxi Card */
.driver-taxi-card {
  background: rgba(250, 204, 21, 0.08);
  border: 2px solid rgba(250, 204, 21, 0.45);
  border-radius: 1.25rem;
  padding: 1.25rem;
}

.taxi-plate-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #18181b;
  color: #facc15;
  border: 2px solid #facc15;
  border-radius: 0.6rem;
  padding: 0.35rem 0.85rem;
  font-family: var(--font-mono, monospace);
  font-weight: 900;
  letter-spacing: 0.18em;
  font-size: 1.15rem;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.25);
}

.driver-call-action {
  background: var(--primary);
  color: var(--primary-foreground);
  font-weight: 700;
  border-radius: 0.75rem;
  padding: 0.65rem 1rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  text-decoration: none;
  transition: opacity 0.2s ease, transform 0.15s ease;
}

.driver-call-action:hover {
  opacity: 0.9;
  transform: translateY(-1px);
}

.driver-wa-action {
  background: #25D366;
  color: #ffffff !important;
  font-weight: 700;
  border-radius: 0.75rem;
  padding: 0.65rem 1rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  text-decoration: none;
  transition: opacity 0.2s ease, transform 0.15s ease;
}

.driver-wa-action:hover {
  opacity: 0.9;
  transform: translateY(-1px);
}

/* 1. Hover Card Elevation (Micro-interaction) */
.hover-elevate-card {
  position: relative;
  transition: transform 0.28s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.28s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.28s ease;
  will-change: transform, box-shadow;
}

.hover-elevate-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 20px 32px -8px rgba(0, 0, 0, 0.16), 0 10px 16px -4px rgba(0, 0, 0, 0.08);
  border-color: rgba(250, 204, 21, 0.55) !important;
}

.hover-elevate-card:hover svg.text-primary {
  transform: scale(1.08);
  transition: transform 0.28s ease;
}
