/* CSS Variables - Color Scheme */
:root {
  --background: hsl(0, 0%, 98%);
  --foreground: hsl(0, 0%, 5%);
  --card: hsl(0, 0%, 100%);
  --card-foreground: hsl(0, 0%, 5%);
  --primary: hsl(45, 100%, 50%);
  --primary-foreground: hsl(0, 0%, 5%);
  --secondary: hsl(0, 0%, 15%);
  --secondary-foreground: hsl(45, 100%, 50%);
  --muted: hsl(0, 0%, 96%);
  --muted-foreground: hsl(0, 0%, 40%);
  --destructive: hsl(0, 84.2%, 60.2%);
  --destructive-foreground: hsl(0, 0%, 98%);
  --border: hsl(0, 0%, 90%);
  --input: hsl(0, 0%, 90%);
  --radius: 0.5rem;
}

.dark {
  --background: hsl(0, 0%, 5%);
  --foreground: hsl(45, 100%, 50%);
  --card: hsl(0, 0%, 10%);
  --card-foreground: hsl(45, 100%, 50%);
  --primary: hsl(45, 100%, 50%);
  --primary-foreground: hsl(0, 0%, 5%);
  --secondary: hsl(0, 0%, 15%);
  --secondary-foreground: hsl(45, 100%, 50%);
  --muted: hsl(0, 0%, 15%);
  --muted-foreground: hsl(0, 0%, 70%);
  --destructive: hsl(0, 62.8%, 30.6%);
  --destructive-foreground: hsl(45, 100%, 50%);
  --border: hsl(0, 0%, 20%);
  --input: hsl(0, 0%, 20%);
}

/* Reset and Base Styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Inter', sans-serif;
  line-height: 1.5;
  color: var(--foreground);
  background-color: var(--background);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Utility Classes */
.min-h-screen { min-height: 100vh; }
.max-w-7xl { max-width: 80rem; margin: 0 auto; }
.mx-auto { margin-left: auto; margin-right: auto; }
.py-4 { padding-top: 1rem; padding-bottom: 1rem; }
.py-6 { padding-top: 1.5rem; padding-bottom: 1.5rem; }
.py-8 { padding-top: 2rem; padding-bottom: 2rem; }
.py-12 { padding-top: 3rem; padding-bottom: 3rem; }
.py-16 { padding-top: 4rem; padding-bottom: 4rem; }
.px-3 { padding-left: 0.75rem; padding-right: 0.75rem; }
.px-4 { padding-left: 1rem; padding-right: 1rem; }
.px-6 { padding-left: 1.5rem; padding-right: 1.5rem; }
.p-4 { padding: 1rem; }
.p-6 { padding: 1.5rem; }
.mb-2 { margin-bottom: 0.5rem; }
.mb-3 { margin-bottom: 0.75rem; }
.mb-6 { margin-bottom: 1.5rem; }
.mb-8 { margin-bottom: 2rem; }
.mb-12 { margin-bottom: 3rem; }
.mr-1 { margin-right: 0.25rem; }
.mr-2 { margin-right: 0.5rem; }
.mt-2 { margin-top: 0.5rem; }
.mt-8 { margin-top: 2rem; }
.pt-8 { padding-top: 2rem; }

.w-full { width: 100%; }
.w-4 { width: 1rem; }
.w-8 { width: 2rem; }
.h-4 { height: 1rem; }
.h-8 { height: 2rem; }

.flex { display: flex; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.space-x-2 > * + * { margin-left: 0.5rem; }
.space-x-3 > * + * { margin-left: 0.75rem; }
.space-x-6 > * + * { margin-left: 1.5rem; }
.space-y-2 > * + * { margin-top: 0.5rem; }
.space-y-4 > * + * { margin-top: 1rem; }
.space-y-6 > * + * { margin-top: 1.5rem; }
.gap-1 { gap: 0.25rem; }
.gap-4 { gap: 1rem; }
.gap-6 { gap: 1.5rem; }

.grid { display: grid; }
.grid-cols-1 { grid-template-columns: repeat(1, minmax(0, 1fr)); }
.grid-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }

.text-sm { font-size: 0.875rem; }
.text-lg { font-size: 1.125rem; }
.text-xl { font-size: 1.25rem; }
.text-2xl { font-size: 1.5rem; }
.text-3xl { font-size: 1.875rem; }
.text-4xl { font-size: 2.25rem; }
.text-5xl { font-size: 3rem; }

.font-medium { font-weight: 500; }
.font-semibold { font-weight: 600; }
.font-bold { font-weight: 700; }

.text-center { text-align: center; }
.text-left { text-align: left; }

.rounded-md { border-radius: 0.375rem; }
.rounded-lg { border-radius: 0.5rem; }

.border { border: 1px solid var(--border); }
.border-2 { border: 2px solid; }
.border-b { border-bottom: 1px solid var(--border); }
.border-t { border-top: 1px solid; }

.block { display: block; }
.inline { display: inline; }
.inline-flex { display: inline-flex; }
.hidden { display: none; }
.overflow-hidden { overflow: hidden; }
.overflow-x-auto { overflow-x: auto; }

.transition-colors { transition: color 0.15s ease-in-out, background-color 0.15s ease-in-out, border-color 0.15s ease-in-out; }

/* Color Classes */
.bg-background { background-color: var(--background); }
.bg-card { background-color: var(--card); }
.bg-primary { background-color: var(--primary); }
.bg-muted { background-color: var(--muted); }
.bg-muted\/50 { background-color: color-mix(in srgb, var(--muted) 50%, transparent); }
.bg-muted\/30 { background-color: color-mix(in srgb, var(--muted) 30%, transparent); }
.bg-primary\/5 { background-color: color-mix(in srgb, var(--primary) 5%, transparent); }
.bg-primary\/10 { background-color: color-mix(in srgb, var(--primary) 10%, transparent); }
.bg-destructive\/10 { background-color: color-mix(in srgb, var(--destructive) 10%, transparent); }
.bg-secondary\/10 { background-color: color-mix(in srgb, var(--secondary) 10%, transparent); }
.bg-transparent { background-color: transparent; }

.text-white { color: white; }
.text-foreground { color: var(--foreground); }
.text-card-foreground { color: var(--card-foreground); }
.text-primary { color: var(--primary); }
.text-primary-foreground { color: var(--primary-foreground); }
.text-secondary { color: var(--secondary); }
.text-muted-foreground { color: var(--muted-foreground); }
.text-destructive { color: var(--destructive); }
.text-xs { font-size: 0.75rem; line-height: 1rem; }

.border-primary { border-color: var(--primary); }
.border-input { border-color: var(--input); }
.border-destructive { border-color: var(--destructive); }
.border-muted { border-color: var(--muted); }
.border-muted-foreground\/20 { border-color: color-mix(in srgb, var(--muted-foreground) 20%, transparent); }

/* Form Elements */
input, select, textarea {
  font-family: inherit;
  font-size: 0.875rem;
  line-height: 1.25rem;
  outline: none;
  transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}

input:focus, select:focus, textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary) 10%, transparent);
}

button {
  font-family: inherit;
  cursor: pointer;
  outline: none;
  border: none;
  transition: all 0.15s ease-in-out;
}

button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* Tables */
table {
  width: 100%;
  border-collapse: collapse;
}

th, td {
  text-align: left;
  padding: 1rem;
}

tr:nth-child(even) {
  background-color: color-mix(in srgb, var(--muted) 30%, transparent);
}

/* Taxi Company Theme Styles */
.taxi-header {
  background: linear-gradient(135deg, hsl(0, 0%, 5%) 0%, hsl(0, 0%, 15%) 100%);
  border-bottom: 3px solid hsl(45, 100%, 50%);
}

.taxi-hero {
  background: 
    linear-gradient(135deg, rgba(255, 204, 0, 0.80) 0%, rgba(255, 204, 0, 0.70) 100%),
    url('https://images.unsplash.com/photo-1449824913935-59a10b8d2000?ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D&auto=format&fit=crop&w=2070&q=80') center/cover;
  color: hsl(0, 0%, 5%);
  position: relative;
  background-attachment: fixed;
}

.taxi-hero h2,
.taxi-hero p {
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.1);
}

.taxi-footer {
  background: linear-gradient(135deg, hsl(0, 0%, 5%) 0%, hsl(0, 0%, 15%) 100%);
  color: hsl(45, 100%, 50%);
  border-top: 3px solid hsl(45, 100%, 50%);
}

.taxi-card {
  border: 2px solid hsl(45, 100%, 50%);
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.taxi-button {
  background: linear-gradient(135deg, hsl(45, 100%, 50%) 0%, hsl(45, 80%, 45%) 100%);
  color: hsl(0, 0%, 5%);
  border: 2px solid hsl(0, 0%, 5%);
  font-weight: 600;
  transition: all 0.3s ease;
}

.taxi-button:hover {
  background: linear-gradient(135deg, hsl(45, 80%, 45%) 0%, hsl(45, 100%, 50%) 100%);
  transform: translateY(-2px);
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.2);
}

.vehicle-card {
  border: 2px solid hsl(45, 100%, 50%);
  transition: all 0.3s ease;
  background-color: var(--card);
  color: var(--card-foreground);
  padding: 1.5rem;
  border-radius: 0.5rem;
}

.vehicle-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.15);
  border-color: hsl(45, 80%, 45%);
}

.pricing-table {
  border: 2px solid hsl(45, 100%, 50%);
}

.pricing-table th {
  background: linear-gradient(135deg, hsl(0, 0%, 5%) 0%, hsl(0, 0%, 15%) 100%);
  color: hsl(45, 100%, 50%);
  font-weight: 600;
}

.pricing-table tr:nth-child(even) {
  background: hsl(45, 100%, 98%);
}

.pricing-table tr:hover {
  background: color-mix(in srgb, var(--primary) 5%, transparent);
}

.taxi-background {
  background-image: 
    linear-gradient(rgba(224, 153, 0, 1), rgba(224, 153, 0, 1)),
    url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1200 600"><rect fill="%23f5f5f5" width="1200" height="600"/><g fill="%23ffcc00" opacity="0.1"><circle cx="200" cy="150" r="80"/><circle cx="600" cy="300" r="120"/><circle cx="1000" cy="200" r="100"/><rect x="100" y="400" width="200" height="80" rx="40"/><rect x="500" y="450" width="250" height="80" rx="40"/><rect x="850" y="380" width="180" height="80" rx="40"/></g></svg>');
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
}

.taxi-logo {
  font-family: 'Inter', sans-serif;
  font-weight: 800;
  letter-spacing: -0.5px;
}

/* Badge Styles */
.badge {
  display: inline-flex;
  align-items: center;
  border-radius: 0.375rem;
  border: 1px solid transparent;
  padding: 0.125rem 0.625rem;
  font-size: 0.75rem;
  font-weight: 600;
  transition: color 0.15s ease-in-out, background-color 0.15s ease-in-out, border-color 0.15s ease-in-out;
}

.badge-secondary {
  background-color: var(--secondary);
  color: var(--secondary-foreground);
}

/* Loading Animation */
@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

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

/* Flex Utilities */
.flex-1 { flex: 1 1 0%; }
.flex-col { flex-direction: column; }
.flex-wrap { flex-wrap: wrap; }

/* Responsive Design */
@media (min-width: 768px) {
  .md\:grid-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .md\:grid-cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .md\:flex { display: flex; }
  .md\:w-auto { width: auto; }
}

@media (min-width: 640px) {
  .sm\:flex-row { flex-direction: row; }
}

/* Hover Effects */
.hover\:bg-primary:hover { background-color: var(--primary); }
.hover\:text-primary-foreground:hover { color: var(--primary-foreground); }
.hover\:bg-primary\/10:hover { background-color: color-mix(in srgb, var(--primary) 10%, transparent); }

/* Capitalize */
.capitalize {
  text-transform: capitalize;
}

/* Additional utility classes */
.relative { position: relative; }
.absolute { position: absolute; }
.inset-0 { top: 0; right: 0; bottom: 0; left: 0; }

/* Map Marker Styles */
.custom-marker {
  background: transparent;
  border: none;
}

.marker-icon {
  width: 32px;
  height: 32px;
  border-radius: 50% 50% 50% 0;
  transform: rotate(-45deg);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.marker-icon svg {
  transform: rotate(45deg);
  width: 20px;
  height: 20px;
}

.marker-icon.pickup {
  background: linear-gradient(135deg, #22c55e 0%, #16a34a 100%);
  color: white;
}

.marker-icon.dropoff {
  background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
  color: white;
}

/* Map Container Styles */
#route-map {
  min-height: 320px;
  background-color: var(--muted);
}

.leaflet-popup-content-wrapper {
  background-color: var(--card);
  color: var(--card-foreground);
  border: 1px solid var(--border);
}

.leaflet-popup-tip {
  background-color: var(--card);
  border-color: var(--border);
}

/* Star rating */
.fill-yellow-400 { fill: #facc15; }
.text-yellow-400 { color: #facc15; }

/* Last child utilities */
.last\:border-b-0:last-child { border-bottom: 0; }

/* Mobile responsiveness */
@media (max-width: 767px) {
  .hidden { display: none; }
  .text-5xl { font-size: 2.5rem; }
  .text-4xl { font-size: 2rem; }
  .text-3xl { font-size: 1.5rem; }
}

/* Form success/error states */
.form-success {
  background-color: color-mix(in srgb, hsl(142, 76%, 36%) 10%, transparent);
  border: 1px solid hsl(142, 76%, 36%);
  color: hsl(142, 76%, 36%);
  padding: 0.75rem 1rem;
  border-radius: 0.375rem;
  margin-top: 1rem;
}

.form-error {
  background-color: color-mix(in srgb, var(--destructive) 10%, transparent);
  border: 1px solid var(--destructive);
  color: var(--destructive);
  padding: 0.75rem 1rem;
  border-radius: 0.375rem;
  margin-top: 1rem;
}

/* Location Buttons */
.location-btn {
  white-space: nowrap;
  flex-shrink: 0;
}

.location-btn svg {
  width: 20px;
  height: 20px;
  min-width: 20px;
  min-height: 20px;
  flex-shrink: 0;
}

.location-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.location-btn.loading {
  min-width: fit-content;
}

.location-btn.loading svg {
  animation: spin 1s linear infinite;
}

.location-btn .loading-text {
  font-size: 0.875rem;
  font-weight: 500;
}

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

/* Map Picker Modal */
.map-picker-modal {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.map-picker-modal.hidden {
  display: none;
}

.map-picker-overlay {
  position: absolute;
  inset: 0;
  background-color: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
}

.map-picker-container {
  position: relative;
  width: 100%;
  max-width: 800px;
  max-height: 90vh;
  background-color: var(--card);
  border-radius: 0.75rem;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 2px solid var(--primary);
}

.map-picker-header {
  padding: 1rem 1.5rem;
  border-bottom: 1px solid var(--border);
  position: relative;
}

.map-picker-close {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  padding: 0.5rem;
  border-radius: 0.375rem;
  color: var(--muted-foreground);
  background: transparent;
  border: none;
  cursor: pointer;
  transition: all 0.2s;
}

.map-picker-close:hover {
  background-color: var(--muted);
  color: var(--foreground);
}

.map-picker-map {
  height: 400px;
  min-height: 300px;
  background-color: var(--muted);
  cursor: crosshair !important;
}

.map-picker-footer {
  padding: 1rem 1.5rem;
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.selected-location {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex: 1;
  min-width: 0;
  background-color: color-mix(in srgb, var(--primary) 10%, transparent);
  padding: 0.5rem 0.75rem;
  border-radius: 0.375rem;
  border: 1px solid var(--primary);
}

.selected-location.hidden {
  display: none;
}

/* Map picker marker styles */
.map-picker-marker {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.map-picker-marker-icon {
  width: 32px;
  height: 32px;
  background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
  border-radius: 50% 50% 50% 0;
  transform: rotate(-45deg);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.2);
  animation: bounceIn 0.3s ease-out;
}

.map-picker-marker-icon svg {
  transform: rotate(45deg);
  width: 18px;
  height: 18px;
  color: white;
}

@keyframes bounceIn {
  0% {
    transform: rotate(-45deg) scale(0);
  }
  50% {
    transform: rotate(-45deg) scale(1.2);
  }
  100% {
    transform: rotate(-45deg) scale(1);
  }
}

/* Mobile responsiveness for map picker */
@media (max-width: 640px) {
  .map-picker-container {
    max-height: 95vh;
  }
  
  .map-picker-map {
    height: 300px;
  }
  
  .map-picker-footer {
    flex-direction: column;
    align-items: stretch;
  }
  
  .selected-location {
    width: 100%;
  }
  
  .map-picker-footer .flex {
    justify-content: stretch;
  }
  
  .map-picker-footer .flex button {
    flex: 1;
  }
}
