/* Booking widget */
.booking-card {
  background: var(--white);
  border: 1px solid #e2e8f0;
  border-radius: 18px;
  box-shadow: var(--shadow-lg);
  padding: 18px;
}

.booking-tabs {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-bottom: 14px;
  background: var(--light);
  padding: 6px;
  border-radius: 12px;
}

.booking-tab {
  border: none;
  background: transparent;
  padding: 10px 8px;
  border-radius: 10px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--grey);
  cursor: pointer;
}

.booking-tab.active {
  background: var(--white);
  color: var(--dark);
  box-shadow: 0 2px 8px rgba(0,0,0,.06);
}

.booking-tab[disabled] {
  opacity: .45;
  cursor: not-allowed;
}

.booking-panel { display: none; }
.booking-panel.active { display: block; }

.field-label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: var(--grey);
  margin: 12px 0 6px;
}

.field-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
  border: 1px solid #cbd5e1;
  border-radius: 12px;
  padding: 0 12px;
  background: var(--white);
}

.field-wrap:focus-within {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-light);
}

.field-wrap input {
  border: none;
  outline: none;
  flex: 1;
  padding: 12px 0;
  font: inherit;
  background: transparent;
}

.field-icon { color: var(--primary-dark); flex-shrink: 0; }

.field-plain {
  width: 100%;
  border: 1px solid #cbd5e1;
  border-radius: 12px;
  padding: 12px 14px;
  font: inherit;
}

.link-btn {
  background: none;
  border: none;
  color: var(--primary-dark);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  margin: 10px 0 14px;
  padding: 0;
}

.btn-block { width: 100%; justify-content: center; margin-top: 8px; }

.booking-note, .booking-support {
  font-size: 12px;
  color: var(--grey);
  margin-top: 12px;
  line-height: 1.5;
}

.coming-soon-note {
  text-align: center;
  font-weight: 600;
  color: #8a6b00;
}

.booking-message {
  margin-top: 14px;
  padding: 12px 14px;
  border-radius: 10px;
  font-size: 13px;
  line-height: 1.5;
}

.booking-message a { color: inherit; font-weight: 700; }
.booking-message.success { background: #ecfdf5; color: #166534; }
.booking-message.error { background: #fef2f2; color: #991b1b; }
.booking-message.info { background: #fffbeb; color: #92400e; }

/* Auth modal */
.auth-modal-root {
  position: fixed;
  inset: 0;
  z-index: 1200;
  background: rgba(10, 16, 32, 0.55);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.auth-modal-root[hidden] { display: none !important; }

.auth-modal-card {
  position: relative;
  width: min(420px, 100%);
  max-height: min(92vh, 720px);
  overflow: auto;
  background: #fff;
  border-radius: 16px;
  padding: 22px 20px 20px;
  box-shadow: 0 18px 40px rgba(0,0,0,.18);
}

.auth-modal-close {
  position: absolute;
  top: 10px;
  right: 12px;
  border: none;
  background: transparent;
  font-size: 24px;
  line-height: 1;
  color: var(--grey);
  cursor: pointer;
  padding: 4px 8px;
}

.auth-modal-title {
  font-size: 20px;
  font-weight: 800;
  color: var(--dark);
  margin: 0 28px 4px 0;
}

.auth-modal-subtitle {
  font-size: 13px;
  color: var(--grey);
  margin-bottom: 14px;
}

.auth-modal-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  background: var(--light);
  padding: 4px;
  border-radius: 10px;
  margin-bottom: 14px;
}

.auth-tab {
  border: none;
  background: transparent;
  padding: 10px 8px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 700;
  color: var(--grey);
  cursor: pointer;
}

.auth-tab.active {
  background: #fff;
  color: var(--dark);
  box-shadow: 0 1px 4px rgba(0,0,0,.08);
}

.auth-modal-form .field-label { margin-top: 10px; }

.auth-input {
  width: 100%;
  display: block;
  border: 1px solid #cbd5e1;
  border-radius: 12px;
  padding: 12px 14px;
  font: inherit;
  background: #fff;
}

.auth-input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-light);
}

.auth-forgot {
  display: inline-block;
  margin: 8px 0 4px;
}

.auth-divider {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 14px 0;
  color: var(--grey-light);
  font-size: 12px;
}

.auth-divider::before,
.auth-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: #e2e8f0;
}

.auth-google-btn { margin-top: 0; }

.auth-error {
  color: #991b1b;
  margin-top: 12px;
  font-size: 13px;
  line-height: 1.4;
}

.auth-error.auth-info { color: #166534; }

.auth-gate-root { display: none !important; }
.auth-gate { display: none; }

/* Estimate / vehicles */
.ride-route-summary {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 14px;
}

.route-stat {
  background: var(--light);
  border-radius: 12px;
  padding: 10px 12px;
  text-align: center;
}

.route-stat strong {
  display: block;
  font-size: 16px;
  color: var(--dark);
}

.route-stat span {
  font-size: 11px;
  color: var(--grey);
  text-transform: uppercase;
  letter-spacing: .04em;
}

.ride-estimate-results {
  display: grid;
  gap: 8px;
  margin-top: 12px;
}

.vehicle-option {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  text-align: left;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 12px;
  background: #fff;
  cursor: pointer;
  font: inherit;
}

.vehicle-option.selected {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-light);
}

.vehicle-option-main {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.vehicle-option-main small { color: var(--grey); font-size: 12px; }

.vehicle-option-fare {
  font-weight: 800;
  color: var(--dark);
  white-space: nowrap;
}

.payment-options {
  display: grid;
  gap: 8px;
}

.ride-when-toggle {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-bottom: 8px;
}

.ride-when-btn {
  border: 1px solid #e2e8f0;
  background: #fff;
  border-radius: 12px;
  padding: 10px 8px;
  font: inherit;
  font-weight: 700;
  color: var(--grey);
  cursor: pointer;
}

.ride-when-btn.active {
  border-color: var(--primary);
  background: #fff7ed;
  color: var(--dark);
}

.my-rides-tabs {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  padding-bottom: 10px;
  margin-bottom: 16px;
}

.my-rides-tab {
  flex: 0 0 auto;
  border: 1px solid #e2e8f0;
  background: #fff;
  border-radius: 999px;
  padding: 8px 14px;
  font: inherit;
  font-weight: 700;
  color: var(--grey);
  cursor: pointer;
  white-space: nowrap;
}

.my-rides-tab.active {
  background: var(--primary);
  border-color: var(--primary);
  color: #111;
}

.my-rides-count {
  font-weight: 600;
  opacity: .7;
}

.ride-history-card {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  padding: 16px;
  margin-bottom: 12px;
}

.ride-history-status {
  color: #FEA735;
  font-weight: 700;
  text-transform: capitalize;
  margin-bottom: 6px;
}

.ride-history-to,
.ride-history-meta {
  color: var(--grey);
  font-size: 14px;
  margin-top: 4px;
}

.ride-history-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.account-actions {
  display: grid;
  gap: 10px;
  margin-top: 22px;
}

.payment-option {
  display: flex;
  align-items: center;
  gap: 8px;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 12px;
  font-size: 14px;
  cursor: pointer;
}

/* Finding / driver panels */
.ride-finding {
  margin-top: 4px;
  padding: 16px 4px 4px;
}

.finding-progress {
  height: 4px;
  border-radius: 999px;
  background: #e2e8f0;
  overflow: hidden;
  margin-bottom: 14px;
}

.finding-progress span {
  display: block;
  height: 100%;
  width: 40%;
  background: var(--primary);
  border-radius: 999px;
  animation: finding-slide 1.2s ease-in-out infinite;
}

@keyframes finding-slide {
  0% { transform: translateX(-120%); }
  100% { transform: translateX(320%); }
}

.finding-title {
  font-size: 18px;
  font-weight: 800;
  color: var(--dark);
  margin-bottom: 4px;
}

.finding-status {
  font-size: 13px;
  color: var(--grey);
  margin-bottom: 14px;
}

.finding-meta,
.finding-driver-card {
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 12px;
  margin-bottom: 12px;
  background: #fff;
}

.driver-found-title {
  font-weight: 800;
  font-size: 14px;
  margin-bottom: 8px;
}

.finding-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-size: 13px;
  padding: 6px 0;
  border-bottom: 1px solid #f1f5f9;
}

.finding-row:last-child { border-bottom: none; }

.finding-row span { color: var(--grey); flex-shrink: 0; }

.finding-row strong {
  text-align: right;
  font-weight: 600;
  color: var(--dark);
  word-break: break-word;
}

.finding-actions {
  display: grid;
  gap: 8px;
  margin-top: 4px;
}

/* Place autocomplete */
.place-suggest-wrap {
  position: relative;
}
.place-suggest-list {
  position: absolute;
  left: 0;
  right: 0;
  top: calc(100% + 4px);
  z-index: 40;
  margin: 0;
  padding: 6px 0;
  list-style: none;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.12);
  max-height: 320px;
  overflow-y: auto;
}
.place-suggest-item,
.place-suggest-status {
  padding: 10px 12px;
  font-size: 13px;
  color: var(--dark);
  cursor: pointer;
  line-height: 1.35;
}
.place-suggest-item {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  white-space: normal;
}
.place-suggest-primary {
  font-weight: 600;
  font-size: 13px;
}
.place-suggest-secondary {
  font-size: 12px;
  color: var(--grey);
  font-weight: 400;
}
.place-suggest-status {
  color: var(--grey);
  cursor: default;
}
.place-suggest-item:hover,
.place-suggest-item.active {
  background: #fff7ed;
}
.place-suggest-list[hidden] {
  display: none !important;
}

@media (max-width: 390px) {
  .booking-card { padding: 14px; }
  .booking-tab { font-size: 11px; padding: 9px 6px; }
  .auth-modal-card { padding: 18px 14px 16px; }
}

