/* ===== OPTIMIZED RESET ===== */
.taxi-booking * {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* ===== COMPACT CONTAINER ===== */
.taxi-booking {
  max-width: 1200px;
  margin: 30px auto;
  background: #fff;
  padding: 24px;
  border-radius: 12px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.05);
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
  font-size: 14px;
  line-height: 1.4;
}

#kubio .taxi-booking h2 {
  text-align: center;
  margin-bottom: 20px;
  font-size: 1.5rem;
  color: #D4AF37;
  font-weight: 600;
}

/* ===== COMPACT FORM GROUPS ===== */
.form-group {
  margin-bottom: 16px;
}

.form-group.compact {
  margin-bottom: 8px;
}

.form-label {
  display: block;
  font-weight: 500;
  color: #333;
  margin-bottom: 4px;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

/* ===== COMPACT INPUTS ===== */
.form-input,
.form-select {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #ddd;
  border-radius: 6px;
  font-size: 14px;
  background: #fafafa;
  transition: all 0.2s;
  min-height: 40px;
}

.form-input:focus,
.form-select:focus {
  outline: none;
  border-color: #007cff;
  background: #fff;
  box-shadow: 0 0 0 2px rgba(0, 124, 255, 0.1);
}

.form-input:disabled,
.form-select:disabled {
  background: #f5f5f5;
  color: #999;
  cursor: not-allowed;
  border-color: #ddd;
}

/* ===== VEHICLE INFO ===== */
.vehicle-info {
  font-size: 12px;
  color: #666;
  margin-top: 6px;
  padding: 6px 8px;
  background: #f8f9fa;
  border-radius: 4px;
  border-left: 3px solid #007cff;
  line-height: 1.4;
}

.vehicle-capacity {
  display: block;
  font-size: 11px;
  color: #666;
  margin-top: 4px;
  font-style: italic;
}

/* ===== CAPACITY WARNING ===== */
.capacity-warning {
  background: #fff3cd;
  color: #856404;
  padding: 10px 14px;
  border-radius: 6px;
  margin: 10px 0;
  border: 1px solid #ffeaa7;
  font-size: 13px;
  display: none;
}

.capacity-warning .warning-icon {
  display: inline-block;
  margin-right: 8px;
  font-weight: bold;
  font-size: 16px;
}

/* ===== COMPACT GRID ===== */
.form-grid {
  display: grid;
  gap: 16px;
  margin-bottom: 16px;
}

.form-grid.two-col {
  grid-template-columns: repeat(2, 1fr);
}

.form-grid.three-col {
  grid-template-columns: repeat(3, 1fr);
}

/* ===== OPTIONS GRID ===== */
.options-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  background: #f8f9fa;
  padding: 12px;
  border-radius: 6px;
  border: 1px solid #e9ecef;
}

/* ===== COMPACT CHECKBOXES ===== */
.checkbox-group {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  font-size: 13px;
  padding: 4px 0;
}

.checkbox-group input[type="checkbox"] {
  width: 18px;
  height: 18px;
  margin: 0;
  accent-color: #007cff;
  cursor: pointer;
}

.checkbox-group label {
  cursor: pointer;
  font-weight: 500;
  color: #333;
}

/* ===== COMPACT BUTTONS ===== */
#kubio .bbtn {
  padding: 14px 28px;
  border-radius: 6px;
  border: none;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  text-align: center;
  min-height: 46px;
  width: 100%;
  margin-top: 20px;
  background: #D4AF37;
  color: white;
}

#kubio .bbtn:hover {
  background: #FFC107;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 124, 255, 0.3);
}

#kubio .bbtn:disabled {
  background: #f5f5f5;
  color: #999;
  cursor: not-allowed;
  border-color: #eee;
  transform: none;
  box-shadow: none;
}

#kubio .bbtn-secondary {
  background: #f0f0f0;
  color: #333;
  border: 1px solid #ddd;
  width: auto;
  margin-top: 0;
  font-size: 13px;
  font-weight: 500;
  min-height: 36px;
  padding: 8px 16px;
}

#kubio .bbtn-secondary:hover {
  background: #e5e5e5;
  transform: none;
  box-shadow: none;
}

/* ===== PRICE DISPLAY ===== */
.price-display {
  margin-top: 20px;
  padding: 16px;
  background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
  border-radius: 8px;
  text-align: center;
  border: 1px solid #e9ecef;
}

.price-label {
  font-size: 11px;
  text-transform: uppercase;
  color: #666;
  letter-spacing: 0.5px;
  margin-bottom: 4px;
}

.price-amount {
  font-size: 28px;
  font-weight: 700;
  color: #111;
}

/* ===== DISTANCE DISPLAY ===== */
.distance-display {
  margin-top: 16px;
  padding: 12px;
  background: #f8f9fa;
  border-radius: 6px;
  text-align: center;
  border: 1px solid #e9ecef;
  font-size: 14px;
}

.distance-label {
  font-size: 11px;
  text-transform: uppercase;
  color: #666;
  letter-spacing: 0.5px;
  margin-bottom: 4px;
}

.distance-amount {
  font-size: 18px;
  font-weight: 600;
  color: #333;
}

/* ===== STOPS ===== */
.stops-container {
  margin: 12px 0;
}

.stop-box {
  background: #f8f9fa;
  padding: 12px;
  border-radius: 6px;
  margin-top: 10px;
  border: 1px dashed #dee2e6;
}

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

.stop-label {
  font-size: 13px;
  font-weight: 600;
  color: #495057;
}

.remove-stop {
  background: #dc3545;
  color: white;
  border: none;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 16px;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
}

.remove-stop:hover {
  background: #c82333;
}

/* ===== RETURN BOX ===== */
.return-box {
  background: #f8f9fa;
  padding: 16px;
  border-radius: 6px;
  margin-top: 12px;
  border-left: 3px solid #007cff;
}

/* ===== LOADING ===== */
.loading {
  display: none;
  text-align: center;
  padding: 12px;
  color: #666;
  font-size: 13px;
  font-weight: 500;
}

.loading::after {
  content: "";
  display: inline-block;
  width: 18px;
  height: 18px;
  border: 2px solid #ddd;
  border-top-color: #007cff;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin-left: 10px;
  vertical-align: middle;
}

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

/* ===== ERROR MESSAGES ===== */
.error-message {
  background: #fee;
  color: #c00;
  padding: 12px 16px;
  border-radius: 6px;
  margin-bottom: 16px;
  border: 1px solid #fcc;
  font-size: 13px;
  display: none;
  text-align: center;
  font-weight: 500;
}

.error-message.return-error {
  background: #fff3cd;
  color: #856404;
  border: 1px solid #ffeaa7;
}

/* ===== GOOGLE MAPS AUTOCOMPLETE STYLING ===== */
.geocoder-container {
  position: relative;
  z-index: 10;
}

.geocoder-container .form-input {
  width: 100% !important;
}

.stop-geocoder {
  margin-top: 8px;
  position: relative;
  z-index: 8;
}

.stop-geocoder .form-input {
  width: 100% !important;
}

/* Google Places Autocomplete Dropdown Styling */
.pac-container {
  border-radius: 6px !important;
  border: 1px solid #ddd !important;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15) !important;
  margin-top: 2px !important;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif !important;
  z-index: 9999 !important;
}

.pac-item {
  padding: 8px 12px !important;
  font-size: 14px !important;
  border-top: 1px solid #e9ecef !important;
  cursor: pointer !important;
  line-height: 1.4 !important;
}

.pac-item:first-child {
  border-top: none !important;
}

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

.pac-item-selected {
  background-color: #e7f3ff !important;
}

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

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

.pac-icon {
  margin-right: 8px !important;
}

/* ===== MAIN CONTAINER ===== */
.container-wrapper {
  display: flex;
  gap: 30px;
}

.booking-form {
  flex: 1;
  min-width: 0;
  position: relative;
  z-index: 2;
}

.map-container {
  flex: 1;
  position: relative;
  min-width: 0;
  z-index: 1;
}

/* ===== MAP STYLES ===== */
#map {
  height: 100%;
  min-height: 500px;
  border-radius: 8px;
  border: 1px solid #eee;
  position: sticky;
  top: 20px;
}

/* ===== MAP TOGGLE ===== */
.map-toggle-container {
  text-align: right;
  margin-bottom: 20px;
}

#toggleMapBtn {
  width: auto;
  min-width: 120px;
  font-size: 13px;
  padding: 8px 16px;
  margin: 0;
}

/* ===== AUTO-SELECTED VEHICLE ===== */
.form-select option.auto-selected {
  background-color: #e7f3ff !important;
  color: #007cff !important;
  font-weight: 600;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
  .container-wrapper {
    flex-direction: column;
  }
  
  .map-container {
    display: none;
    margin-top: 20px;
  }
  
  .map-container.visible {
    display: block;
  }
  
  #map {
    height: 300px;
    min-height: 300px;
    position: static;
  }
  
  .taxi-booking {
    margin: 16px;
    padding: 16px;
  }
  
  .form-grid.two-col,
  .form-grid.three-col,
  .options-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }
  
  .price-amount {
    font-size: 24px;
  }
  
  .distance-amount {
    font-size: 16px;
  }
  
  .btn {
    padding: 12px 24px;
    font-size: 14px;
  }
}

@media (max-width: 480px) {
  .taxi-booking h2 {
    font-size: 1.25rem;
  }
  
  .form-input,
  .form-select {
    padding: 8px 10px;
    font-size: 13px;
    min-height: 38px;
  }
  
  #map {
    height: 250px;
    min-height: 250px;
  }
  
  .price-amount {
    font-size: 22px;
  }
  
  .btn {
    padding: 10px 20px;
    font-size: 14px;
  }
}

/* Tablets and medium screens */
@media (max-width: 992px) {
  .form-grid.three-col {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .taxi-booking {
    padding: 20px;
  }
}

/* Mobile screens */
@media (max-width: 768px) {
  .booking-form {
    order: 1;
    z-index: 1;
  }
  
  .map-container {
    order: 2;
    z-index: 0;
  }
}

/* ===== STOP COUNTER ===== */
.stop-counter {
  font-size: 11px;
  color: #666;
  margin-top: 4px;
  font-style: italic;
}

/* ===== PRICE BREAKDOWN ===== */
.price-breakdown {
  font-size: 11px;
  color: #666;
  margin-top: 4px;
}

.price-breakdown span {
  display: block;
  margin-bottom: 2px;
}