.wait-arrive-sheet {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 5;
  display: none;
  flex-direction: column;
  width: 100%;
  height: var(--wait-arrive-sheet-height, 392px);
  overflow: hidden;
  padding-top: 28px;
  border-radius: 12px 12px 0 0;
  background: #fff;
  box-shadow: 0 -1px 0 rgba(0, 0, 0, 0.04);
  pointer-events: auto;
  transition:
    height 260ms cubic-bezier(0.22, 1, 0.36, 1),
    border-radius 260ms cubic-bezier(0.22, 1, 0.36, 1);
  will-change: height;
}

.wait-arrive-sheet.is-dragging {
  transition: none;
}

.wait-arrive-sheet.is-dragging .wait-arrive-sheet-handle {
  cursor: grabbing;
}

.page-wait-arrive .wait-arrive-sheet {
  display: flex;
}

.page-wait-arrive .wait-arrive-sheet > .wait-arrive-sheet-handle {
  z-index: 3;
}

.wa-scroll {
  display: flex;
  flex: 1 1 auto;
  min-height: 0;
  flex-direction: column;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 16px 16px max(24px, env(safe-area-inset-bottom));
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

.wa-scroll::-webkit-scrollbar {
  display: none;
}

.page-wait-arrive .ride-sheet,
.page-wait-arrive .checkout-bar,
.page-wait-arrive .pickup-sheet,
.page-wait-arrive .wait-match-sheet {
  display: none;
}

.page-wait-arrive .route-overlay {
  visibility: hidden;
}

.arrive-pickup-overlay {
  position: absolute;
  inset: 0;
  z-index: 3;
  pointer-events: none;
  visibility: hidden;
}

.has-map.page-wait-arrive .arrive-pickup-overlay {
  visibility: visible;
}

.arrive-driver-overlay {
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  visibility: hidden;
}

.has-map.page-wait-arrive .arrive-driver-overlay {
  visibility: visible;
}

.arrive-driver-marker {
  position: absolute;
  overflow: visible;
  transform: translate(-50%, -50%) rotate(7deg);
}

.page-wait-arrive .arrive-driver-marker__car {
  display: block;
  width: 28px;
  height: 52px;
  object-fit: contain;
  filter: drop-shadow(0 3px 8px rgba(0, 0, 0, 0.18));
}

.arrive-driver-marker__glow {
  display: none;
}

.page-wait-arrive .arrive-driver-marker.is-route-advancing {
  transition:
    left 1.35s cubic-bezier(0.22, 1, 0.36, 1),
    top 1.35s cubic-bezier(0.22, 1, 0.36, 1),
    transform 1.35s cubic-bezier(0.22, 1, 0.36, 1);
}

/* Pickup tooltip + marker — matches Stage 4 (find-driver) */
.page-wait-arrive .arrive-pickup-marker {
  position: absolute;
  display: inline-flex;
  align-items: center;
  gap: 0;
  transform: translate(calc(-100% + 11px), -50%);
}

.page-wait-arrive .arrive-pickup-label {
  position: relative;
  display: inline-flex;
  height: 28px;
  align-items: center;
  justify-content: center;
  padding: 0 10px;
  border-radius: 6px;
  color: #fff;
  background: #000;
  font-size: 14px;
  font-weight: 500;
  line-height: 1;
  white-space: nowrap;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.18);
}

.page-wait-arrive .arrive-pickup-label::after {
  content: "";
  position: absolute;
  top: 50%;
  right: -5px;
  width: 0;
  height: 0;
  border-top: 5px solid transparent;
  border-bottom: 5px solid transparent;
  border-left: 6px solid #000;
  transform: translateY(-50%);
}

.page-wait-arrive .arrive-pickup-dot {
  position: relative;
  display: block;
  flex: 0 0 auto;
  width: 22px;
  height: 22px;
  border: none;
  border-radius: 999px;
  background: #000;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.22);
}

.page-wait-arrive .arrive-pickup-dot::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 6px;
  height: 6px;
  transform: translate(-50%, -50%);
  border-radius: 999px;
  background: #fff;
}

.wa-scroll h2 {
  margin: 0 0 24px;
  color: #000;
  font-size: 24px;
  font-weight: 700;
  line-height: 1;
  text-align: center;
}

.driver-traffic-notice {
  display: none;
  min-height: 76px;
  align-items: center;
  gap: 14px;
  width: 100%;
  margin: 0 0 16px;
  padding: 17px 18px;
  border-radius: 6px;
  color: #000;
  background: #eef4ff;
  font-family:
    "Uber Move", ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont,
    "Segoe UI", sans-serif;
  font-size: 16px;
  font-weight: 500;
  line-height: 1.25;
}

.driver-traffic-notice.is-visible {
  display: flex;
}

.driver-traffic-icon {
  position: relative;
  flex: 0 0 auto;
  width: 28px;
  height: 28px;
  border-radius: 999px;
  background: #000;
}

.driver-traffic-icon::before,
.driver-traffic-icon::after {
  content: "";
  position: absolute;
  background: #fff;
}

.driver-traffic-icon::before {
  left: 12px;
  top: 6px;
  width: 4px;
  height: 11px;
  border-radius: 999px;
}

.driver-traffic-icon::after {
  left: 12px;
  top: 14px;
  width: 9px;
  height: 4px;
  border-radius: 999px;
}

.arrive-ride-details {
  appearance: none;
  -webkit-appearance: none;
  display: grid;
  grid-template-columns: 1fr 48px;
  align-items: start;
  width: 100%;
  min-height: 152px;
  margin: 0 0 16px;
  padding: 16px;
  border: 2px solid #e8e8e8;
  border-radius: 10px;
  color: #000;
  background: #fff;
  text-align: left;
}

.arrive-ride-copy {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 8px;
}

.arrive-card-eyebrow {
  font-size: 18px;
  font-weight: 400;
  line-height: 1;
}

.arrive-card-title {
  max-width: 260px;
  font-size: 23px;
  font-weight: 700;
  line-height: 1.22;
}

.arrive-more-button {
  display: grid;
  width: 48px;
  height: 48px;
  place-items: center;
  border-radius: 8px;
  background: #eeeeee;
  font-size: 28px;
  font-weight: 700;
  line-height: 1;
  letter-spacing: 1px;
}

.driver-card,
.team-cheer-card {
  width: 100%;
  border: 2px solid #e8e8e8;
  border-radius: 10px;
  background: #fff;
}

.driver-card {
  min-height: 196px;
  margin-bottom: 16px;
  padding: 16px 12px 16px;
}

.driver-hero {
  position: relative;
  display: grid;
  grid-template-columns: 150px 1fr;
  min-height: 70px;
  align-items: center;
}

.driver-avatar {
  position: absolute;
  left: 4px;
  top: -3px;
  z-index: 2;
  width: 52px;
  height: 52px;
  border-radius: 999px;
  object-fit: cover;
  box-shadow: 0 0 0 2px #fff;
}

.driver-rating {
  position: absolute;
  left: 4px;
  top: 31px;
  z-index: 3;
  display: grid;
  min-width: 46px;
  height: 24px;
  place-items: center;
  border-radius: 999px;
  color: #000;
  background: #fff;
  font-size: 13px;
  font-weight: 500;
  box-shadow: 0 1px 5px rgba(0, 0, 0, 0.16);
}

.driver-car {
  width: 132px;
  height: 61px;
  object-fit: contain;
  transform: translateX(34px);
}

.driver-plate {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 5px;
  justify-self: end;
  padding-right: 2px;
  white-space: nowrap;
}

.driver-plate strong {
  font-size: 25px;
  font-weight: 700;
  line-height: 1;
}

.driver-plate span {
  font-size: 14px;
  font-weight: 400;
  line-height: 1;
}

.driver-meta {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin: 4px 0 16px;
}

.driver-name {
  color: #000;
  font-size: 18px;
  font-weight: 500;
  line-height: 1;
}

.driver-trips {
  color: #777;
  font-size: 12px;
  font-weight: 400;
  line-height: 1;
}

.driver-actions {
  display: grid;
  grid-template-columns: 1fr 48px 48px;
  gap: 8px;
}

.driver-actions button {
  height: 44px;
  border: 0;
  border-radius: 6px;
  color: #000;
  background: #f5f3f5;
  font: inherit;
}

.driver-action-message {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 16px;
  font-weight: 500;
}

.driver-action-message img {
  width: 20px;
  height: 20px;
}

.driver-action-icon {
  display: grid;
  place-items: center;
  font-size: 22px;
  font-weight: 700;
}

.driver-action-icon img {
  width: 22px;
  height: 22px;
}

.team-cheer-card {
  min-height: 184px;
  padding: 16px;
}

.team-cheer-card h3 {
  margin: 0 0 4px;
  color: #000;
  font-size: 20px;
  font-weight: 700;
  line-height: 1;
}

.team-cheer-card p {
  margin: 0 0 34px;
  color: #686868;
  font-size: 14px;
  font-weight: 400;
  line-height: 1;
}

.team-poll {
  display: grid;
  grid-template-columns: 56px 1fr 56px;
  align-items: center;
  gap: 10px;
}

.team-logo {
  appearance: none;
  -webkit-appearance: none;
  display: grid;
  width: 56px;
  height: 56px;
  place-items: center;
  border: 0;
  border-radius: 999px;
  background: #eef0f3;
  overflow: hidden;
  cursor: pointer;
  transition:
    transform 180ms ease,
    box-shadow 180ms ease;
  touch-action: manipulation;
}

.team-logo:active,
.team-logo.is-cheering {
  transform: scale(1.08);
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.16);
}

.team-logo img {
  max-width: 46px;
  max-height: 48px;
  object-fit: contain;
}

.team-logo-right img {
  max-width: 52px;
}

.team-bar {
  position: relative;
  display: grid;
  grid-template-columns: var(--left-share, 68fr) var(--right-share, 32fr);
  gap: 4px;
  height: 34px;
  overflow: hidden;
  border-radius: 7px;
  color: #fff;
  background: #fff;
  transition: grid-template-columns 320ms cubic-bezier(0.22, 1, 0.36, 1);
}

.team-bar-left,
.team-bar-right {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 500;
  transition:
    font-size 220ms ease,
    transform 220ms ease;
}

.team-bar-left.is-boosted,
.team-bar-right.is-boosted {
  font-size: 16px;
  transform: scale(1.04);
}

.team-bar-left {
  background: #006c68;
}

.team-bar-right {
  background: #1859a9;
}

.team-labels {
  display: grid;
  grid-template-columns: 56px 1fr 56px;
  gap: 10px;
  margin-top: 7px;
  color: #246083;
  font-size: 12px;
  font-weight: 400;
  text-align: center;
}

.team-labels span:first-child {
  grid-column: 1;
}

.team-labels span:last-child {
  grid-column: 3;
}

.cheer-emoji {
  position: fixed;
  z-index: 30;
  left: var(--cheer-x);
  top: var(--cheer-y);
  transform: translate(-50%, -50%);
  font-size: 22px;
  line-height: 1;
  pointer-events: none;
  animation: cheer-float 950ms ease-out forwards;
}

@keyframes cheer-float {
  0% {
    opacity: 0;
    transform: translate(-50%, -20%) scale(0.72) rotate(-6deg);
  }

  18% {
    opacity: 1;
    transform: translate(-50%, -85%) scale(1.08) rotate(4deg);
  }

  100% {
    opacity: 0;
    transform: translate(calc(-50% + var(--cheer-drift, 0px)), -170%) scale(1.18)
      rotate(10deg);
  }
}

