/* ==========================================================================
   CUSTOMER RIDE-BOOKING WEB APP STYLES
   ========================================================================== */

.app-layout {
  position: relative;
  width: 100vw;
  height: 100vh;
  overflow: hidden;
  display: flex;
}

/* Map Container */
#map {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
}

/* Top App Header Overlay */
.app-topbar {
  position: absolute;
  top: 16px;
  left: 16px;
  right: 16px;
  z-index: 500;
  display: flex;
  justify-content: space-between;
  align-items: center;
  pointer-events: none;
}

.app-topbar > * {
  pointer-events: auto;
}

.topbar-card {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  border: 1px solid var(--border);
  border-radius: var(--radius-full);
  padding: 8px 16px;
  box-shadow: var(--shadow-lg);
  display: flex;
  align-items: center;
  gap: 12px;
}

/* Floating Booking Panel / Bottom Sheet */
.booking-panel {
  position: absolute;
  bottom: 0;
  left: 20px;
  width: 440px;
  max-width: calc(100vw - 40px);
  max-height: calc(100vh - 90px);
  background: #FFFFFF;
  border-radius: var(--radius-xl);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sheet);
  z-index: 600;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transition: transform var(--transition-smooth);
}

.panel-header {
  padding: 18px 22px 14px 22px;
  border-bottom: 1px solid var(--border-light);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.panel-body {
  padding: 20px 22px;
  overflow-y: auto;
  flex: 1;
}

/* Search Input Blocks */
.route-inputs-card {
  background: var(--surface);
  border-radius: var(--radius-lg);
  padding: 16px;
  margin-bottom: 16px;
  position: relative;
}

.route-connector {
  position: absolute;
  left: 29px;
  top: 42px;
  bottom: 42px;
  width: 2px;
  border-left: 2px dashed #999;
}

.input-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
  position: relative;
}
.input-row:last-child {
  margin-bottom: 0;
}

.pin-icon {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  flex-shrink: 0;
  z-index: 2;
}
.pin-icon.pickup { background: #DCFCE7; color: #16A34A; }
.pin-icon.drop { background: #FEE2E2; color: #DC2626; }

.quick-places-row {
  display: flex;
  gap: 8px;
  margin-bottom: 16px;
  overflow-x: auto;
  padding-bottom: 4px;
}
.quick-chip {
  padding: 6px 12px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-full);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: all var(--transition-fast);
}
.quick-chip:hover {
  background: var(--primary-light);
  border-color: var(--primary);
}

/* Vehicle Selection Card */
.vehicle-card {
  border: 2px solid var(--primary);
  background: #FFFDF0;
  border-radius: var(--radius-lg);
  padding: 14px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
  box-shadow: var(--shadow-sm);
}

.vehicle-info {
  display: flex;
  align-items: center;
  gap: 14px;
}

.vehicle-img {
  width: 48px;
  height: 48px;
  background: var(--primary);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
}

/* Payment Selector */
.payment-toggle-group {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin: 16px 0;
}

.payment-option-btn {
  border: 1.5px solid var(--border);
  background: #FFFFFF;
  border-radius: var(--radius-md);
  padding: 12px;
  text-align: center;
  cursor: pointer;
  font-weight: 600;
  font-size: 14px;
  transition: all var(--transition-fast);
}

.payment-option-btn.active {
  border-color: var(--text);
  background: var(--primary-light);
  color: var(--text);
  box-shadow: 0 0 0 1px var(--text);
}

/* Radar Animation for Driver Search */
.radar-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 30px 0;
  text-align: center;
}

.radar-circle {
  width: 90px;
  height: 90px;
  background: var(--primary);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 38px;
  position: relative;
  margin-bottom: 24px;
}

.radar-circle::before, .radar-circle::after {
  content: '';
  position: absolute;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: rgba(255, 214, 0, 0.4);
  animation: radar-pulse 2s infinite ease-out;
}

.radar-circle::after {
  animation-delay: 1s;
}

@keyframes radar-pulse {
  0% { transform: scale(1); opacity: 1; }
  100% { transform: scale(2.6); opacity: 0; }
}

/* OTP Display Card */
.otp-display-card {
  background: #111111;
  color: #FFFFFF;
  border-radius: var(--radius-lg);
  padding: 16px;
  margin: 14px 0;
  text-align: center;
}

.otp-boxes {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin: 10px 0;
}

.otp-digit {
  width: 46px;
  height: 52px;
  background: #222222;
  border: 2px solid var(--primary);
  color: var(--primary);
  font-size: 26px;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-md);
  letter-spacing: 2px;
}

/* Driver Details Card */
.driver-card {
  background: var(--surface);
  border-radius: var(--radius-lg);
  padding: 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}

.driver-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: #E0E0E0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
}

/* Rating Stars */
.star-rating {
  display: flex;
  gap: 10px;
  justify-content: center;
  font-size: 34px;
  cursor: pointer;
  margin: 16px 0;
}

.star-rating span {
  color: #D1D5DB;
  transition: color var(--transition-fast);
}

.star-rating span.active, .star-rating span:hover {
  color: #F59E0B;
}

/* History Side Drawer */
.history-drawer {
  position: fixed;
  top: 0;
  right: -420px;
  width: 400px;
  max-width: 100vw;
  height: 100vh;
  background: #FFFFFF;
  border-left: 1px solid var(--border);
  box-shadow: var(--shadow-xl);
  z-index: 2000;
  transition: right var(--transition-smooth);
  display: flex;
  flex-direction: column;
}

.history-drawer.open {
  right: 0;
}

@media (max-width: 768px) {
  .booking-panel {
    left: 0;
    right: 0;
    width: 100%;
    max-width: 100%;
    border-radius: var(--radius-xl) var(--radius-xl) 0 0;
    bottom: 0;
  }
}
