/* Rider web app — mobile-first, public live map. */
* { box-sizing: border-box; }
html, body { height: 100%; margin: 0; }
body {
  font-family: system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  display: flex; flex-direction: column; color: #1f2733;
}

.rider-bar {
  flex: 0 0 auto; display: flex; align-items: center; justify-content: space-between;
  gap: .75rem; background: #0d4ea0; color: #fff;
  padding: .55rem .9rem; padding-top: calc(.55rem + env(safe-area-inset-top));
}
.rider-bar .brand { font-weight: 700; font-size: 1.05rem; }
.rider-bar .brand .tag { font-weight: 400; opacity: .85; font-size: .8rem; margin-left: .35rem; }
.rider-nav { display: flex; align-items: center; gap: .5rem; font-size: .9rem; }
.rider-nav a { color: #fff; text-decoration: none; padding: .3rem .6rem; border: 1px solid rgba(255,255,255,.5); border-radius: 5px; }
.rider-nav a:hover { background: rgba(255,255,255,.15); }

.rider-main { flex: 1 1 auto; min-height: 0; display: flex; flex-direction: column; }
.rider-map-wrap { flex: 1 1 auto; position: relative; min-height: 0; }
#map { position: absolute; inset: 0; }

/* control overlay (top of map) */
.rider-controls {
  position: absolute; top: 8px; left: 8px; right: 8px; z-index: 1000;
  background: rgba(255,255,255,.96); border-radius: 10px;
  box-shadow: 0 1px 6px rgba(0,0,0,.25); padding: .55rem .6rem;
  max-width: 520px;
}
.control-row { display: flex; gap: .5rem; }
.control-row select {
  flex: 1 1 auto; min-width: 0; padding: .5rem; border: 1px solid #ccc;
  border-radius: 6px; font-size: 1rem; background: #fff;
}
#locate-btn {
  flex: 0 0 auto; border: 0; border-radius: 6px; background: #0d4ea0; color: #fff;
  padding: .5rem .8rem; font-size: .95rem; cursor: pointer;
}
#locate-btn:active { background: #0a3d7c; }
.nearest { margin-top: .45rem; font-size: .85rem; color: #33404f; line-height: 1.3; }
.nearest .reg { font-weight: 700; }
.nearest .dist { font-weight: 700; color: #0d4ea0; }

/* ad banner pinned under the map */
.ad-banner {
  flex: 0 0 auto; height: 68px; background: #11161d;
  display: flex; align-items: center; justify-content: center; position: relative;
}
.ad-banner img { max-height: 60px; max-width: 100%; display: block; }
.ad-banner .ad-tag {
  position: absolute; top: 3px; left: 6px; font-size: .6rem; letter-spacing: .05em;
  color: #9aa6b4; text-transform: uppercase;
}

/* popup */
.popup-reg { font-weight: 700; }
.popup-rating { color: #b15a00; }
.pp-gone { color: #b71c1c; font-weight: 600; }
.seat-available { color: #1b5e20; }
.seat-full { color: #b71c1c; }
.seat-unknown { color: #555; }

/* check-in (popup) + toast */
.checkin-area { margin-top: .55rem; }
.checkin-btn {
  width: 100%; border: 0; border-radius: 6px; background: #0d4ea0; color: #fff;
  padding: .5rem; font-size: .95rem; cursor: pointer;
}
.checkin-btn:disabled { background: #8aa6cc; cursor: default; }
.checkin-signin { display: inline-block; color: #0d4ea0; font-weight: 600; text-decoration: none; }
.toast {
  position: absolute; left: 8px; right: 8px; bottom: 8px; z-index: 1200;
  padding: .65rem .8rem; border-radius: 8px; font-size: .9rem; text-align: center;
  box-shadow: 0 2px 10px rgba(0,0,0,.3);
}
.toast-ok { background: #1b5e20; color: #fff; }
.toast-err { background: #b71c1c; color: #fff; }

/* points + ride history */
.points { display: flex; align-items: baseline; gap: .4rem; margin: 1rem 0; }
.points-num { font-size: 2.4rem; font-weight: 800; color: #0d4ea0; line-height: 1; }
.points-label { color: #5b6573; font-size: 1rem; }
.account-box h2 { font-size: 1.05rem; margin: 1.1rem 0 .4rem; }
.ride-list { list-style: none; margin: 0; padding: 0; display: grid; gap: .6rem; }
.ride-list li { border: 1px solid #eef0f2; border-radius: 8px; padding: .6rem .7rem; }
.ride-main { display: flex; align-items: baseline; gap: .5rem; }
.ride-main .reg { font-weight: 700; }
.ride-main .label { color: #5b6573; font-size: .85rem; }
.ride-main .pt { margin-left: auto; color: #1b5e20; font-weight: 700; }
.ride-meta { color: #5b6573; font-size: .82rem; margin-top: .15rem; }
.rate-stub { margin-top: .5rem; font-size: .8rem; color: #8a94a2; background: #f4f5f7; border: 1px solid #e3e6ea; border-radius: 5px; padding: .3rem .6rem; cursor: not-allowed; }

.rate-slot { margin-top: .55rem; }
.rated { font-size: .85rem; color: #1b5e20; }
.rated .stars { color: #b15a00; letter-spacing: 1px; }
.rate-form { display: grid; gap: .45rem; background: #f7f8fa; border: 1px solid #eef0f2; border-radius: 6px; padding: .55rem; }
.rate-row { display: flex; gap: .6rem; }
.rate-row label { flex: 1 1 0; display: grid; gap: .2rem; font-size: .8rem; color: #5b6573; }
.rate-form select, .rate-form input { padding: .35rem; border: 1px solid #ccc; border-radius: 5px; font-size: .9rem; width: 100%; }
.rate-submit { justify-self: start; border: 0; border-radius: 6px; background: #0d4ea0; color: #fff; padding: .4rem .9rem; font-size: .9rem; cursor: pointer; }
.rate-submit:disabled { background: #8aa6cc; }
.rate-msg { font-size: .78rem; color: #b71c1c; }

/* auth + account content pages */
.rider-content { flex: 1 1 auto; min-height: 0; overflow: auto; padding: 1.25rem; display: flex; justify-content: center; align-items: flex-start; }
.auth-card, .account-box {
  background: #fff; width: 100%; max-width: 380px; border-radius: 10px;
  box-shadow: 0 1px 6px rgba(0,0,0,.12); padding: 1.4rem 1.3rem;
}
.auth-card h1, .account-box h1 { font-size: 1.3rem; margin: 0 0 .25rem; }
.auth-card .sub { color: #5b6573; font-size: .9rem; margin: 0 0 1rem; }
.auth-card label { display: grid; gap: .3rem; font-size: .85rem; color: #333; margin-top: .8rem; }
.auth-card input {
  padding: .6rem .55rem; border: 1px solid #ccc; border-radius: 6px; font-size: 1rem; width: 100%;
}
.auth-card .hint { color: #6b7280; font-size: .78rem; }
.auth-card button, .account-box .btn-secondary {
  margin-top: 1.1rem; width: 100%; padding: .65rem; border: 0; border-radius: 6px;
  background: #0d4ea0; color: #fff; font-size: 1rem; cursor: pointer;
}
.account-box .btn-secondary { background: #eceff1; color: #1f2733; margin-top: 1.25rem; }
.auth-card .alt { font-size: .85rem; margin: 1rem 0 0; text-align: center; }
.auth-card .alt a, .account-box a { color: #0d4ea0; }
.auth-error { background: #fdecea; color: #b71c1c; padding: .55rem .7rem; border-radius: 6px; font-size: .85rem; }
.account-box .muted { color: #5b6573; }

/* rider's own location marker label */
.rider-here {
  background: #0d4ea0; color: #fff; border-radius: 999px; padding: .1rem .5rem;
  font-size: .75rem; white-space: nowrap;
}
