/* ============================================================
   BOOKING WIDGET & FORM — taxiperth-theme
   ============================================================ */

/* ---- Booking Card (hero widget) ---- */
.booking-card {
  background: var(--white);
  border-radius: var(--radius-xl);
  padding: 32px 28px;
  box-shadow: var(--shadow-booking);
}

.booking-card-head {
  margin-bottom: 24px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--border);
}
.booking-card-head h3 {
  font-size: 22px;
  color: var(--midnight);
  margin-bottom: 2px;
}
.booking-card-head p {
  font-size: 13px;
  color: var(--muted);
}

/* ---- Field groups ---- */
.bf-group { margin-bottom: 8px; }
.bf-label {
  display: block;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 4px;
}
.bf-input-wrap {
  position: relative;
}
.bf-input-icon {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--earth);
  pointer-events: none;
}
.bf-input {
  width: 100%;
  padding: 9px 12px 9px 34px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  font-family: 'Figtree', sans-serif;
  font-size: 14px;
  color: var(--text);
  background: var(--cream);
  transition: border-color 0.15s, box-shadow 0.15s;
  -webkit-appearance: none;
}
.bf-input:focus {
  outline: none;
  border-color: var(--sun);
  background: var(--white);
  box-shadow: 0 0 0 3px rgba(255,202,37,0.10);
}
.bf-input::placeholder { color: var(--muted); }

.bf-select {
  width: 100%;
  padding: 9px 12px 9px 34px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  font-family: 'Figtree', sans-serif;
  font-size: 15px;
  color: var(--text);
  background: var(--cream);
  transition: border-color 0.15s;
  -webkit-appearance: none;
  cursor: pointer;
}
.bf-select:focus {
  outline: none;
  border-color: var(--sun);
  background: var(--white);
  box-shadow: 0 0 0 3px rgba(255,202,37,0.10);
}

.bf-row { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }

/* Swap button between From/To */
.bf-swap-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 14px;
}
.bf-line { flex: 1; height: 1px; background: var(--border); }
.bf-swap-btn {
  width: 32px; height: 32px;
  border-radius: 50%;
  background: var(--sand);
  border: 1.5px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--earth);
  transition: background 0.15s;
  flex-shrink: 0;
}
.bf-swap-btn:hover { background: var(--sun); color: var(--white); border-color: var(--sun); }

/* Submit button */
.bf-submit {
  width: 100%;
  padding: 12px;
  background: var(--sun);
  color: var(--midnight);
  border: none;
  border-radius: var(--radius-btn);
  font-family: 'Figtree', sans-serif;
  font-size: 16px;
  font-weight: 800;
  cursor: pointer;
  transition: background 0.15s, transform 0.1s, box-shadow 0.15s;
  margin-top: 6px;
}
.bf-submit:hover {
  background: var(--sun-light);
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(255,202,37,0.40);
}
.bf-submit:active { transform: translateY(0); }

/* Loading spinner */
.bf-submit.loading {
  pointer-events: none;
  opacity: 0.7;
}
.bf-submit.loading::after {
  content: '';
  display: inline-block;
  width: 16px;
  height: 16px;
  border: 2px solid var(--midnight);
  border-top-color: transparent;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  margin-left: 8px;
  vertical-align: middle;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* Note under submit */
.bf-note {
  text-align: center;
  font-size: 12px;
  color: var(--muted);
  margin-top: 10px;
}
.bf-note svg { vertical-align: middle; margin-right: 4px; color: var(--green); }

/* ============================================================
   FULL BOOKING PAGE
   ============================================================ */
.booking-page-layout {
  display: grid;
  grid-template-columns: 1fr 380px;
  gap: 48px;
  align-items: start;
  padding: 60px 0;
}

.booking-form-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 40px;
}
.booking-form-card h2 {
  font-size: 28px;
  margin-bottom: 8px;
}
.booking-form-card .subtitle {
  color: var(--muted);
  margin-bottom: 32px;
  font-size: 15px;
}

/* Sticky summary sidebar */
.booking-summary-card {
  background: var(--midnight);
  border-radius: var(--radius-xl);
  padding: 28px;
  position: sticky;
  top: 84px;
  color: var(--white);
}
.booking-summary-card h3 {
  font-size: 18px;
  color: var(--white);
  margin-bottom: 20px;
  padding-bottom: 16px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}
.summary-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding: 10px 0;
  border-bottom: 1px solid rgba(255,255,255,0.06);
  gap: 12px;
}
.summary-row:last-of-type { border-bottom: none; }
.summary-label { font-size: 12px; color: rgba(255,255,255,0.45); font-weight: 600; }
.summary-value { font-size: 14px; color: var(--white); font-weight: 600; text-align: right; }
.summary-fare {
  background: rgba(255,202,37,0.10);
  border: 1px solid rgba(255,202,37,0.20);
  border-radius: var(--radius);
  padding: 18px;
  margin: 20px 0;
  text-align: center;
}
.summary-fare-label { font-size: 11px; color: rgba(255,255,255,0.45); letter-spacing: 2px; text-transform: uppercase; margin-bottom: 6px; }
.summary-fare-amount {
  font-family: 'Barlow Condensed', sans-serif;
  font-weight: 800;
  font-size: 42px;
  color: var(--sun);
  line-height: 1;
}
.summary-fare-note { font-size: 11px; color: rgba(255,255,255,0.35); margin-top: 6px; }

/* Section dividers inside form */
.form-section-title {
  font-family: 'Barlow Condensed', sans-serif;
  font-weight: 700;
  font-size: 16px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--earth);
  margin: 28px 0 16px;
  padding-bottom: 8px;
  border-bottom: 2px solid var(--sand);
}
.form-section-title:first-of-type { margin-top: 0; }

/* ============================================================
   SUCCESS / CONFIRMATION
   ============================================================ */
.booking-success {
  text-align: center;
  padding: 48px 24px;
  display: none;
}
.booking-success-icon {
  width: 72px; height: 72px;
  background: rgba(34,197,94,0.10);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 24px;
  font-size: 36px;
}
.booking-success h2 { color: var(--midnight); margin-bottom: 10px; }
.booking-success p { color: var(--muted); font-size: 16px; }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 900px) {
  .booking-page-layout {
    grid-template-columns: 1fr;
  }
  .booking-summary-card { position: static; }
}

@media (max-width: 640px) {
  .booking-form-card { padding: 24px 20px; }
  .bf-row { grid-template-columns: 1fr; }
}

/* ============================================================
   CURRENT LOCATION BUTTON
   ============================================================ */
@keyframes loc-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(255,202,37,0.7); }
  50%       { box-shadow: 0 0 0 6px rgba(255,202,37,0); }
}

.loc-btn {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: none;
  background: var(--sun);
  color: var(--midnight);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  flex-shrink: 0;
  animation: loc-pulse 1.8s ease-in-out infinite;
  transition: background 0.15s;
}
.loc-btn:hover { background: #FFD452; }
.loc-btn.loading { animation: none; opacity: 0.6; cursor: wait; }

.bf-input-has-loc { padding-right: 46px; }
.bw-input-has-loc { padding-right: 40px; }

/* ---- Google Places autocomplete — compact ---- */
.pac-container {
  border-radius: 8px !important;
  border: 1px solid #e0e0e0 !important;
  box-shadow: 0 4px 16px rgba(0,0,0,0.12) !important;
  font-family: 'Figtree', sans-serif !important;
  margin-top: 4px !important;
}
.pac-item {
  padding: 6px 12px !important;
  font-size: 13px !important;
  line-height: 1.3 !important;
  cursor: pointer;
  border-top: 1px solid #f0f0f0 !important;
}
.pac-item:first-child { border-top: none !important; }
.pac-item:hover,
.pac-item-selected { background: #f8f8f8 !important; }
.pac-item-query {
  font-size: 13px !important;
  font-weight: 600;
  color: #1a1a1a !important;
}
.pac-matched { font-weight: 700; color: #1a1a1a !important; }
.pac-icon { margin-top: 2px !important; width: 14px !important; }
.pac-logo:after { display: none !important; }

/* ---- Vehicle selector ---- */
.tp-vehicle-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
}
.tp-vehicle-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 8px 4px 6px;
  border: 2px solid var(--border);
  border-radius: var(--radius);
  background: var(--cream);
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s, box-shadow 0.15s;
  text-align: center;
  position: relative;
}
.tp-vehicle-card:hover {
  border-color: var(--sun);
  background: rgba(255,202,37,0.06);
}
.tp-vehicle-card.selected {
  border-color: var(--sun);
  background: rgba(255,202,37,0.12);
  box-shadow: 0 0 0 3px rgba(255,202,37,0.18);
}
.tp-vehicle-card.selected::after {
  content: '';
  position: absolute;
  top: 4px; right: 4px;
  width: 14px; height: 14px;
  background: var(--sun) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='10' viewBox='0 0 24 24' fill='none' stroke='%231A1A1A' stroke-width='3'%3E%3Cpolyline points='20 6 9 17 4 12'/%3E%3C/svg%3E") center/10px no-repeat;
  border-radius: 50%;
}
.tp-vehicle-img {
  width: 100%;
  height: 44px;
  object-fit: contain;
  margin-bottom: 5px;
}
.tp-vehicle-icon-wrap {
  width: 100%;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  margin-bottom: 5px;
}
.tp-vehicle-name {
  font-size: 10px;
  font-weight: 700;
  color: var(--text);
  line-height: 1.2;
}
.tp-vehicle-pax {
  font-size: 9px;
  color: var(--muted);
  margin-top: 2px;
  line-height: 1.2;
}
@media (max-width: 600px) {
  .tp-vehicle-grid { grid-template-columns: repeat(2, 1fr); }
}

/* ---- Add-ons (baby seat / wheelchair) ---- */
.tp-addons {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 10px;
  margin-bottom: 4px;
}
.tp-addon {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  user-select: none;
  padding: 10px 14px;
  border: 1.5px solid var(--border);
  border-radius: 8px;
  background: var(--cream);
  transition: border-color 0.15s, background 0.15s;
}
.tp-addon:hover {
  border-color: var(--sun);
  background: rgba(255,202,37,0.06);
}
.tp-addon input[type="checkbox"] {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}
.tp-addon:has(input:checked) {
  border-color: var(--sun);
  background: rgba(255,202,37,0.10);
}
.tp-addon-icon {
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  border-radius: 6px;
  background: rgba(0,0,0,0.06);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #888;
  transition: background 0.15s, color 0.15s;
}
.tp-addon:has(input:checked) .tp-addon-icon {
  background: var(--sun);
  color: var(--midnight);
}
.tp-addon-text {
  flex: 1;
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  line-height: 1.3;
}
.tp-addon-box {
  flex-shrink: 0;
  width: 18px;
  height: 18px;
  border: 2px solid var(--border);
  border-radius: 4px;
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: border-color 0.15s, background 0.15s;
  color: transparent;
}
.tp-addon:has(input:checked) .tp-addon-box {
  border-color: var(--sun);
  background: var(--sun);
  color: var(--midnight);
}

/* ---- Stops ---- */
.tp-stops-wrap { display: flex; flex-direction: column; gap: 6px; margin-bottom: 4px; }

.tp-stop-field {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--sand);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0 10px 0 10px;
  transition: border-color 0.15s;
}
.tp-stop-field:focus-within { border-color: var(--sun); }
.tp-stop-icon { flex-shrink: 0; color: var(--muted); }
.tp-stop-input {
  flex: 1;
  border: none;
  background: transparent;
  font-family: 'Figtree', sans-serif;
  font-size: 14px;
  color: var(--text);
  padding: 9px 0;
  outline: none;
}
.tp-stop-input::placeholder { color: var(--muted); }
.tp-stop-remove {
  flex-shrink: 0;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--muted);
  display: flex;
  align-items: center;
  padding: 4px;
  border-radius: 4px;
  transition: color 0.15s, background 0.15s;
}
.tp-stop-remove:hover { color: #c0392b; background: rgba(192,57,43,0.08); }

/* Add stop + route info on same row */
.tp-below-dropoff {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}
.tp-add-stop {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: none;
  border: 1.5px dashed var(--border);
  border-radius: var(--radius-sm);
  color: var(--muted);
  font-family: 'Figtree', sans-serif;
  font-size: 13px;
  font-weight: 600;
  padding: 7px 14px;
  cursor: pointer;
  white-space: nowrap;
  flex-shrink: 0;
  transition: border-color 0.15s, color 0.15s;
}
.tp-add-stop:hover { border-color: var(--sun); color: var(--text); }

/* Route info strip */
.tp-route-info {
  display: flex;
  align-items: center;
  gap: 6px;
  background: rgba(255,202,37,0.10);
  border: 1px solid rgba(255,202,37,0.30);
  border-radius: var(--radius-sm);
  padding: 7px 12px;
  font-size: 13px;
  font-weight: 600;
  color: var(--midnight);
  flex: 1;
}
.tp-route-dot { color: var(--muted); margin: 0 2px; }
