/* Captain Taxis - Passenger PWA Styles */
/* Light Theme with Orange #FF6B00 Primary */

:root {
  --primary: #FF6B00;
  --primary-dark: #E55F00;
  --primary-light: #FF8A3D;
  --secondary: #2563EB;
  --success: #10B981;
  --danger: #EF4444;
  --warning: #F59E0B;
  --dark: #1F2937;
  --gray: #6B7280;
  --gray-light: #9CA3AF;
  --gray-lighter: #E5E7EB;
  --light: #F3F4F6;
  --white: #FFFFFF;
  --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
  --radius: 12px;
  --radius-sm: 8px;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  font-size: 16px;
  -webkit-tap-highlight-color: transparent;
}

body {
  font-family: 'Roboto', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background-color: var(--light);
  color: var(--dark);
  line-height: 1.5;
  min-height: 100vh;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
  font-weight: 600;
  line-height: 1.3;
}

h1 { font-size: 1.75rem; }
h2 { font-size: 1.5rem; }
h3 { font-size: 1.25rem; }

/* Container */
.container {
  max-width: 480px;
  margin: 0 auto;
  padding: 16px;
  min-height: 100vh;
}

/* Header */
.header {
  background: var(--white);
  padding: 16px;
  box-shadow: var(--shadow);
  position: sticky;
  top: 0;
  z-index: 100;
}

.header-content {
  max-width: 480px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--primary);
}

.logo span {
  color: var(--dark);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 14px 24px;
  border: none;
  border-radius: var(--radius);
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  text-decoration: none;
  min-height: 48px;
  gap: 8px;
}

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

.btn-primary {
  background: var(--primary);
  color: var(--white);
}

.btn-primary:hover:not(:disabled) {
  background: var(--primary-dark);
  transform: translateY(-1px);
}

.btn-secondary {
  background: var(--secondary);
  color: var(--white);
}

.btn-outline {
  background: transparent;
  border: 2px solid var(--primary);
  color: var(--primary);
}

.btn-outline:hover:not(:disabled) {
  background: var(--primary);
  color: var(--white);
}

.btn-block {
  width: 100%;
}

.btn-lg {
  padding: 16px 32px;
  font-size: 1.125rem;
}

/* Cards */
.card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 16px;
  box-shadow: var(--shadow);
  margin-bottom: 16px;
}

.card-title {
  font-size: 1.125rem;
  font-weight: 600;
  margin-bottom: 12px;
  color: var(--dark);
}

/* Forms */
.form-group {
  margin-bottom: 16px;
}

.form-label {
  display: block;
  margin-bottom: 6px;
  font-weight: 500;
  color: var(--dark);
  font-size: 0.875rem;
}

.form-input,
.form-select,
.form-textarea {
  width: 100%;
  padding: 12px 16px;
  border: 2px solid var(--gray-lighter);
  border-radius: var(--radius-sm);
  font-size: 1rem;
  transition: border-color 0.2s ease;
  background: var(--white);
  min-height: 48px;
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
  outline: none;
  border-color: var(--primary);
}

.form-textarea {
  min-height: 120px;
  resize: vertical;
}

/* Input with icon */
.input-group {
  position: relative;
}

.input-icon {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--gray);
  font-size: 1.25rem;
}

.input-group .form-input {
  padding-left: 44px;
}

/* Vehicle Cards */
.vehicle-grid {
  display: grid;
  gap: 12px;
}

.vehicle-card {
  background: var(--white);
  border: 2px solid var(--gray-lighter);
  border-radius: var(--radius);
  padding: 16px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.vehicle-card:hover {
  border-color: var(--primary-light);
}

.vehicle-card.selected {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(255, 107, 0, 0.2);
}

.vehicle-card-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}

.vehicle-image {
  width: 64px;
  height: 64px;
  border-radius: var(--radius-sm);
  object-fit: cover;
  background: var(--light);
}

.vehicle-info h4 {
  font-size: 1.125rem;
  margin-bottom: 4px;
}

.vehicle-capacity {
  font-size: 0.875rem;
  color: var(--gray);
}

.vehicle-price {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--primary);
}

.vehicle-price small {
  font-size: 0.875rem;
  color: var(--gray);
  font-weight: 400;
}

/* Counter */
.counter {
  display: flex;
  align-items: center;
  gap: 12px;
}

.counter-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 2px solid var(--gray-lighter);
  background: var(--white);
  font-size: 1.25rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.counter-btn:hover {
  border-color: var(--primary);
  color: var(--primary);
}

.counter-value {
  font-size: 1.125rem;
  font-weight: 600;
  min-width: 30px;
  text-align: center;
}

/* Toggle Buttons */
.toggle-group {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.toggle-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  border: 2px solid var(--gray-lighter);
  border-radius: var(--radius-sm);
  background: var(--white);
  cursor: pointer;
  transition: all 0.2s ease;
  font-size: 0.875rem;
}

.toggle-btn:hover {
  border-color: var(--primary-light);
}

.toggle-btn.active {
  border-color: var(--primary);
  background: rgba(255, 107, 0, 0.1);
  color: var(--primary);
}

.toggle-btn .icon {
  font-size: 1.25rem;
}

/* Booking Summary */
.summary-card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 16px;
  box-shadow: var(--shadow);
  position: sticky;
  top: 70px;
  z-index: 90;
}

.summary-route {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}

.route-line {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.route-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--primary);
}

.route-dot.dropoff {
  background: var(--danger);
}

.route-line-v {
  width: 2px;
  height: 30px;
  background: var(--gray-lighter);
}

.route-addresses {
  flex: 1;
}

.route-address {
  padding: 8px 0;
  font-size: 0.875rem;
}

.summary-total {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 12px;
  border-top: 1px solid var(--gray-lighter);
}

.summary-total .price {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--primary);
}

/* Map */
.map-container {
  width: 100%;
  height: 300px;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--gray-lighter);
}

#map {
  width: 100%;
  height: 100%;
}

/* Tracking Screen */
.tracking-map {
  height: 50vh;
  position: relative;
}

.tracking-info {
  background: var(--white);
  border-radius: var(--radius) var(--radius) 0 0;
  padding: 20px;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  box-shadow: 0 -4px 20px rgba(0,0,0,0.1);
}

.driver-card {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 16px;
}

.driver-avatar {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: var(--light);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
}

.driver-details h3 {
  margin-bottom: 4px;
}

.driver-details p {
  color: var(--gray);
  font-size: 0.875rem;
}

.eta-display {
  text-align: center;
  padding: 16px;
  background: var(--light);
  border-radius: var(--radius);
  margin-bottom: 16px;
}

.eta-display .time {
  font-size: 2rem;
  font-weight: 700;
  color: var(--primary);
}

.eta-display .label {
  color: var(--gray);
  font-size: 0.875rem;
}

/* Ride History */
.ride-card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 16px;
  margin-bottom: 12px;
  box-shadow: var(--shadow);
}

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

.ride-date {
  font-size: 0.875rem;
  color: var(--gray);
}

.ride-status {
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
}

.ride-status.completed {
  background: rgba(16, 185, 129, 0.1);
  color: var(--success);
}

.ride-status.cancelled {
  background: rgba(239, 68, 68, 0.1);
  color: var(--danger);
}

.ride-route {
  margin-bottom: 12px;
}

.ride-route-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px 0;
  font-size: 0.875rem;
}

.ride-fare {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--primary);
}

.ride-actions {
  display: flex;
  gap: 8px;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--gray-lighter);
}

.ride-actions .btn {
  flex: 1;
  padding: 10px;
  font-size: 0.875rem;
}

/* Install Banner */
.install-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--white);
  padding: 16px;
  box-shadow: 0 -4px 20px rgba(0,0,0,0.15);
  display: none;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  z-index: 1000;
}

.install-banner.show {
  display: flex;
}

.install-banner-content {
  display: flex;
  align-items: center;
  gap: 12px;
}

.install-banner-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-sm);
  background: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--white);
  font-size: 1.5rem;
  font-weight: 700;
}

.install-banner-text h4 {
  font-size: 1rem;
  margin-bottom: 2px;
}

.install-banner-text p {
  font-size: 0.875rem;
  color: var(--gray);
}

/* iOS Install Banner */
.ios-install {
  background: var(--dark);
  color: var(--white);
  padding: 12px 16px;
  text-align: center;
  font-size: 0.875rem;
}

/* Loading Spinner */
.spinner {
  width: 40px;
  height: 40px;
  border: 3px solid var(--gray-lighter);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

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

.loading-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(255,255,255,0.9);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  z-index: 9999;
}

.loading-overlay p {
  color: var(--gray);
}

/* Toast Notifications */
.toast-container {
  position: fixed;
  top: 80px;
  left: 16px;
  right: 16px;
  z-index: 1001;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.toast {
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  color: var(--white);
  font-size: 0.875rem;
  animation: slideDown 0.3s ease;
  display: flex;
  align-items: center;
  gap: 8px;
}

.toast.success {
  background: var(--success);
}

.toast.error {
  background: var(--danger);
}

.toast.warning {
  background: var(--warning);
}

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

/* Offline Banner */
.offline-banner {
  background: var(--warning);
  color: var(--white);
  padding: 8px 16px;
  text-align: center;
  font-size: 0.875rem;
  display: none;
}

.offline-banner.show {
  display: block;
}

/* Hero Section */
.hero {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  color: var(--white);
  padding: 40px 16px;
  text-align: center;
}

.hero h1 {
  font-size: 2rem;
  margin-bottom: 12px;
}

.hero p {
  font-size: 1.125rem;
  opacity: 0.9;
  margin-bottom: 24px;
}

/* Features Section */
.features {
  padding: 40px 16px;
}

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

.feature-item {
  text-align: center;
}

.feature-icon {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: rgba(255, 107, 0, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 12px;
  font-size: 1.5rem;
}

.feature-item h4 {
  font-size: 0.875rem;
  color: var(--dark);
}

/* How It Works */
.how-it-works {
  padding: 40px 16px;
  background: var(--white);
}

.how-it-works h2 {
  text-align: center;
  margin-bottom: 24px;
}

.steps {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.step {
  display: flex;
  align-items: flex-start;
  gap: 16px;
}

.step-number {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--primary);
  color: var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  flex-shrink: 0;
}

.step-content h4 {
  margin-bottom: 4px;
}

.step-content p {
  color: var(--gray);
  font-size: 0.875rem;
}

/* Footer */
.footer {
  background: var(--dark);
  color: var(--white);
  padding: 24px 16px;
  text-align: center;
}

.footer p {
  opacity: 0.8;
  font-size: 0.875rem;
}

/* Payment Methods */
.payment-methods {
  display: flex;
  gap: 12px;
  margin-bottom: 16px;
}

.payment-method {
  flex: 1;
  padding: 16px;
  border: 2px solid var(--gray-lighter);
  border-radius: var(--radius-sm);
  text-align: center;
  cursor: pointer;
  transition: all 0.2s ease;
}

.payment-method:hover {
  border-color: var(--primary-light);
}

.payment-method.selected {
  border-color: var(--primary);
  background: rgba(255, 107, 0, 0.05);
}

.payment-method .icon {
  font-size: 1.5rem;
  margin-bottom: 8px;
}

/* Stripe Element Container */
#stripe-element {
  padding: 16px;
  border: 2px solid var(--gray-lighter);
  border-radius: var(--radius-sm);
  background: var(--white);
}

/* Confirmation Screen */
.confirmation {
  text-align: center;
  padding: 40px 16px;
}

.confirmation-icon {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: var(--success);
  color: var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.5rem;
  margin: 0 auto 24px;
}

.confirmation h2 {
  margin-bottom: 12px;
}

.confirmation p {
  color: var(--gray);
  margin-bottom: 24px;
}

.booking-number {
  font-size: 2rem;
  font-weight: 700;
  color: var(--primary);
  letter-spacing: 2px;
  margin-bottom: 24px;
}

/* Responsive */
@media (min-width: 768px) {
  .container {
    max-width: 600px;
  }
  
  .vehicle-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* Utility Classes */
.text-center { text-align: center; }
.text-primary { color: var(--primary); }
.text-success { color: var(--success); }
.text-danger { color: var(--danger); }
.text-gray { color: var(--gray); }

.mb-0 { margin-bottom: 0; }
.mb-1 { margin-bottom: 8px; }
.mb-2 { margin-bottom: 16px; }
.mb-3 { margin-bottom: 24px; }

.mt-1 { margin-top: 8px; }
.mt-2 { margin-top: 16px; }
.mt-3 { margin-top: 24px; }

.hidden { display: none !important; }
