/* Ride sheet — "Locating a Caddie" / active-ride header.
   Redesigned for a balanced, centered, organized layout. Loaded last in
   index.html so it owns the final look over styles.css. */

body.ride-active .ride-sheet .sheet-header {
  display: flex !important;
  flex-direction: column;
  align-items: stretch;
  gap: 14px;
  position: relative;
  padding: 8px 22px 16px;
  margin: 0;
}

/* Cancel — a quiet link pinned to the top-right corner, out of the
   heading's way so the status reads as the clear focal point. */
body.ride-active .ride-sheet .sheet-cancel {
  position: absolute;
  top: 6px;
  right: 22px;
  z-index: 2;
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
  background: none;
  border: 0;
  padding: 4px 2px;
  cursor: pointer;
}
body.ride-active .ride-sheet .sheet-cancel:hover { color: var(--ink); }

/* Status — centered, balanced, one tight line (no all-caps sprawl). */
body.ride-active .ride-sheet .sheet-status-block {
  text-align: center;
  padding: 2px 56px 0;
}
body.ride-active .ride-sheet .sheet-status-block h3 {
  margin: 0;
  font-family: 'Inter', sans-serif;
  font-size: 18px;
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: -0.01em;
  text-transform: none;
  color: var(--ink);
}

/* Caddie-finding row — avatar + status pills, centered as a group. */
body.ride-active .ride-sheet .sheet-driver-row {
  display: flex !important;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 10px;
}
body.ride-active .ride-sheet .sheet-driver-row .sheet-avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  border: 2px solid var(--copper-soft);
}
body.ride-active .ride-sheet .sheet-summary-pills {
  display: flex !important;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
  margin: 0 !important;
}
body.ride-active .ride-sheet .sheet-pill {
  display: inline-flex !important;
  align-items: center;
  padding: 6px 12px !important;
  border-radius: 999px !important;
  background: rgba(184, 115, 51, 0.10) !important;
  border: 1px solid rgba(184, 115, 51, 0.20) !important;
  color: var(--accent-dark) !important;
  font-size: 12px !important;
  font-weight: 600 !important;
}

/* Route + ride reference — centered and quiet. */
body.ride-active .ride-sheet .sheet-summary-route {
  text-align: center;
  font-size: 13px;
  line-height: 1.4;
  color: var(--ink);
  opacity: 0.8;
}
body.ride-active .ride-sheet .sheet-ride-ref {
  text-align: center;
  font-size: 11px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  opacity: 0.45;
}

/* Collapsed — keep only the status line visible. */
body.ride-active .ride-sheet.collapsed .sheet-driver-row,
body.ride-active .ride-sheet.collapsed .sheet-summary-route,
body.ride-active .ride-sheet.collapsed .sheet-ride-ref {
  display: none !important;
}
body.ride-active .ride-sheet.collapsed .sheet-status-block {
  padding-bottom: 4px;
}

/* Expanded body — hide the detail rows that just repeat the centered header
   summary (caddie status + from/to route). Leaves the divider + fare
   breakdown (and the rating block when complete). Keeps the sheet from
   reading as the same address three times. */
body.ride-active .ride-sheet .sheet-body > .person-row,
body.ride-active .ride-sheet .sheet-body > #ride-cart,
body.ride-active .ride-sheet .sheet-body > #ride-pickup,
body.ride-active .ride-sheet .sheet-body > #ride-dropoff,
body.ride-active .ride-sheet .sheet-body > #ride-dropoff-label,
body.ride-active .ride-sheet .sheet-body > .label:nth-child(2),
body.ride-active .ride-sheet .sheet-body > .label:nth-child(4),
body.ride-active .ride-sheet .sheet-body > .label:nth-child(6) {
  display: none !important;
}
