/* Book a Ride page */

.nav a.active { color: var(--primary); }

.ride-hero {
  padding: 56px 0 32px;
  text-align: center;
}

.ride-hero h1 {
  font-size: 38px;
  font-weight: 800;
  letter-spacing: -0.8px;
  margin: 0 0 14px;
}

.ride-hero .lede {
  color: var(--text-muted);
  font-size: 16px;
  max-width: 560px;
  margin: 0 auto;
}

.ride-tool { padding-top: 0; }

.role-tabs-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 24px;
}

.role-tabs {
  display: inline-flex;
  gap: 4px;
  padding: 4px;
  background: var(--bg-alt);
  border-radius: 999px;
  margin-bottom: 0;
}

.auth-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
}

.auth-bar-text {
  color: var(--text-muted);
  font-weight: 600;
}

.auth-bar-link {
  font-family: inherit;
  font-size: 13px;
  font-weight: 700;
  color: var(--primary);
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  text-decoration: none;
}

.auth-bar-link:hover { text-decoration: underline; }

.role-tab {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-family: inherit;
  font-size: 13.5px;
  font-weight: 700;
  padding: 9px 18px;
  border-radius: 999px;
  border: none;
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}

.role-tab.active {
  background: #fff;
  color: var(--primary);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.ride-layout {
  display: grid;
  grid-template-columns: 380px 1fr;
  gap: 28px;
  align-items: start;
}

/* .ride-layout's own `display: grid` would otherwise outrank the UA [hidden] rule
   at equal specificity — force it explicitly so role switching actually hides this view. */
#customerView[hidden],
#fleetManagerView[hidden] {
  display: none;
}

.ride-panel {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 22px;
}

.ride-field { margin-bottom: 16px; }

.ride-field-label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 700;
  margin-bottom: 8px;
}

.pin-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
}

.pin-dot-pickup { background: #22C55E; }
.pin-dot-dropoff { background: var(--primary); }

.ride-input-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.ride-location-status {
  font-size: 12px;
  color: var(--text-muted);
  margin: 8px 0 0;
  line-height: 1.4;
}

.ride-input {
  flex: 1;
  min-width: 0;
  font-size: 14px;
  font-family: inherit;
  color: var(--text);
  padding: 11px 12px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--bg-alt);
}

.ride-input:focus {
  outline: none;
  border-color: var(--primary);
  background: #fff;
}

.ride-icon-btn {
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: #fff;
  color: var(--primary);
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.ride-icon-btn:hover { border-color: var(--primary); background: var(--primary-light); }
.ride-icon-btn:disabled { opacity: 0.5; cursor: default; }

.ride-target-toggle {
  display: flex;
  gap: 8px;
  margin: 18px 0 8px;
}

.ride-toggle-btn {
  flex: 1;
  font-size: 12.5px;
  font-weight: 700;
  text-align: center;
  padding: 9px 8px;
  border-radius: 999px;
  border: 1.5px solid var(--border);
  background: #fff;
  color: var(--text-muted);
  cursor: pointer;
  transition: border-color 0.15s ease, color 0.15s ease, background 0.15s ease;
}

.ride-toggle-btn.active {
  border-color: var(--primary);
  color: var(--primary);
  background: var(--primary-light);
}

.ride-hint {
  font-size: 12.5px;
  color: var(--text-muted);
  margin: 0 0 20px;
}

.ride-summary {
  background: var(--bg-alt);
  border-radius: 12px;
  padding: 16px;
  margin-bottom: 18px;
}

.ride-summary-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 14px;
  color: var(--text-muted);
  padding: 4px 0;
}

.ride-summary-row strong { color: var(--text); font-weight: 600; }

.ride-summary-divider {
  height: 1px;
  background: var(--border);
  margin: 10px 0;
}

.ride-summary-total { font-size: 16px; color: var(--text); }
.ride-summary-total strong { font-size: 18px; font-weight: 800; color: var(--primary); }

.ride-fare-note {
  font-size: 11.5px;
  color: var(--text-muted);
  margin: 10px 0 0;
}

.ride-attempts-status {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text-muted);
  margin: 10px 0 0;
}

.ride-attempts-status.ride-attempts-blocked { color: var(--primary-dark); }

.ride-cta {
  width: 100%;
  margin-top: 4px;
}

.ride-cta-note {
  font-size: 12px;
  color: var(--text-muted);
  text-align: center;
  margin: 10px 0 0;
}

.ride-map-wrap {
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  height: 640px;
}

.ride-map { width: 100%; height: 100%; }

.fleet-panel {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 28px;
  max-width: 480px;
}

.fleet-panel h2 {
  font-size: 20px;
  font-weight: 800;
  margin: 0 0 8px;
}

.fleet-intro {
  color: var(--text-muted);
  font-size: 14px;
  margin: 0 0 22px;
}

.fleet-field { margin-bottom: 18px; }

.fleet-field label {
  display: block;
  font-size: 13px;
  font-weight: 700;
  margin-bottom: 8px;
}

.fleet-input-row {
  display: flex;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--bg-alt);
  padding: 0 12px;
}

.fleet-input-row:focus-within { border-color: var(--primary); background: #fff; }

.fleet-input-affix {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-muted);
  white-space: nowrap;
}

.fleet-input {
  flex: 1;
  min-width: 0;
  font-size: 14px;
  font-family: inherit;
  color: var(--text);
  padding: 11px 0;
  border: none;
  background: transparent;
}

.fleet-input:focus { outline: none; }

.fleet-actions {
  display: flex;
  gap: 10px;
  margin-top: 22px;
}

.fleet-actions .btn { flex: 1; }

.fleet-status {
  min-height: 18px;
  font-size: 13px;
  font-weight: 600;
  color: var(--primary);
  margin: 12px 0 0;
}

.fleet-note {
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.5;
  margin: 14px 0 0;
}

@media (max-width: 900px) {
  .ride-layout { grid-template-columns: 1fr; }
  .ride-map-wrap { height: 420px; order: -1; }
  .ride-hero h1 { font-size: 30px; }
  .fleet-panel { max-width: none; }
}

/* Login / Register modal */

.auth-modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(20, 15, 15, 0.55);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.auth-modal-overlay[hidden] { display: none; }

.auth-modal {
  position: relative;
  width: 100%;
  max-width: 440px;
  max-height: calc(100vh - 40px);
  overflow-y: auto;
  background: #fff;
  border-radius: var(--radius);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.3);
  padding: 28px;
}

.auth-modal-close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: none;
  background: var(--bg-alt);
  color: var(--text-muted);
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
}

.auth-modal-tabs {
  display: flex;
  gap: 4px;
  padding: 4px;
  background: var(--bg-alt);
  border-radius: 999px;
  margin-bottom: 22px;
}

.auth-modal-tab {
  flex: 1;
  font-family: inherit;
  font-size: 13.5px;
  font-weight: 700;
  padding: 9px 14px;
  border-radius: 999px;
  border: none;
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
}

.auth-modal-tab.active {
  background: #fff;
  color: var(--primary);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.auth-modal-form[hidden] { display: none; }

.auth-modal-form h2 {
  font-size: 21px;
  font-weight: 800;
  margin: 0 0 8px;
}

.auth-modal-intro {
  color: var(--text-muted);
  font-size: 13.5px;
  line-height: 1.5;
  margin: 0 0 20px;
}

.auth-field { margin-bottom: 14px; }

.auth-field label {
  display: block;
  font-size: 12.5px;
  font-weight: 700;
  margin-bottom: 7px;
}

.auth-field input,
.auth-field select {
  width: 100%;
  font-size: 14px;
  font-family: inherit;
  color: var(--text);
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--bg-alt);
}

.auth-field input:focus,
.auth-field select:focus {
  outline: none;
  border-color: var(--primary);
  background: #fff;
}

.reg-role-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 18px;
}

.reg-role-chip {
  flex: 1;
  min-width: 47%;
  font-family: inherit;
  font-size: 12.5px;
  font-weight: 700;
  text-align: center;
  padding: 9px 8px;
  border-radius: 999px;
  border: 1.5px solid var(--border);
  background: #fff;
  color: var(--text-muted);
  cursor: pointer;
}

.reg-role-chip.active {
  border-color: var(--primary);
  color: #fff;
  background: var(--primary);
}

.reg-role-section[hidden] { display: none; }

.auth-modal-approval-note {
  font-size: 12px;
  color: var(--text-muted);
  background: var(--bg-alt);
  border-radius: 10px;
  padding: 10px 12px;
  line-height: 1.5;
  margin: 4px 0 16px;
}

.auth-modal-submit { width: 100%; border: none; }
.auth-modal-submit:disabled { opacity: 0.7; cursor: default; }

.auth-modal-error {
  font-size: 13px;
  font-weight: 600;
  color: var(--primary-dark);
  margin: 14px 0 0;
}

.auth-modal-error[hidden] { display: none; }

/* "You are here" pulsing dot */

.user-location-dot {
  position: absolute;
  width: 0;
  height: 0;
  pointer-events: none;
}

.user-location-pulse {
  position: absolute;
  top: 0;
  left: 0;
  width: 40px;
  height: 40px;
  margin: -20px 0 0 -20px;
  border-radius: 50%;
  background: rgba(59, 130, 246, 0.35);
  animation: user-location-pulse 1.8s ease-out infinite;
}

.user-location-core {
  position: absolute;
  top: 0;
  left: 0;
  width: 14px;
  height: 14px;
  margin: -7px 0 0 -7px;
  border-radius: 50%;
  background: #3B82F6;
  border: 2px solid #fff;
  box-shadow: 0 0 4px rgba(0, 0, 0, 0.35);
}

@keyframes user-location-pulse {
  0% { transform: scale(0.3); opacity: 0.8; }
  100% { transform: scale(1); opacity: 0; }
}
