<script setup lang="ts">
import { onMounted, ref, computed } from 'vue'
import { useI18n } from 'vue-i18n'
import { useTaxiStore } from '@/stores/taxi'
import { useShuttleStore } from '@/stores/shuttle'
import { analyticsService } from '@/services/analyticsService'
import { API_URL } from '@/services/apiClient'
import type { Taxi, Shuttle } from '@/types'
import FavoriteButton from '@/components/FavoriteButton.vue'

const { t } = useI18n()
const taxiStore = useTaxiStore()
const shuttleStore = useShuttleStore()

const currentTab = ref<'local' | 'intercity'>('local')
const selectedZone = ref('all')
const selectedShift = ref('all')
const onlyEnglish = ref(false)

const corregimientos = ['all', 'Boquete', 'David - Boquete', 'Boquete - David', 'Aeropuerto - Boquete']
const shifts = ['all', 'dia', 'tarde', 'noche']

// Shuttle Filters
const shuttleRouteFilter = ref('all')
const shuttleTypeFilter = ref('all')
const expandedShuttleId = ref<string | null>(null)

const shuttleRoutes = computed(() => {
  const routes = shuttleStore.shuttles.map(s => `${s.origin} - ${s.destination}`)
  return [...new Set(routes)].sort()
})

const filteredShuttles = computed(() => {
  return shuttleStore.shuttles.filter(shuttle => {
    const routeName = `${shuttle.origin} - ${shuttle.destination}`
    const matchesRoute = shuttleRouteFilter.value === 'all' || routeName === shuttleRouteFilter.value
    const matchesType = shuttleTypeFilter.value === 'all' || shuttle.trip_type === shuttleTypeFilter.value
    return matchesRoute && matchesType
  })
})

onMounted(async () => {
  analyticsService.logEvent({ event_name: 'screen_view', screen_name: 'TransportHub' })
  await Promise.all([
    taxiStore.loadTaxis(),
    shuttleStore.loadShuttles()
  ])
})

const filteredTaxis = computed(() => {
  return taxiStore.taxis.filter(taxi => {
    const matchesZone = selectedZone.value === 'all' || taxi.corregimiento === selectedZone.value
    const matchesShift = selectedShift.value === 'all' || taxi.shift === selectedShift.value
    const matchesEnglish = !onlyEnglish.value || taxi.english_speaking
    return matchesZone && matchesShift && matchesEnglish
  })
})

function getImageUrl(path?: string) {
  if (!path) return `https://ui-avatars.com/api/?name=Taxi&background=fee715&color=101820`
  if (path.startsWith('http')) return path
  return `${API_URL}${path.startsWith('/') ? '' : '/'}${path}`
}

const handleCall = (taxi: Taxi) => {
  analyticsService.logEvent({ 
    event_name: 'taxi_click', 
    item_id: taxi.owner_name,
    properties: { 
      action: 'call',
      taxi_id: taxi.id,
      plate: taxi.license_plate
    }
  })
  window.location.href = `tel:${taxi.phone_number}`
}

const handleReserve = (shuttle: Shuttle) => {
  analyticsService.logEvent({ 
    event_name: 'shuttle_contact', 
    item_id: shuttle.id,
    properties: { action: 'whatsapp', route: shuttle.route_name }
  })
  const message = encodeURIComponent(`Hola SIBU, me gustaría reservar un cupo para la ruta: ${shuttle.route_name}.`)
  window.open(`https://wa.me/${shuttle.contact_whatsapp.replace(/\+/g, '')}?text=${message}`, '_blank')
}

const handleCallShuttle = (shuttle: Shuttle) => {
  analyticsService.logEvent({ 
    event_name: 'shuttle_contact', 
    item_id: shuttle.id,
    properties: { action: 'call', route: shuttle.route_name }
  })
}

function getShiftLabel(shift: string) {
  if (shift === 'dia') return t('taxi.dayShift')
  if (shift === 'tarde') return t('taxi.afternoonShift')
  if (shift === 'noche') return t('taxi.nightShift')
  return shift
}
</script>

<template>
  <div class="taxi-view">
    <header class="header-main">
      <h1 class="brand-title">{{ t('taxi.title') }}</h1>
      <!-- Tab Switcher Premium -->
      <div class="hub-tabs">
        <div class="tabs-background">
          <button 
            class="hub-tab" 
            :class="{ active: currentTab === 'local' }" 
            @click="currentTab = 'local'"
          >
            <span class="material-icons">local_taxi</span>
            {{ t('taxi.tabLocal') }}
          </button>
          <button 
            class="hub-tab" 
            :class="{ active: currentTab === 'intercity' }" 
            @click="currentTab = 'intercity'"
          >
            <span class="material-icons">directions_bus</span>
            {{ t('taxi.tabIntercity') }}
          </button>
          <div class="tab-slider" :style="{ left: currentTab === 'local' ? '4px' : 'calc(50% + 2px)' }"></div>
        </div>
      </div>
    </header>

    <!-- TAB 1: LOCAL TAXIS -->
    <template v-if="currentTab === 'local'">
      <div class="filters-container">
        <div class="filter-card">
          <div class="selectors-side">
            <div class="select-group">
              <span class="material-icons">location_on</span>
              <select v-model="selectedZone">
                <option value="all">{{ t('taxi.allZones') }}</option>
                <option v-for="zone in corregimientos.filter(z => z !== 'all')" :key="zone" :value="zone">{{ zone }}</option>
              </select>
            </div>
            <div class="select-group">
              <span class="material-icons">schedule</span>
              <select v-model="selectedShift">
                <option value="all">{{ t('taxi.shift') }}</option>
                <option v-for="s in shifts.filter(x => x !== 'all')" :key="s" :value="s">{{ getShiftLabel(s) }}</option>
              </select>
            </div>
          </div>
          <div class="lang-toggle-side">
            <span class="lang-text">{{ t('taxi.englishLabel') }}</span>
            <label class="checkbox-container">
              <input type="checkbox" v-model="onlyEnglish">
              <span class="checkmark"></span>
            </label>
          </div>
        </div>
      </div>
      
      <div v-if="taxiStore.isLoading" class="state-container">
        <span class="material-icons spin">refresh</span>
        <p>{{ t('taxi.loadingTaxis') }}</p>
      </div>
      
      <div v-else-if="taxiStore.error" class="state-container">
        <span class="material-icons">error_outline</span>
        <p>{{ taxiStore.error }}</p>
      </div>
      
      <div v-else class="taxis-grid">
        <div v-for="taxi in filteredTaxis" :key="taxi.id" class="taxi-card-new">
          <div class="card-top">
            <div class="driver-avatar">
              <img :src="getImageUrl(taxi.image_url)" alt="Driver">
            </div>
            <div class="driver-info">
              <h3>{{ taxi.owner_name }}</h3>
              <div class="rating-stars">
                <span v-for="i in 5" :key="i" class="material-icons">
                  {{ i <= (taxi.rating || 5) ? 'star' : 'star_border' }}
                </span>
              </div>
            </div>
            <div class="fav-icon-wrapper">
              <FavoriteButton 
                item-type="taxi" 
                :item-id="taxi.id" 
                :item-name="taxi.owner_name"
                :item-image="taxi.image_url || undefined"
              />
            </div>
          </div>

          <div class="card-mid">
            <div class="contact-info">
              <span class="material-icons ph-icon">phone</span>
              <span class="phone-num"> {{ taxi.phone_number }} </span>
            </div>
          </div>

          <div class="card-bottom">
            <button class="call-btn-main" @click="handleCall(taxi)">
              <span class="material-icons">phone_in_talk</span>
              {{ t('taxi.callNow') }}
            </button>
          </div>
        </div>

        <div v-if="filteredTaxis.length === 0" class="empty-state">
          <span class="material-icons">no_accounts</span>
          <p>{{ t('taxi.noTaxisAvailable') }}</p>
        </div>
      </div>
    </template>

    <!-- TAB 2: INTERCITY SHUTTLES -->
    <template v-else>
      <div class="filters-container">
        <div class="filter-card">
          <div class="selectors-side">
            <div class="select-group">
              <span class="material-icons">route</span>
              <select v-model="shuttleRouteFilter">
                <option value="all">{{ t('shuttle.allRoutes') }}</option>
                <option v-for="route in shuttleRoutes" :key="route" :value="route">{{ route }}</option>
              </select>
            </div>
            <div class="select-group">
              <span class="material-icons">sync_alt</span>
              <select v-model="shuttleTypeFilter">
                <option value="all">{{ t('shuttle.tripType') }}</option>
                <option value="one_way">{{ t('shuttle.oneWay') }}</option>
                <option value="round_trip">{{ t('shuttle.roundTrip') }}</option>
                <option value="both">{{ t('shuttle.both') }}</option>
              </select>
            </div>
          </div>
        </div>
      </div>

      <div v-if="shuttleStore.isLoading" class="state-container">
        <span class="material-icons spin">refresh</span>
        <p>{{ t('taxi.loadingTaxis') }}</p>
      </div>

      <div v-else-if="shuttleStore.error" class="state-container">
        <span class="material-icons">error_outline</span>
        <p>{{ shuttleStore.error }}</p>
      </div>

      <div v-else class="shuttles-grid">
        <div 
          v-for="shuttle in filteredShuttles" 
          :key="shuttle.id" 
          class="shuttle-card"
          :class="{ expanded: expandedShuttleId === shuttle.id }"
          :style="{ backgroundImage: `url(${shuttle.image_url || 'https://images.unsplash.com/photo-1449034446853-66c86144b0ad?auto=format&fit=crop&q=80&w=2070'})` }"
          @click="() => { 
            expandedShuttleId = expandedShuttleId === shuttle.id ? null : shuttle.id;
            if (expandedShuttleId === shuttle.id) {
              analyticsService.logEvent({ event_name: 'shuttle_view', item_id: shuttle.id });
            }
          }"
        >
          <div class="shuttle-main-info">
            <div class="shuttle-header-mini">
              <div class="company-badge" v-if="shuttle.company_name">
                <span class="material-icons">business</span>
                {{ shuttle.company_name }}
              </div>
              <div class="price-pill">
                <span class="currency">$</span>
                <span class="amount">{{ shuttle.price_per_person }}</span>
              </div>
            </div>

            <div class="shuttle-route-compact" v-if="shuttle.origin && shuttle.destination">
              <span class="route-text">{{ shuttle.origin }}</span>
              <span class="material-icons">east</span>
              <span class="route-text">{{ shuttle.destination }}</span>
            </div>

            <div class="shuttle-tags">
              <div class="vehicle-tag-mini">
                <span class="material-icons">directions_bus</span>
                {{ shuttle.vehicle_type }}
              </div>
              <div class="expand-indicator">
                <span class="material-icons">{{ expandedShuttleId === shuttle.id ? 'expand_less' : 'expand_more' }}</span>
              </div>
            </div>
          </div>

          <!-- EXPANDABLE CONTENT -->
          <div class="shuttle-details" v-if="expandedShuttleId === shuttle.id">
            <div class="shuttle-body">
              <div class="info-row">
                <span class="material-icons">schedule</span>
                <div>
                  <p class="label">{{ t('shuttle.duration') }}</p>
                  <p class="value">{{ shuttle.estimated_duration }}</p>
                </div>
              </div>
              <div class="info-row">
                <span class="material-icons">event</span>
                <div>
                  <p class="label">{{ t('shuttle.departure') }}</p>
                  <p class="value">{{ shuttle.departure_times }}</p>
                </div>
              </div>
            </div>

            <div class="shuttle-footer">
              <div class="price-box">
                <div class="price-main">
                  <span class="currency">$</span>
                  <span class="amount">{{ shuttle.price_per_person }}</span>
                  <span class="suffix">{{ t('shuttle.perPerson') }}</span>
                </div>
                <div class="lang-badge" v-if="shuttle.english_speaking">
                  <span class="material-icons">g_translate</span>
                  BILINGUAL
                </div>
              </div>
              <div class="contact-hub">
                <a 
                  v-if="shuttle.phone_number"
                  :href="'tel:' + shuttle.phone_number" 
                  class="mini-btn phone" 
                  @click.stop="handleCallShuttle(shuttle)"
                >
                  <span class="material-icons">phone</span>
                </a>
                <button class="mini-btn wa" @click.stop="handleReserve(shuttle)">
                  <span class="material-icons">chat</span>
                </button>
              </div>
            </div>
          </div>
        </div>
      </div>

      <div v-if="filteredShuttles.length === 0" class="empty-state">
        <span class="material-icons">directions_bus_filled</span>
        <p>{{ t('shuttle.noShuttles') }}</p>
      </div>
    </template>
  </div>
</template>

<style scoped>
/* Transport Hub Tabs */
.hub-tabs {
  margin-top: 24px;
  display: flex;
  justify-content: center;
}

.tabs-background {
  background: var(--bg-secondary);
  padding: 4px;
  border-radius: 16px;
  display: flex;
  position: relative;
  border: 1px solid var(--border-color);
  width: 100%;
  max-width: 400px;
}

.hub-tab {
  flex: 1;
  padding: 12px;
  border: none;
  background: transparent;
  color: var(--text-secondary);
  font-weight: 700;
  font-size: 0.9rem;
  cursor: pointer;
  z-index: 2;
  transition: color 0.3s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.hub-tab.active {
  color: #101820 !important;
}

.hub-tab .material-icons {
  font-size: 18px;
}

.tab-slider {
  position: absolute;
  top: 4px;
  bottom: 4px;
  width: calc(50% - 6px);
  background: #FEE715;
  border-radius: 12px;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 1;
  box-shadow: 0 4px 15px rgba(254, 231, 21, 0.4);
}

/* Shuttles Grid & Compact Cards */
.shuttles-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 16px;
  padding: 20px 16px;
}

.shuttle-card.expanded {
  border-color: var(--active-color);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
}

.shuttle-main-info {
  padding: 0; /* Ya manejado por el contenedor superior */
}

.shuttle-header-mini {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.company-badge {
  display: flex;
  align-items: center;
  gap: 6px;
  background: rgba(254, 231, 21, 0.1);
  color: var(--active-color);
  padding: 4px 10px;
  border-radius: 8px;
  font-size: 0.75rem;
  font-weight: 800;
  border: 1px solid rgba(254, 231, 21, 0.2);
}

.price-pill {
  background: var(--active-color);
  color: #101820;
  padding: 4px 10px;
  border-radius: 8px;
  font-weight: 900;
  font-size: 0.9rem;
  display: flex;
  align-items: baseline;
  gap: 2px;
}

.shuttle-route-compact {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 1rem;
  font-weight: 800;
  color: var(--text-primary);
  margin-bottom: 12px;
}

.shuttle-route-compact .material-icons {
  color: var(--active-color);
  font-size: 18px;
}

.shuttle-tags {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.vehicle-tag-mini {
  padding: 4px 10px;
  background: var(--bg-secondary);
  border-radius: 8px;
  font-size: 0.7rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--text-secondary);
  border: 1px solid var(--border-color);
}

.expand-indicator {
  color: var(--active-color);
  display: flex;
  align-items: center;
}

/* Expanded content */
.shuttle-details {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px dashed var(--border-color);
  animation: slideDown 0.3s ease-out;
}

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

.shuttle-body {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 20px;
}

.info-row {
  display: flex;
  align-items: center;
  gap: 12px;
}

.info-row .material-icons {
  color: var(--active-color);
  font-size: 20px;
}

.info-row .label {
  font-size: 0.7rem;
  color: var(--text-secondary);
  margin: 0;
  text-transform: uppercase;
  font-weight: 700;
}

.info-row .value {
  font-size: 0.9rem;
  color: var(--text-primary);
  margin: 2px 0 0;
  font-weight: 600;
}

.shuttle-footer {
  display: flex;
  justify-content: space-between;
  align-items: flex-end; /* Alineados a la base */
  margin-top: auto;
  padding-top: 15px;
  width: 100%;
}

.price-box {
  display: flex;
  flex-direction: column;
}

.price-main {
  color: var(--active-color);
  display: flex;
  align-items: baseline;
  gap: 2px;
}

.price-main .currency {
  font-size: 0.9rem;
  font-weight: 900;
}

.price-main .amount {
  font-size: 1.5rem;
  font-weight: 900;
}

.price-main .suffix {
  font-size: 0.7rem;
  color: var(--text-secondary);
  margin-left: 4px;
}

.price-sub {
  font-size: 0.7rem;
  color: var(--text-secondary);
  font-weight: 600;
}

.contact-hub {
  display: flex;
  gap: 10px;
  margin-left: auto; /* Empuja al máximo a la derecha */
}

.mini-btn {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  cursor: pointer;
  transition: all 0.3s;
  text-decoration: none;
}

.mini-btn.phone { background: rgba(255,255,255,0.1); color: white; border: 1px solid rgba(255,255,255,0.2); }
.mini-btn.wa { background: #25d366; color: white; box-shadow: 0 4px 12px rgba(37, 211, 102, 0.2); }

.mini-btn:hover { transform: translateY(-3px); }

.lang-badge {
  display: flex;
  align-items: center;
  gap: 4px;
  background: rgba(254, 231, 21, 0.2);
  color: var(--active-color);
  padding: 2px 8px;
  border-radius: 6px;
  font-size: 0.6rem;
  font-weight: 800;
  margin-top: 4px;
  width: fit-content;
}

.lang-badge .material-icons { font-size: 10px; }

/* Original Styles */
.taxi-view {
  min-height: 100vh;
  position: relative;
  padding: 0 0 150px; /* Aumentado para evitar solapamiento con BottomNav */
}

.taxi-view {
  min-height: 100vh;
  position: relative;
  padding: 0 0 150px;
}

/* Tarjetas claras y elegantes */
.filter-card,
.taxi-card-new {
  background: var(--card-bg);
  border: 1px solid var(--border-color);
}

/* SHUTTLE CARD PREMIUM CON FONDO */
.shuttle-card {
  border-radius: 20px;
  overflow: hidden;
  border: 1px solid var(--border-color);
  background-size: cover;
  background-position: center;
  position: relative;
  min-height: 160px;
  display: flex;
  flex-direction: column;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  cursor: pointer;
}

.shuttle-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,0.95) 0%, rgba(0,0,0,0.3) 100%);
  z-index: 0;
}

.shuttle-main-info, .shuttle-details {
  position: relative;
  z-index: 1;
  padding: 20px;
}

.header-main {
    padding: 24px 16px;
    text-align: center;
}

.brand-title {
    color: var(--header-text);
    font-size: 1.5rem;
    font-weight: 800;
    margin: 0;
}

.filters-container {
    padding: 0 16px 24px;
}

.filter-card {
    background: var(--card-bg);
    border-radius: 20px;
    padding: 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border: 1px solid var(--border-color);
    box-shadow: 0 2px 8px var(--shadow);
}

.selectors-side {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.select-group {
    background: var(--bg-secondary);
    border: 1.5px solid #fee715;
    border-radius: 12px;
    padding: 8px 12px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.select-group .material-icons {
    color: #fee715;
    font-size: 20px;
}

.select-group select {
    background: transparent;
    border: none;
    color: var(--text-primary);
    width: 100%;
    font-size: 0.9rem;
    outline: none;
}

.select-group select option {
    background: var(--card-bg);
    color: var(--text-primary);
}

.lang-toggle-side {
    padding-left: 20px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.lang-text {
    color: var(--text-primary);
    font-weight: 700;
    font-size: 0.9rem;
}

/* Custom Checkbox */
.checkbox-container {
    display: block;
    position: relative;
    width: 28px;
    height: 28px;
    cursor: pointer;
}

.checkbox-container input {
    visibility: hidden;
    width: 0;
    height: 0;
}

.checkmark {
    position: absolute;
    top: 0;
    left: 0;
    height: 28px;
    width: 28px;
    background-color: transparent;
    border: 2px solid #fee715;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.checkbox-container input:checked ~ .checkmark {
    background-color: #fee715;
}

.checkmark:after {
    content: "";
    position: absolute;
    display: none;
}

.checkbox-container input:checked ~ .checkmark:after {
    display: block;
}

.checkbox-container .checkmark:after {
    left: 9px;
    top: 5px;
    width: 6px;
    height: 12px;
    border: solid #101820;
    border-width: 0 3px 3px 0;
    transform: rotate(45deg);
}

/* Grid & Cards */
.taxis-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 24px;
    padding: 24px 0;
}

.taxi-card-new {
    background: var(--card-bg);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border-radius: 20px;
    padding: 16px;
    border: 1px solid var(--border-color);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.taxi-card-new:hover {
    transform: translateY(-8px);
    border-color: var(--active-color);
    box-shadow: 0 20px 40px rgba(0,0,0,0.4);
}

.card-top {
    display: flex;
    align-items: center;
    gap: 16px;
    position: relative;
}

.driver-avatar {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    overflow: hidden;
    background: var(--bg-secondary);
    border: 2px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: center;
}

.driver-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.driver-info h3 {
    margin: 0 0 2px;
    color: var(--text-primary);
    font-size: 1rem;
    font-weight: 800;
    letter-spacing: -0.01em;
}

.rating-stars {
    display: flex;
    gap: 4px;
}

.rating-stars .material-icons {
    color: var(--active-color);
    font-size: 18px;
    filter: drop-shadow(0 0 5px rgba(254, 231, 21, 0.5));
}

.fav-icon-wrapper {
    position: absolute;
    top: -4px;
    right: -4px;
}

.card-mid {
    padding: 12px 16px;
    background: var(--bg-secondary);
    border-radius: 16px;
    border: 1px solid var(--border-color);
}

.contact-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.ph-icon {
    color: var(--active-color);
    font-size: 20px;
}

.phone-num {
    color: var(--text-primary);
    font-size: 1rem;
    font-weight: 700;
}

.call-btn-main {
    width: 100%;
    padding: 18px;
    background: linear-gradient(135deg, #fee715 0%, #facc15 100%);
    color: #101820;
    border: none;
    border-radius: 16px;
    font-size: 1rem;
    font-weight: 900;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 10px 20px rgba(254, 231, 21, 0.15);
}

.call-btn-main:hover {
    transform: translateY(-4px);
    box-shadow: 0 15px 30px rgba(254, 231, 21, 0.25);
}

.state-container, .empty-state {
    padding: 100px 24px;
    text-align: center;
    background: var(--header-bg);
    border-radius: 32px;
    border: 2px dashed var(--border-color);
}

.state-container .material-icons, .empty-state .material-icons {
    font-size: 64px;
    margin-bottom: 24px;
    color: var(--active-color);
    opacity: 0.5;
}

.spin {
    animation: spin 1s linear infinite;
}

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

@media (max-width: 600px) {
    .taxis-grid, .shuttles-grid {
        grid-template-columns: 1fr;
    }
}
</style>
