/* Ride booking, offers and status pages. Builds on the --im-* tokens in
   inmotion-tugvan.css. */

.ride-page button { touch-action: manipulation; }
.ride-page .price, .ride-page .amt, .ride-offer input { font-variant-numeric: tabular-nums; }
.ride-page { background: var(--im-bg); padding: 40px 0 64px; }
.ride-page h1 { font-weight: 700; font-size: clamp(1.6rem, 3.4vw, 2.4rem); line-height: 1.15; margin: .75rem 0 .5rem; }
.ride-page .lead-sm { color: var(--im-muted); max-width: 46ch; }
.ride-card { background: var(--im-card); border-radius: var(--im-radius); box-shadow: var(--im-shadow); border: 1px solid #eeecf7; padding: 24px; }
.ride-card + .ride-card { margin-top: 16px; }
.ride-step-title { font-size: .78rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--im-muted); margin-bottom: .6rem; }

/* Route inputs with a vertical line joining the dots */
.ride-route { position: relative; }
.ride-route .ride-stop { position: relative; display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.ride-route .ride-dot { flex: 0 0 12px; height: 12px; border-radius: 50%; border: 3px solid var(--im-primary); background: #fff; z-index: 1; }
.ride-route .ride-dot.end { background: var(--im-primary); }
.ride-route .ride-dot.via { border-color: var(--im-muted); }
.ride-route::before { content: ""; position: absolute; left: 5px; top: 22px; bottom: 22px; width: 2px; background: #dcd7f3; }
.ride-route .form-control { height: 48px; border-radius: 10px; }
.ride-remove-stop { border: 0; background: transparent; color: var(--im-muted); font-size: 1.1rem; flex: 0 0 44px; height: 44px; border-radius: 10px; }
.ride-remove-stop:hover { background: var(--im-glass); color: var(--im-primary); }
.ride-link-btn { border: 0; background: transparent; color: var(--im-primary); font-weight: 600; padding: 8px 0; min-height: 44px; }
.ride-link-btn:hover { color: var(--im-primary-dark); }

.ride-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 12px; }
.ride-row label, #rideContactCard label { font-size: .85rem; font-weight: 600; margin-bottom: 4px; display: block; }

.ride-row .form-control, .ride-row .form-select { height: 48px; border-radius: 10px; background-color: #fff; color: var(--im-text); }
#rideContactCard .form-control { height: 48px; border-radius: 10px; }
.ride-page [aria-invalid="true"] { border-color: #c62828 !important; }
.ride-page .form-control, .ride-page .form-select { font-size: 16px; } /* smaller makes iPhones zoom in */

/* Vehicle class cards */
.ride-classes { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.ride-class { position: relative; border: 2px solid #eeecf7; border-radius: 12px; padding: 12px; cursor: pointer; background: #fff; text-align: left; transition: border-color .15s, box-shadow .15s; }
.ride-class:hover { border-color: #cfc6f7; }
.ride-class.active { border-color: var(--im-primary); box-shadow: 0 0 0 3px var(--im-glass); }
.ride-class.disabled { opacity: .45; cursor: not-allowed; }
.ride-class img { height: 34px; width: 60px; object-fit: contain; object-position: left; margin-bottom: 6px; }
.ride-class .name { font-weight: 700; display: block; }
.ride-class .meta { color: var(--im-muted); font-size: .8rem; }
.ride-class .price { font-weight: 700; color: var(--im-primary); margin-top: 4px; display: block; }

/* "Your offer" */
.ride-offer { display: flex; align-items: center; gap: 8px; }
.ride-offer .cur { font-weight: 700; font-size: 1.4rem; }
.ride-page .ride-offer input { font-size: 1.6rem; font-weight: 700; height: 56px; max-width: 220px; border-radius: 10px; }
.ride-offer-btn { width: 44px; height: 44px; border-radius: 50%; border: 2px solid var(--im-primary); background: #fff; color: var(--im-primary); font-weight: 700; font-size: 1.2rem; line-height: 1; }
.ride-hint { font-size: .85rem; color: var(--im-muted); }
.ride-error { color: #c62828; font-size: .9rem; min-height: 1.2em; }

.ride-summary-line { display: flex; gap: 10px; align-items: flex-start; margin-bottom: 8px; }
.ride-summary-line i { color: var(--im-primary); margin-top: 3px; }
.ride-chip { display: inline-flex; align-items: center; gap: 6px; background: var(--im-glass); color: var(--im-primary); border-radius: 999px; padding: .25rem .7rem; font-size: .82rem; font-weight: 600; margin: 0 6px 6px 0; }

/* Offers */
.ride-waiting { text-align: center; padding: 28px 12px; color: var(--im-muted); }
.ride-pulse { width: 14px; height: 14px; border-radius: 50%; background: var(--im-primary); display: inline-block; animation: ridePulse 1.4s infinite; margin-bottom: 8px; }
@keyframes ridePulse { 0% { box-shadow: 0 0 0 0 rgba(101,73,232,.5); } 70% { box-shadow: 0 0 0 16px rgba(101,73,232,0); } 100% { box-shadow: 0 0 0 0 rgba(101,73,232,0); } }
.ride-offer-card { border: 1px solid #eeecf7; border-radius: 12px; padding: 14px; margin-bottom: 12px; background: #fff; }
.ride-offer-card.accept-fare { border-color: #b9e6c9; background: #f6fdf8; }
.ride-offer-card .top { display: flex; align-items: center; gap: 12px; }
.ride-offer-card .logo { width: 44px; height: 44px; border-radius: 50%; object-fit: cover; background: var(--im-glass); display: flex; align-items: center; justify-content: center; color: var(--im-primary); font-weight: 700; flex: 0 0 44px; }
.ride-offer-card .who { flex: 1; min-width: 0; }
.ride-offer-card .who strong { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ride-offer-card .who small { color: var(--im-muted); }
.ride-offer-card .amt { text-align: right; }
.ride-offer-card .amt strong { font-size: 1.25rem; display: block; }
.ride-offer-card .tag { font-size: .75rem; font-weight: 700; }
.ride-offer-card .tag.ok { color: #1b7f3b; }
.ride-offer-card .tag.counter { color: #b26a00; }
.ride-offer-card .bar { height: 4px; background: #eeecf7; border-radius: 2px; margin: 12px 0; overflow: hidden; }
.ride-offer-card .bar span { display: block; height: 100%; background: var(--im-primary); transition: width .25s linear; }
.ride-offer-card .actions { display: flex; gap: 8px; flex-wrap: wrap; }
.ride-offer-card .actions .btn { flex: 1 1 140px; }
.ride-counter-form { display: flex; gap: 8px; margin-top: 10px; }
.ride-counter-form input { max-width: 160px; }
.ride-pending { font-size: .85rem; color: #b26a00; margin-top: 8px; }

/* Status steps */
.ride-steps { list-style: none; padding: 0; margin: 0; }
.ride-steps li { position: relative; padding: 0 0 18px 30px; color: var(--im-muted); }
.ride-steps li::before { content: ""; position: absolute; left: 6px; top: 4px; width: 12px; height: 12px; border-radius: 50%; border: 2px solid #cfc6f7; background: #fff; }
.ride-steps li::after { content: ""; position: absolute; left: 11px; top: 18px; bottom: 0; width: 2px; background: #eeecf7; }
.ride-steps li:last-child::after { display: none; }
.ride-steps li.done { color: var(--im-text); }
.ride-steps li.done::before { background: var(--im-primary); border-color: var(--im-primary); }
.ride-steps li.current { color: var(--im-text); font-weight: 700; }
.ride-steps li.current::before { border-color: var(--im-primary); box-shadow: 0 0 0 4px var(--im-glass); }
.ride-pay { display: flex; justify-content: space-between; padding: 6px 0; }
.ride-pay.total { border-top: 1px solid #eeecf7; margin-top: 6px; padding-top: 10px; font-weight: 700; font-size: 1.1rem; }
.ride-map { height: 280px; border-radius: 12px; background: #eeecf7; }

@media (max-width: 575px) {
  .ride-page { padding: 24px 0 48px; }
  .ride-card { padding: 18px; }
  .ride-offer input { max-width: 160px; }
  .ride-page .ride-offer .form-control { font-size: 1.6rem; }
}

/* ---------- Booking: one card, one step at a time, no scrolling ---------- */
.ride-page.ride-book { padding: 32px 0; min-height: calc(100vh - 80px); display: flex; align-items: center; }
.ride-book > .container { width: 100%; }
.ride-book-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 600px); gap: 56px; align-items: center; }
.ride-book-intro h1 { margin: 0 0 24px; font-weight: 800; }
.ride-book-intro .ride-summary-line { font-weight: 500; }
.ride-wizard { padding: 22px 26px 24px; border-radius: 24px; box-shadow: 0 24px 60px rgba(20, 10, 51, .14); }
.ride-wizard [hidden] { display: none !important; }
.ride-wizard-head { display: flex; align-items: center; gap: 14px; margin-bottom: 12px; }
.ride-back { display: inline-flex; align-items: center; gap: 2px; border: 0; background: #f3f0fe; color: #3f23c4; font-weight: 700; border-radius: 12px; min-height: 40px; padding: 0 14px 0 8px; }
.ride-back:hover { background: #e6dffd; }
.ride-progress { list-style: none; margin: 0; padding: 0; flex: 1; display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.ride-progress li { border-top: 4px solid #e6e2f5; padding-top: 5px; font-size: 13px; font-weight: 700; color: #6C6C76; line-height: 1.2; }
.ride-progress li.done, .ride-progress li.now { border-color: var(--im-primary); }
.ride-progress li.now { color: #3f23c4; }
.ride-trip-bar { display: flex; align-items: center; gap: 12px; background: #f8f7fc; border-radius: 12px; padding: 4px 14px; margin-bottom: 12px; }
.ride-trip-text { flex: 1; min-width: 0; font-size: 14px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ride-trip-bar .ride-link-btn { padding: 0; min-height: 36px; }
body.inmotion .ride-wizard .ride-step-h { font-size: 1.35rem !important; line-height: 1.25 !important; font-weight: 800; margin: 0 0 12px; color: #140a33; outline: none; }
.ride-wizard .ride-route .ride-stop { margin-bottom: 8px; }
.ride-wizard .ride-link-btn { min-height: 40px; padding: 4px 0; }
.ride-wizard .ride-row { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.ride-wizard #rideTimeWrap { grid-column: 1 / -1; }
.ride-wizard .ride-error { min-height: 0; }
.ride-wizard .ride-error:not(:empty) { margin-top: 8px; }
body.inmotion .ride-wizard .ride-next { display: flex; align-items: center; justify-content: center; width: 100%; height: 54px !important; margin: 14px 0 0; border-radius: 14px; font-size: 1.08rem; font-weight: 800; letter-spacing: 0; text-transform: none; }
.ride-wizard .ride-classes { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.ride-wizard .ride-class { padding: 10px; border-radius: 14px; touch-action: manipulation; }
.ride-wizard .ride-class img { height: 30px; margin-bottom: 4px; }
.ride-wizard .ride-class .name { font-size: 14px; line-height: 1.2; min-height: 2.4em; display: flex; align-items: center; }
.ride-wizard .ride-class .meta { font-size: 12.5px; display: block; line-height: 1.3; }
.ride-wizard .ride-class .price { font-size: 15px; margin-top: 2px; font-variant-numeric: lining-nums tabular-nums; }
.ride-wizard .ride-offer { justify-content: center; margin: 4px 0 12px; }
.ride-wizard .ride-hint { margin: 0 0 4px; text-align: center; }
.ride-wizard .ride-offer input { text-align: center; font-variant-numeric: lining-nums tabular-nums; }
.ride-details { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 12px; }
.ride-details .wide { grid-column: 1 / -1; }
.ride-wizard .ride-next + .ride-hint { margin-top: 8px; }

@media (max-width: 991.98px) {
  .ride-page.ride-book { padding: 14px 0 20px; align-items: flex-start; }
  .ride-book-grid { grid-template-columns: minmax(0, 1fr); gap: 12px; }
  .ride-book-intro ul { display: none; }
  body.inmotion .ride-book .ride-book-intro h1 { font-size: 1.3rem !important; margin: 0; }
  .ride-started .ride-book-intro { display: none; }
  .ride-wizard { padding: 14px 16px 16px; border-radius: 20px; }
  /* One row per vehicle: picture, name and seats, price */
  .ride-wizard .ride-classes { grid-template-columns: minmax(0, 1fr); gap: 6px; }
  .ride-wizard .ride-class { display: grid; grid-template-columns: 54px minmax(0, 1fr) auto; column-gap: 12px; align-items: center; padding: 5px 14px 5px 10px; min-height: 50px; }
  .ride-wizard .ride-class img { grid-row: 1 / span 2; width: 54px; height: 30px; margin: 0; }
  .ride-wizard .ride-class .name { grid-column: 2; min-height: 0; display: block; font-size: 15px; align-self: end; }
  .ride-wizard .ride-class .meta { grid-column: 2; font-size: 12.5px; align-self: start; }
  .ride-wizard .ride-class .price { grid-column: 3; grid-row: 1 / span 2; margin: 0; font-size: 16px; white-space: nowrap; }
}
@media (max-height: 700px) {
  .ride-page.ride-book { padding: 10px 0 14px; }
  .ride-wizard-head, .ride-trip-bar { margin-bottom: 8px; }
  body.inmotion .ride-wizard .ride-step-h { font-size: 1.15rem !important; margin-bottom: 8px; }
  .ride-details { gap: 6px 10px; }
  body.inmotion .ride-wizard .ride-next { height: 48px !important; margin-top: 10px; }
  .ride-wizard .ride-details .form-control, .ride-wizard .ride-row .form-control, .ride-wizard .ride-row .form-select, .ride-wizard .ride-route .form-control { height: 44px; min-height: 44px; }
}
@media (max-width: 991.98px) and (max-height: 700px) {
  .ride-wizard .ride-classes { gap: 4px; }
  .ride-wizard .ride-class { min-height: 46px; padding-top: 1px; padding-bottom: 1px; }
  .ride-wizard [data-ride-step="2"] .ride-step-h { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
}
@media (min-width: 992px) {
  /* Same box on every step, so nothing jumps */
  .ride-wizard { min-height: min(556px, calc(100vh - 110px)); display: flex; flex-direction: column; }
  .ride-wizard [data-ride-step] { flex: 1; display: flex; flex-direction: column; }
  body.inmotion .ride-wizard .ride-next { margin-top: auto; }
  .ride-wizard .ride-error:not(:empty) { margin-bottom: 8px; }
  .ride-wizard .ride-classes { flex: 1; grid-auto-rows: 1fr; }
  .ride-wizard .ride-class { display: flex; flex-direction: column; justify-content: center; }
  .ride-wizard .ride-class img { width: 100%; height: 44px; object-position: left; }
  .ride-wizard .ride-offer { margin: 34px 0 20px; }
  .ride-wizard .ride-offer input { height: 72px; max-width: 260px; }
  .ride-wizard .ride-offer-btn { width: 56px; height: 56px; font-size: 1.5rem; }
}

/* Same photo as the homepage */
.ride-page.ride-book { background: #140a33; position: relative; isolation: isolate; }
.ride-page.ride-book::before { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(90deg, rgba(20, 10, 51, .96) 0%, rgba(28, 14, 78, .88) 45%, rgba(63, 35, 196, .45) 100%), url("/images/inmotion/hero-2000.webp") 50% 90% / cover no-repeat; }
.ride-book-intro h1, .ride-book-intro .ride-summary-line { color: #fff; }
.ride-book-intro .ride-summary-line i { color: #FFD500; font-size: 1.25rem; }
.ride-book-intro .im-mark { background: none; color: #FFD500; padding: 0; display: block; }
@media (max-width: 991.98px) {
  .ride-page.ride-book::before { background-image: linear-gradient(rgba(20, 10, 51, .93), rgba(40, 20, 120, .72)), url("/images/inmotion/hero-900.webp"); }
  .ride-book-intro .im-mark { display: inline; }
}
@media (min-width: 992px) { body.inmotion .ride-book .ride-book-intro h1 { font-size: clamp(2.4rem, 4vw, 3.4rem) !important; line-height: 1.06 !important; letter-spacing: -.03em; color: #fff; } }
body.inmotion .ride-wizard .ride-next { letter-spacing: 0 !important; }
body.inmotion:has(.ride-book) .im-footer { margin-top: 0 !important; }
/* The stepper buttons replace the browser's tiny arrows */
.ride-offer input::-webkit-outer-spin-button, .ride-offer input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.ride-offer input { -moz-appearance: textfield; appearance: textfield; }
