/* Shared taxis.
 *
 * A darker, higher-contrast surface than the rest of the app, on purpose. Every other screen here
 * is planning — daylight, unhurried, read on a sofa. These are read outdoors, at night, on a phone
 * held at arm's length by somebody who has already started walking. So: bigger tap targets, fewer
 * words per line, and a palette that survives a bright screen against a dark street rather than one
 * that looks calm on a desktop.
 *
 * The one ornament is the pulse. It is not decoration — it is the difference between "somebody is
 * standing there now" and "somebody has posted a plan", which is the single fact this feature turns
 * on, and it has to be readable at a glance without a legend. Everything else is flat.
 *
 * Every animation here is opted out of under prefers-reduced-motion, at the bottom of the file. A
 * page of throbbing dots is not a neutral choice for somebody with vestibular sensitivity. */

.tx-live,
.tx-new,
.tx-detail {
  --tx-ink: #e8ecf3;
  --tx-ink-dim: #9aa6b8;
  --tx-surface: #141a24;
  --tx-surface-2: #1b2330;
  --tx-line: rgba(255, 255, 255, 0.09);
  --tx-live: #ffc93c;
  --tx-go: #34d399;
  --tx-bad: #f87171;

  color: var(--tx-ink);
  padding-bottom: 96px;
}

/* The page needs its own ground, not just its own ink.
 *
 * These screens are dark and the rest of the app is not, so without a surface of their own the
 * light text landed on the app's near-white background and the page read as broken — a dark map in
 * a white void with an invisible heading over it. The panel is pulled out past the content padding
 * so it reaches the edges on a phone, which is where it is actually read. */
.tx-live,
.tx-new,
.tx-detail {
  background: linear-gradient(180deg, #0f141d 0%, #131a25 100%);
  margin: -0.5rem -1rem 0;
  padding: 1rem 1rem 96px;
  min-height: calc(100dvh - var(--pt-topbar-height, 64px));
}

/* The detail page has no floating button, so the 96px reserved for one on the other two was just
   empty ground — and with a short taxi on screen it left most of a viewport of nothing under the
   content. It ends where it ends. */
.tx-detail {
  padding-bottom: 24px;
  min-height: 0;
  border-radius: 0 0 var(--pt-radius-lg, 20px) var(--pt-radius-lg, 20px);
}

/* Headings inside the panel are the panel's, not the app's: app.css styles h1/h5 for a light page
   and its colour would otherwise win on specificity and render them near-invisible here. */
.tx-live h1,
.tx-live h2,
.tx-new h1,
.tx-detail h1,
.tx-detail h2 {
  color: var(--tx-ink);
}

/* ── Shared atoms ─────────────────────────────────────────────────────────────────────────── */

.tx-title {
  font-size: 1.6rem;
  font-weight: 750;
  letter-spacing: -0.02em;
  margin: 0 0 4px;
  color: var(--tx-ink);
}

.tx-sub,
.tx-hint {
  color: var(--tx-ink-dim);
  font-size: 0.875rem;
  margin: 0 0 14px;
  line-height: 1.45;
}

.tx-h2 {
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--tx-ink-dim);
  margin: 22px 0 10px;
}

.tx-label {
  display: block;
  font-size: 0.75rem;
  font-weight: 650;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--tx-ink-dim);
  margin-bottom: 6px;
}

.tx-field { margin-bottom: 18px; }
.tx-field-tight { margin-bottom: 10px; }

.tx-input {
  width: 100%;
  background: var(--tx-surface-2);
  border: 1px solid var(--tx-line);
  border-radius: var(--pt-radius-sm);
  color: var(--tx-ink);
  padding: 13px 14px;
  font-size: 1rem;
  transition: border-color var(--pt-transition-fast), box-shadow var(--pt-transition-fast);
}

.tx-input::placeholder { color: var(--tx-ink-dim); opacity: 0.7; }

.tx-input:focus {
  outline: none;
  border-color: var(--pt-primary-light);
  box-shadow: 0 0 0 3px rgba(129, 140, 248, 0.22);
}

/* Buttons.
 *
 * 52px tall, which is larger than the app's own default and is the point: this is the only part of
 * the product operated while walking, and a 44px target that is fine seated is a mis-tap at a bus
 * stop in the cold. */
.tx-primary,
.tx-secondary,
.tx-danger {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  min-height: 52px;
  padding: 0 20px;
  border: none;
  border-radius: var(--pt-radius);
  font-size: 1rem;
  font-weight: 650;
  cursor: pointer;
  transition: transform var(--pt-transition-fast), box-shadow var(--pt-transition-fast),
              background var(--pt-transition-fast);
}

.tx-primary {
  background: linear-gradient(135deg, var(--pt-primary) 0%, var(--pt-violet) 100%);
  color: #fff;
  box-shadow: var(--pt-shadow-primary);
}

.tx-primary:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: var(--pt-shadow-primary-hover);
}

.tx-primary:active:not(:disabled) { transform: translateY(0) scale(0.99); }

.tx-primary:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  box-shadow: none;
}

.tx-secondary {
  background: var(--tx-surface-2);
  color: var(--tx-ink);
  border: 1px solid var(--tx-line);
}

.tx-danger {
  background: transparent;
  color: var(--tx-bad);
  border: 1px solid rgba(248, 113, 113, 0.35);
}

.tx-actions,
.tx-detail-actions {
  display: flex;
  gap: 10px;
  margin-top: 20px;
}

.tx-actions .tx-secondary { flex: 0 0 38%; }

.tx-link {
  background: none;
  border: none;
  color: var(--pt-primary-lighter);
  font-weight: 650;
  cursor: pointer;
  padding: 0;
  text-decoration: underline;
}

.tx-back {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: var(--pt-radius-full);
  background: var(--tx-surface-2);
  color: var(--tx-ink);
  border: 1px solid var(--tx-line);
  text-decoration: none;
}

.tx-back-inline {
  width: auto;
  gap: 6px;
  padding: 0 14px 0 8px;
  margin-bottom: 14px;
  font-size: 0.875rem;
  font-weight: 600;
}

.tx-alert {
  border-radius: var(--pt-radius-sm);
  padding: 12px 14px;
  font-size: 0.875rem;
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.tx-alert-bad { background: rgba(248, 113, 113, 0.12); color: #fecaca; }
.tx-alert-info { background: rgba(99, 102, 241, 0.14); color: #c7d2fe; }

.tx-disclaimer {
  margin-top: 18px;
  font-size: 0.75rem;
  line-height: 1.5;
  color: var(--tx-ink-dim);
  text-align: center;
  padding: 0 8px;
}

/* The spinner every busy button shares. */
.tx-spin {
  width: 15px;
  height: 15px;
  border: 2px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  animation: tx-spin 0.7s linear infinite;
  display: inline-block;
  flex: none;
}

@keyframes tx-spin { to { transform: rotate(360deg); } }

/* ── Create ───────────────────────────────────────────────────────────────────────────────── */

.tx-new-head {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 18px;
}

.tx-new-steps { display: flex; gap: 6px; flex: 1; }

.tx-new-step {
  height: 3px;
  flex: 1;
  border-radius: var(--pt-radius-full);
  background: var(--tx-line);
  transition: background var(--pt-transition);
}

.tx-new-step.on { background: var(--pt-primary-light); }

/* Each screen arrives rather than appearing, which is what makes a two-step form feel like one
   motion instead of two page loads. */
.tx-screen { animation: tx-rise 0.32s cubic-bezier(0.22, 1, 0.36, 1) both; }

@keyframes tx-rise {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: none; }
}

/* The two ends of the journey, joined by a rail so they read as one thing. */
.tx-route { position: relative; margin-bottom: 18px; }

.tx-route-rail {
  position: absolute;
  left: 17px;
  top: 44px;
  bottom: 30px;
  width: 2px;
  background: linear-gradient(180deg, var(--pt-primary-light), transparent 92%);
  opacity: 0.55;
}

.tx-route-row + .tx-route-row { margin-top: 12px; }

.tx-place {
  position: relative;
  display: flex;
  align-items: center;
  background: var(--tx-surface-2);
  border: 1px solid var(--tx-line);
  border-radius: var(--pt-radius-sm);
  transition: border-color var(--pt-transition-fast), box-shadow var(--pt-transition-fast);
}

.tx-place:focus-within {
  border-color: var(--pt-primary-light);
  box-shadow: 0 0 0 3px rgba(129, 140, 248, 0.22);
}

.tx-place-set { border-color: rgba(52, 211, 153, 0.4); }

.tx-place-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  flex: none;
  color: var(--tx-ink-dim);
}

.tx-place-set .tx-place-icon { color: var(--tx-go); }

.tx-place-input {
  flex: 1;
  min-width: 0;
  background: none;
  border: none;
  color: var(--tx-ink);
  font-size: 1rem;
  padding: 14px 8px 14px 0;
}

.tx-place-input:focus { outline: none; }
.tx-place-input::placeholder { color: var(--tx-ink-dim); opacity: 0.7; }

.tx-place-locate {
  flex: none;
  width: 44px;
  height: 44px;
  margin-right: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: none;
  border: none;
  border-radius: var(--pt-radius-full);
  color: var(--pt-primary-lighter);
  cursor: pointer;
}

.tx-place-locate:active { background: rgba(255, 255, 255, 0.06); }

.tx-place-error { color: var(--tx-bad); font-size: 0.8rem; margin: 6px 0 0; }

/* Luggage: "nothing" beside the four size chips, because it is a real answer and does not belong
   inside a scale of sizes. */
.tx-luggage { display: flex; flex-direction: column; gap: 10px; }

.tx-luggage-none {
  align-self: flex-start;
  padding: 8px 16px;
  border-radius: var(--pt-radius-full);
  background: var(--tx-surface-2);
  border: 1px solid var(--tx-line);
  color: var(--tx-ink-dim);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--pt-transition-fast);
}

.tx-luggage-none.on {
  background: rgba(99, 102, 241, 0.18);
  border-color: var(--pt-primary-light);
  color: #fff;
}

.tx-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 20px; }

.tx-chip {
  padding: 11px 18px;
  border-radius: var(--pt-radius-full);
  background: var(--tx-surface-2);
  border: 1px solid var(--tx-line);
  color: var(--tx-ink-dim);
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--pt-transition-fast);
}

.tx-chip-sm { padding: 7px 14px; font-size: 0.8rem; }

.tx-chip.on {
  background: linear-gradient(135deg, var(--pt-primary) 0%, var(--pt-violet) 100%);
  border-color: transparent;
  color: #fff;
  box-shadow: var(--pt-shadow-primary);
}

.tx-stepper { display: flex; gap: 8px; }

.tx-stepper-btn {
  flex: 1;
  min-height: 48px;
  border-radius: var(--pt-radius-sm);
  background: var(--tx-surface-2);
  border: 1px solid var(--tx-line);
  color: var(--tx-ink-dim);
  font-weight: 650;
  cursor: pointer;
  transition: all var(--pt-transition-fast);
}

.tx-stepper-btn.on {
  background: rgba(99, 102, 241, 0.2);
  border-color: var(--pt-primary-light);
  color: #fff;
}

.tx-fare { display: flex; align-items: center; gap: 10px; }

.tx-fare-input {
  flex: 1;
  min-width: 0;
  background: var(--tx-surface-2);
  border: 1px solid var(--tx-line);
  border-radius: var(--pt-radius-sm);
  color: var(--tx-ink);
  padding: 14px;
  font-size: 1.35rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.tx-fare-input:focus {
  outline: none;
  border-color: var(--pt-primary-light);
  box-shadow: 0 0 0 3px rgba(129, 140, 248, 0.22);
}

.tx-fare-unit { color: var(--tx-ink-dim); font-weight: 650; }

/* The split table: the reason anybody is on this screen, so it is drawn as the answer rather than
   as a footnote under the price field. */
.tx-split {
  margin-top: 12px;
  background: var(--tx-surface-2);
  border: 1px solid var(--tx-line);
  border-radius: var(--pt-radius-sm);
  overflow: hidden;
}

.tx-split-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 14px;
}

.tx-split-row + .tx-split-row { border-top: 1px solid var(--tx-line); }

.tx-split-heads { display: flex; gap: 3px; flex: none; width: 54px; }

.tx-split-head {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--pt-primary-light);
  opacity: 0.85;
}

.tx-split-each {
  flex: 1;
  font-weight: 700;
  font-size: 1.05rem;
  font-variant-numeric: tabular-nums;
}

.tx-split-each small { font-size: 0.7rem; font-weight: 600; color: var(--tx-ink-dim); }

.tx-split-save {
  color: var(--tx-go);
  font-weight: 650;
  font-size: 0.85rem;
  font-variant-numeric: tabular-nums;
}

.tx-switch {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--tx-ink-dim);
  cursor: pointer;
}

.tx-switch input { width: 17px; height: 17px; accent-color: var(--pt-primary); }

/* ── Live map ─────────────────────────────────────────────────────────────────────────────── */

.tx-live-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.tx-live-title {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 1.35rem;
  font-weight: 750;
  letter-spacing: -0.02em;
  margin: 0;
}

/* The "we are live" dot beside the title. Slow enough to read as a heartbeat rather than a
   notification badge demanding to be dismissed. */
.tx-live-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--tx-live);
  box-shadow: 0 0 0 0 rgba(255, 201, 60, 0.65);
  animation: tx-beat 2.4s ease-out infinite;
}

@keyframes tx-beat {
  0%   { box-shadow: 0 0 0 0 rgba(255, 201, 60, 0.6); }
  70%  { box-shadow: 0 0 0 11px rgba(255, 201, 60, 0); }
  100% { box-shadow: 0 0 0 0 rgba(255, 201, 60, 0); }
}

.tx-live-sub { color: var(--tx-ink-dim); font-size: 0.85rem; margin: 3px 0 0; }

.tx-live-toggle {
  display: flex;
  flex: none;
  background: var(--tx-surface-2);
  border: 1px solid var(--tx-line);
  border-radius: var(--pt-radius-full);
  padding: 3px;
}

.tx-live-toggle button {
  border: none;
  background: none;
  color: var(--tx-ink-dim);
  font-size: 0.8rem;
  font-weight: 650;
  padding: 7px 14px;
  border-radius: var(--pt-radius-full);
  cursor: pointer;
  transition: all var(--pt-transition-fast);
}

.tx-live-toggle button.on { background: var(--pt-primary); color: #fff; }

.tx-live-filters {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}

.tx-radius { display: flex; gap: 6px; flex-wrap: wrap; }

.tx-map-frame {
  position: relative;
  height: 340px;
  border-radius: var(--pt-radius-lg);
  overflow: hidden;
  border: 1px solid var(--tx-line);
  margin-bottom: 16px;
}

.tx-map { position: absolute; inset: 0; }

.tx-hidden { display: none; }

.tx-map-skeleton,
.tx-card-ghost {
  position: relative;
  overflow: hidden;
  background: var(--tx-surface-2);
}

.tx-map-skeleton { position: absolute; inset: 0; }

.tx-map-shimmer {
  position: absolute;
  inset: 0;
  background: linear-gradient(100deg, transparent 20%, rgba(255, 255, 255, 0.07) 50%, transparent 80%);
  animation: tx-shimmer 1.5s linear infinite;
}

@keyframes tx-shimmer {
  from { transform: translateX(-100%); }
  to   { transform: translateX(100%); }
}

.tx-recentre {
  position: absolute;
  right: 12px;
  bottom: 12px;
  width: 42px;
  height: 42px;
  border-radius: var(--pt-radius-full);
  background: rgba(20, 26, 36, 0.92);
  border: 1px solid var(--tx-line);
  color: var(--tx-ink);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  backdrop-filter: blur(8px);
}

/* Map markers.
 *
 * Built in taxi.js as DOM elements rather than as GL symbol layers precisely so the pulse can be a
 * CSS animation: the alternative is repainting the map every frame to fake one. */
.tx-pin {
  position: relative;
  width: 30px;
  height: 30px;
  padding: 0;
  border: none;
  background: none;
  cursor: pointer;
}

.tx-pin-dot {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: #64748b;
  color: #fff;
  font-size: 0.75rem;
  font-weight: 750;
  border: 2px solid rgba(255, 255, 255, 0.9);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.45);
  transition: transform var(--pt-transition-spring);
}

.tx-pin:hover .tx-pin-dot { transform: scale(1.12); }

/* Amber and pulsing = somebody is standing there right now. Grey and still = a plan for later.
   This is the whole legend and it has to work without one. */
.tx-pin-live .tx-pin-dot { background: var(--tx-live); color: #1a1205; }

/* Already flagging a car down. Green, and the pulse runs faster: this one is about to stop being
   available, which is the opposite of what a slow heartbeat says. */
.tx-pin-hailing .tx-pin-dot { background: var(--tx-go); color: #04251a; }
.tx-pin-hailing .tx-pin-pulse {
  background: rgba(52, 211, 153, 0.5);
  animation: tx-ping 1.1s cubic-bezier(0, 0, 0.2, 1) infinite;
}

.tx-pin-pulse {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  opacity: 0;
}

.tx-pin-live .tx-pin-pulse {
  background: rgba(255, 201, 60, 0.45);
  animation: tx-ping 1.9s cubic-bezier(0, 0, 0.2, 1) infinite;
}

@keyframes tx-ping {
  0%   { transform: scale(1);   opacity: 0.7; }
  80%  { transform: scale(2.6); opacity: 0; }
  100% { transform: scale(2.6); opacity: 0; }
}

/* Where the reader is. Blue, so it never competes with the amber that means "a person". */
.tx-me { position: relative; width: 18px; height: 18px; }

.tx-me-dot {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: #3b82f6;
  border: 2.5px solid #fff;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
}

.tx-me-ring {
  position: absolute;
  inset: -6px;
  border-radius: 50%;
  background: rgba(59, 130, 246, 0.28);
  animation: tx-breathe 3s ease-in-out infinite;
}

@keyframes tx-breathe {
  0%, 100% { transform: scale(0.85); opacity: 0.5; }
  50%      { transform: scale(1.15); opacity: 0.2; }
}

/* ── Cards ────────────────────────────────────────────────────────────────────────────────── */

.tx-list { display: flex; flex-direction: column; gap: 10px; }

.tx-card,
.tx-detail-card {
  background: var(--tx-surface);
  border: 1px solid var(--tx-line);
  border-radius: var(--pt-radius);
  padding: 14px;
  transition: border-color var(--pt-transition-fast), transform var(--pt-transition-fast);
}

.tx-card-ghost { height: 118px; border-radius: var(--pt-radius); }

.tx-card-live { border-color: rgba(255, 201, 60, 0.3); }

.tx-card-on {
  border-color: var(--pt-primary-light);
  box-shadow: 0 0 0 3px rgba(129, 140, 248, 0.18);
}

.tx-card-route { position: relative; padding-left: 20px; }

.tx-card-rail {
  position: absolute;
  left: 4px;
  top: 8px;
  bottom: 8px;
  width: 2px;
  background: linear-gradient(180deg, var(--tx-go), var(--pt-primary-light));
  border-radius: var(--pt-radius-full);
}

.tx-card-rail::before,
.tx-card-rail::after {
  content: '';
  position: absolute;
  left: -3px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--tx-go);
}

.tx-card-rail::before { top: -3px; }
.tx-card-rail::after { bottom: -3px; background: var(--pt-primary-light); }

.tx-card-ends { display: flex; flex-direction: column; gap: 5px; }

.tx-card-end {
  font-size: 0.95rem;
  font-weight: 620;
  line-height: 1.3;
  /* Two lines, then clipped. An address is recognised by its first few words and a card that grows
     to fit one long one pushes the next three off the screen. */
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.tx-card-end-to { color: var(--tx-ink-dim); }

.tx-card-meta { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }

.tx-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  border-radius: var(--pt-radius-full);
  background: rgba(255, 255, 255, 0.06);
  font-size: 0.75rem;
  font-weight: 620;
  color: var(--tx-ink-dim);
}

.tx-badge-live { background: rgba(255, 201, 60, 0.16); color: var(--tx-live); }
.tx-badge-good { background: rgba(52, 211, 153, 0.15); color: var(--tx-go); }
.tx-badge-quiet { background: rgba(255, 255, 255, 0.05); }

/* Already flagging a car down. Green rather than amber: amber means "somebody is standing there",
   and this is a step past that — they are in the road with an arm out and about to be gone. */
.tx-badge-hailing { background: rgba(52, 211, 153, 0.18); color: var(--tx-go); }

/* A sweep, matching the radar on the detail page, so the same activity reads the same way
   wherever it appears. */
.tx-badge-radar {
  position: relative;
  width: 11px;
  height: 11px;
  flex: none;
  border-radius: 50%;
  border: 1.5px solid currentColor;
  opacity: 0.4;
}

.tx-badge-radar::after {
  content: '';
  position: absolute;
  inset: -1.5px;
  border-radius: 50%;
  border: 1.5px solid transparent;
  border-top-color: currentColor;
  opacity: 2.5;
  animation: tx-spin 1.2s linear infinite;
}

.tx-badge-pulse {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
  animation: tx-blink 1.5s ease-in-out infinite;
}

@keyframes tx-blink { 0%, 100% { opacity: 1; } 50% { opacity: 0.25; } }

.tx-card-note {
  margin: 10px 0 0;
  font-size: 0.83rem;
  color: var(--tx-ink-dim);
  line-height: 1.45;
}

.tx-card-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--tx-line);
}

.tx-who { display: flex; align-items: center; gap: 9px; min-width: 0; }

.tx-who-photo {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  object-fit: cover;
  flex: none;
  background: var(--tx-surface-2);
}

.tx-who-initial {
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  color: var(--tx-ink-dim);
  border: 1px solid var(--tx-line);
}

.tx-who-text { display: flex; flex-direction: column; min-width: 0; }

.tx-who-name {
  font-size: 0.875rem;
  font-weight: 650;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.tx-who-sub {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.75rem;
  color: var(--tx-ink-dim);
}

.tx-who-star { color: var(--tx-live); }
.tx-who-count { opacity: 0.7; }
.tx-who-seats { white-space: nowrap; }

.tx-card-action { display: flex; align-items: center; gap: 10px; flex: none; }

.tx-price {
  font-size: 0.85rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  color: var(--tx-ink);
}

.tx-join {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 40px;
  padding: 0 16px;
  border: none;
  border-radius: var(--pt-radius-full);
  background: linear-gradient(135deg, var(--pt-primary) 0%, var(--pt-violet) 100%);
  color: #fff;
  font-size: 0.85rem;
  font-weight: 650;
  cursor: pointer;
  text-decoration: none;
  white-space: nowrap;
  transition: transform var(--pt-transition-fast), box-shadow var(--pt-transition-fast);
}

.tx-join:hover:not(:disabled) { transform: translateY(-1px); box-shadow: var(--pt-shadow-primary); }
.tx-join:disabled { opacity: 0.5; cursor: not-allowed; }
.tx-join-in { background: rgba(52, 211, 153, 0.18); color: var(--tx-go); }

/* Joining a group that is already flagging a car is a different urgency, and the button says so. */
.tx-join-now { background: linear-gradient(135deg, #34d399 0%, #059669 100%); }

.tx-state { font-size: 0.8rem; font-weight: 620; color: var(--tx-ink-dim); white-space: nowrap; }
.tx-state-off { opacity: 0.6; }

.tx-empty { text-align: center; padding: 44px 20px; }
.tx-empty-art { display: block; width: 72px; margin: 0 auto 14px; color: var(--tx-ink-dim); opacity: 0.5; }
.tx-empty-title { font-weight: 650; margin: 0 0 4px; }
.tx-empty-text { color: var(--tx-ink-dim); font-size: 0.875rem; margin: 0 0 16px; }

/* The one action that always applies, parked where a thumb already is. */
.tx-fab {
  position: fixed;
  right: 16px;
  bottom: calc(80px + env(safe-area-inset-bottom, 0px));
  z-index: 40;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 20px;
  border-radius: var(--pt-radius-full);
  background: linear-gradient(135deg, var(--pt-primary) 0%, var(--pt-violet) 100%);
  color: #fff;
  font-weight: 700;
  text-decoration: none;
  box-shadow: var(--pt-shadow-primary-hover);
}

.tx-fab:hover { color: #fff; transform: translateY(-1px); }

/* ── Detail ───────────────────────────────────────────────────────────────────────────────── */

.tx-split-now {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--tx-line);
  flex-wrap: wrap;
}

.tx-split-now-text { font-weight: 700; font-size: 1rem; }
.tx-split-now-save { color: var(--tx-go); font-weight: 650; font-size: 0.85rem; }

.tx-riders { display: flex; flex-direction: column; gap: 8px; }

.tx-rider {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--tx-surface);
  border: 1px solid var(--tx-line);
  border-radius: var(--pt-radius-sm);
  padding: 10px 12px;
}

.tx-rider-compact { background: none; border: none; padding: 0; flex: 1; min-width: 0; }

.tx-rider-pending {
  flex-wrap: wrap;
  border-color: rgba(255, 201, 60, 0.28);
  background: rgba(255, 201, 60, 0.05);
}

.tx-rider-text { display: flex; flex-direction: column; min-width: 0; }
.tx-rider-name { font-size: 0.9rem; font-weight: 650; display: flex; align-items: center; gap: 7px; }

.tx-rider-tag {
  font-size: 0.62rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 2px 6px;
  border-radius: var(--pt-radius-xs);
  background: rgba(99, 102, 241, 0.22);
  color: var(--pt-primary-lighter);
}

.tx-rider-sub { display: flex; align-items: center; gap: 8px; font-size: 0.75rem; color: var(--tx-ink-dim); }
.tx-rider-pickup { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* The number itself, under the name. Tabular figures because a column of phone numbers that do not
   line up is harder to read than one that does, and selectable because copying by hand is the
   fallback everybody already knows. */
.tx-rider-phone {
  margin-top: 2px;
  font-size: 0.8rem;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.02em;
  color: var(--tx-ink);
  user-select: text;
  -webkit-user-select: text;
  white-space: nowrap;
}

.tx-rider-decide { display: flex; gap: 8px; flex: none; }

.tx-rider-phone-actions { display: flex; align-items: center; gap: 6px; flex: none; margin-left: auto; }

/* Copy sits beside the call button rather than replacing it: dialling and saving are different
   errands and neither is rare at a kerb. */
.tx-rider-copy {
  flex: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  padding: 0;
  border: 1px solid var(--tx-line);
  border-radius: var(--pt-radius-full);
  background: var(--tx-surface-2);
  color: var(--tx-ink-dim);
  cursor: pointer;
  transition: background var(--pt-transition-fast), color var(--pt-transition-fast);
}

.tx-rider-copy:hover { background: var(--tx-surface); color: var(--tx-ink); }

.tx-rider-copied {
  background: rgba(52, 211, 153, 0.15);
  border-color: rgba(52, 211, 153, 0.35);
  color: var(--tx-go);
}

/* A tap-to-call, shown only between people who are actually in the car. Big enough to hit with a
   thumb while walking, which is when it is used. */
.tx-rider-call {
  flex: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: var(--pt-radius-full);
  background: rgba(52, 211, 153, 0.15);
  color: var(--tx-go);
  text-decoration: none;
  transition: background var(--pt-transition-fast);
}

.tx-rider-call:hover { background: rgba(52, 211, 153, 0.28); color: var(--tx-go); }

/* The taxi tag on a history card, so a trip in the Moje section says what kind it was. */
.tx-mine-kind {
  font-size: 0.62rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 2px 6px;
  border-radius: var(--pt-radius-xs);
  background: rgba(255, 201, 60, 0.18);
  color: #ffc93c;
}

/* Lets a long address wrap instead of pushing the price off the card. */
.tx-mine-card-main { min-width: 0; }

/* The whole card is the link, so it needs the affordance a button used to carry: it lifts on
   hover and keeps its own text colours rather than turning link-blue. */
.tx-mine-card {
  display: block;
  color: inherit;
  transition: transform var(--pt-transition-fast), border-color var(--pt-transition-fast);
}

.tx-mine-card:hover { color: inherit; transform: translateY(-2px); border-color: var(--pt-primary); }

.tx-mine-card:focus-visible { outline: 2px solid var(--pt-primary); outline-offset: 2px; }

/* Sits beside the back link at the top of a taxi. */
.tx-share {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin: 0 0 14px 8px;
  padding: 0 14px;
  height: 40px;
  border-radius: var(--pt-radius-full);
  background: var(--tx-surface-2);
  border: 1px solid var(--tx-line);
  color: var(--tx-ink);
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
}

.tx-share:hover { border-color: var(--pt-primary-light); }

.tx-history-link {
  display: inline-block;
  margin: -8px 0 16px;
  font-size: 0.8rem;
  font-weight: 650;
  color: var(--pt-primary-lighter);
  text-decoration: none;
}

.tx-history-link:hover { color: #c7d2fe; }

.tx-mini {
  min-height: 38px;
  padding: 0 15px;
  border-radius: var(--pt-radius-full);
  font-size: 0.83rem;
  font-weight: 650;
  cursor: pointer;
  border: 1px solid var(--tx-line);
  background: var(--tx-surface-2);
  color: var(--tx-ink-dim);
}

.tx-mini-yes { background: var(--tx-go); border-color: transparent; color: #06281d; }
.tx-mini-no { color: var(--tx-ink-dim); }

.tx-pending-note { font-size: 0.85rem; color: var(--tx-ink-dim); margin: 4px 0 0; }

/* The panel somebody who is not in the taxi acts from. Given a ground of its own because it is the
   one thing on this page they can do, and it sits below a wall of read-only detail. */
.tx-join-panel {
  background: var(--tx-surface);
  border: 1px solid var(--tx-line);
  border-radius: var(--pt-radius);
  padding: 16px;
  margin-top: 16px;
}

.tx-join-panel .tx-stepper { margin-bottom: 12px; }

.tx-join-price {
  margin: 0 0 12px;
  font-size: 1rem;
  font-weight: 700;
}

.tx-join-waiting {
  margin: 0 0 12px;
  font-size: 0.9rem;
  font-weight: 620;
  color: var(--tx-ink-dim);
}

/* The settle-up panel. Green rather than the page's indigo, because it is the one moment on this
   screen that is about money arriving rather than a car being found. */
.tx-settle {
  background: linear-gradient(135deg, rgba(52, 211, 153, 0.12), rgba(52, 211, 153, 0.04));
  border: 1px solid rgba(52, 211, 153, 0.32);
  border-radius: var(--pt-radius);
  padding: 16px;
  margin-top: 16px;
}

.tx-settle .tx-h2 { color: var(--tx-go); margin-top: 0; }

.tx-settle-amount {
  margin: 0 0 6px;
  font-size: 1.35rem;
  font-weight: 750;
  font-variant-numeric: tabular-nums;
}

/* ── The hunt for an actual car ───────────────────────────────────────────────────────────── */

.tx-hail {
  background: var(--tx-surface);
  border: 1px solid var(--tx-line);
  border-radius: var(--pt-radius);
  padding: 16px;
  margin-top: 8px;
}

.tx-hail-live {
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 650;
  margin-bottom: 10px;
}

/* A sweep rather than a spinner: this is a group of people scanning a street, and it runs for
   minutes rather than for the moment a request is in flight. */
.tx-hail-radar {
  position: relative;
  width: 26px;
  height: 26px;
  flex: none;
  border-radius: 50%;
  border: 2px solid rgba(255, 201, 60, 0.35);
}

.tx-hail-radar::after {
  content: '';
  position: absolute;
  inset: -2px;
  border-radius: 50%;
  border: 2px solid transparent;
  border-top-color: var(--tx-live);
  animation: tx-spin 1.4s linear infinite;
}

.tx-plate-entry { display: flex; gap: 8px; margin-top: 12px; align-items: stretch; }

.tx-plate-input {
  flex: 1;
  min-width: 0;
  text-transform: uppercase;
  font-weight: 700;
  letter-spacing: 0.06em;
}

.tx-plate-entry .tx-primary { width: auto; flex: none; padding: 0 18px; }

/* The found car. Loudest thing on the page, because at this moment it is the only thing anybody
   opened the app to see, and they are reading it while walking. */
.tx-plate-found {
  background: linear-gradient(135deg, rgba(52, 211, 153, 0.16), rgba(52, 211, 153, 0.05));
  border: 1px solid rgba(52, 211, 153, 0.4);
  border-radius: var(--pt-radius);
  padding: 18px;
  text-align: center;
  margin-bottom: 16px;
  animation: tx-pop 0.4s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}

@keyframes tx-pop {
  from { opacity: 0; transform: scale(0.94); }
  to   { opacity: 1; transform: none; }
}

.tx-plate-label {
  display: block;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  color: var(--tx-go);
}

.tx-plate {
  display: block;
  margin: 8px 0;
  font-size: 2rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  font-variant-numeric: tabular-nums;
}

.tx-plate-by { font-size: 0.8rem; color: var(--tx-ink-dim); }

.tx-plate-go { margin: 10px 0 0; font-size: 0.88rem; font-weight: 620; }

/* ── My own taxis ─────────────────────────────────────────────────────────────────────────── */

/* Carries its own colours rather than inheriting the page panel's, because this section appears on
   two very different backgrounds: inside the dark Taxi uživo page, and on the light rides page and
   "Moje vožnje". Without them the rows rendered as light text on white. */
.tx-mine {
  --tx-ink: #e8ecf3;
  --tx-ink-dim: #9aa6b8;
  --tx-surface: #141a24;
  --tx-line: rgba(255, 255, 255, 0.09);
  --tx-live: #ffc93c;
  --tx-go: #34d399;

  margin-bottom: 16px;
  color: var(--tx-ink);
}

.tx-mine .tx-h2 {
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--tx-ink-dim);
  margin: 0 0 10px;
}

/* On a light page the section needs a ground of its own. Inside the dark page it already has one,
   and a second panel there would read as a box inside a box. */
.tx-mine {
  background: linear-gradient(135deg, #141a24 0%, #1b2330 100%);
  border-radius: var(--pt-radius-lg, 20px);
  padding: 14px;
}

.tx-live .tx-mine {
  background: none;
  padding: 0;
}

.tx-mine-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 13px;
  border-radius: var(--pt-radius-sm);
  background: var(--tx-surface);
  border: 1px solid var(--tx-line);
  color: var(--tx-ink);
  text-decoration: none;
  transition: border-color var(--pt-transition-fast);
}

.tx-mine-row + .tx-mine-row { margin-top: 8px; }
.tx-mine-row:hover { border-color: var(--pt-primary-light); color: var(--tx-ink); }
.tx-mine-live { border-color: rgba(255, 201, 60, 0.32); }

.tx-mine-when {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  flex: none;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--tx-ink-dim);
  min-width: 92px;
}

.tx-mine-live .tx-mine-when { color: var(--tx-live); }

.tx-mine-route {
  flex: 1;
  min-width: 0;
  font-size: 0.85rem;
  font-weight: 620;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.tx-mine-badge {
  flex: none;
  padding: 4px 10px;
  border-radius: var(--pt-radius-full);
  background: rgba(255, 201, 60, 0.16);
  color: var(--tx-live);
  font-size: 0.72rem;
  font-weight: 700;
  white-space: nowrap;
}

.tx-mine-badge-ok { background: rgba(52, 211, 153, 0.15); color: var(--tx-go); }
.tx-mine-badge-quiet { background: rgba(255, 255, 255, 0.05); color: var(--tx-ink-dim); }

/* An expired request is still yours and still worth seeing — dimmed rather than hidden, because
   the alternative is a page that silently forgot what you posted. */
.tx-mine-done { opacity: 0.55; }
.tx-mine-done:hover { opacity: 0.85; }

.tx-chips-tight { margin-bottom: 0; }

.tx-time-input { max-width: 180px; }

/* ── A taxi row in the ride listing ────────────────────────────────────────────────────────── */

/* Marked, not separated. It sits in the same grid as the rides because it answers the same
   question, and it carries a tag because it is not the same offer: a metered fare split between
   strangers in the next hour, rather than a seat in somebody's car next week. Amber, which is what
   this feature means by "taxi" everywhere else in the app. */
.ride-card-taxi {
  border-color: rgba(245, 158, 11, 0.4) !important;
  background: linear-gradient(180deg, rgba(250, 204, 21, 0.06), transparent 60%);
}

.ride-taxi-tag {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin-bottom: 8px;
  padding: 3px 9px;
  border-radius: 999px;
  background: linear-gradient(135deg, #facc15, #f59e0b);
  color: #1c1400;
  font-size: 0.68rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

/* Already flagging a car down: green, matching what the same state looks like on the live map. */
.ride-taxi-tag-hailing {
  background: linear-gradient(135deg, #34d399, #059669);
  color: #04251a;
}

/* ── The strip on the rides page ───────────────────────────────────────────────────────────── */

/* The one piece of this feature that lives on a light page, so it carries its own dark panel
 * rather than the page-level variables above. It is a glance on the way to something else: dark
 * enough to read as a different kind of thing than the ride cards under it, short enough not to
 * push them off the screen. */
.tx-strip {
  --tx-live: #ffc93c;
  --tx-go: #34d399;

  background: linear-gradient(135deg, #141a24 0%, #1b2330 100%);
  border-radius: var(--pt-radius-lg, 20px);
  padding: 14px;
  margin-bottom: 18px;
  color: #e8ecf3;
}

.tx-strip-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.tx-strip-title {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  font-size: 0.95rem;
}

.tx-strip-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--tx-live);
  animation: tx-beat 2.4s ease-out infinite;
}

.tx-strip-all {
  font-size: 0.8rem;
  font-weight: 650;
  color: #a5b4fc;
  text-decoration: none;
  white-space: nowrap;
}

.tx-strip-all:hover { color: #c7d2fe; }

.tx-strip-sub {
  margin: 4px 0 12px;
  font-size: 0.8rem;
  color: #9aa6b8;
}

/* Sideways rather than wrapped — see the component's own note. The negative margins let the cards
   run to the panel's edge so the last one is visibly cut off, which is what says "scroll". */
.tx-strip-rail {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  margin: 0 -14px;
  padding: 0 14px 2px;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

.tx-strip-rail::-webkit-scrollbar { display: none; }

.tx-mini-card {
  flex: 0 0 auto;
  width: 190px;
  scroll-snap-align: start;
  display: flex;
  flex-direction: column;
  gap: 7px;
  padding: 11px 12px;
  border-radius: var(--pt-radius-sm, 12px);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.09);
  color: inherit;
  text-decoration: none;
  transition: background var(--pt-transition-fast, 0.15s ease),
              border-color var(--pt-transition-fast, 0.15s ease);
}

.tx-mini-card:hover {
  background: rgba(255, 255, 255, 0.09);
  color: inherit;
}

.tx-mini-live { border-color: rgba(255, 201, 60, 0.32); }

.tx-mini-when {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #9aa6b8;
}

.tx-mini-live .tx-mini-when { color: var(--tx-live); }

.tx-mini-route {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.85rem;
  font-weight: 620;
  min-width: 0;
}

.tx-mini-end {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.tx-mini-arrow { color: #64748b; flex: none; }

.tx-mini-foot {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  font-size: 0.75rem;
  color: #9aa6b8;
}

.tx-mini-price {
  font-weight: 700;
  color: var(--tx-go);
  font-variant-numeric: tabular-nums;
}

@media (prefers-reduced-motion: reduce) {
  .tx-strip-dot { animation: none; }
}

/* ── Wider screens ────────────────────────────────────────────────────────────────────────── */

@media (min-width: 768px) {
  .tx-live, .tx-new, .tx-detail { max-width: 620px; margin: 0 auto; }
  .tx-map-frame { height: 420px; }
  .tx-fab { bottom: 24px; }
}

/* ── Motion ───────────────────────────────────────────────────────────────────────────────── */

/* The pulses carry meaning, so they are reduced to a static contrast rather than dropped: the
   amber pin still has to read as "somebody is there now" when the animation is gone. */
@media (prefers-reduced-motion: reduce) {
  .tx-live-dot,
  .tx-pin-live .tx-pin-pulse,
  .tx-me-ring,
  .tx-badge-pulse,
  .tx-map-shimmer,
  .tx-screen,
  .tx-plate-found {
    animation: none;
  }

  .tx-pin-live .tx-pin-pulse { opacity: 0.35; transform: scale(1.8); }
  .tx-me-ring { opacity: 0.35; }
  .tx-screen, .tx-plate-found { opacity: 1; transform: none; }

  .tx-primary:hover:not(:disabled),
  .tx-join:hover:not(:disabled),
  .tx-fab:hover {
    transform: none;
  }
}
