/* Rider app, rider-first orders (KAN-1): flow badge, flags, prices, totals, map, ringing strip,
   alerts opt-in. --r-* tokens from rider-app.css; KAN-22: text sized to read on a moving bike. */

/* Who fills the order: the kitchen cooks it, or the rider buys it. */
.oy-rflow { display:inline-flex; align-items:center; min-height:30px; padding:0 12px; border-radius:999px; margin:0 0 12px; font-size:14px; font-weight:700; }
.oy-rflow.is-kitchen { background:#FFEBDC; color:#8A2E0C; }
.oy-rflow.is-shopper { background:#DDEEFF; color:#0B4A80; }

/* Feed: what is special about this order, and the money. */
.oy-rflags { display:flex; flex-wrap:wrap; gap:6px; margin:0 0 12px; }
.oy-rflag { padding:5px 12px; border-radius:999px; font-size:14px; font-weight:600; background:var(--r-fill); color:var(--r-ink); }
.oy-rflag.is-warn { background:var(--r-amber-bg); color:var(--r-amber); }
.oy-rmoney { margin:0 0 12px; font-size:17px; font-weight:800; color:var(--r-ink); }

/* Ringing strip: big, red, one tap anywhere stops it. Sticks just under the top bar. */
.oy-rring {
  display:flex; align-items:center; justify-content:space-between; gap:10px; width:100%; min-height:56px;
  margin:0 0 14px; padding:12px 14px; padding-inline-start:16px; border:0; border-radius:16px;
  background:#D92D20; color:#fff; font:inherit; font-size:17px; font-weight:800; text-align:start; cursor:pointer;
  position:sticky; top:calc(var(--r-top-h) + var(--r-safe-t) + 8px); z-index:40; box-shadow:0 8px 22px rgba(217,45,32,.35);
}
.oy-rring > span { display:inline-flex; align-items:center; gap:10px; }
.oy-rring strong { flex:0 0 auto; padding:8px 14px; border-radius:999px; background:rgba(255,255,255,.22); font-size:15px; }
.oy-rring[hidden] { display:none; }
@media (prefers-reduced-motion: no-preference) {
  .oy-rring:not([hidden]) { animation: oy-rring-pulse 1s ease-in-out infinite alternate; }
  @keyframes oy-rring-pulse { from { background:#D92D20; } to { background:#B42318; } }
}

/* Alerts opt-in: the sentence says why, the button does it. */
.oy-ralerts { margin:0 0 14px; padding:14px; border-radius:16px; background:var(--r-card); box-shadow:inset 0 0 0 2px var(--r-lime), var(--r-shadow); }
.oy-ralerts[hidden] { display:none; }
.oy-ralerts-line { margin:0 0 12px; font-size:16px; font-weight:600; line-height:1.45; color:var(--r-ink); }
.oy-ralerts .oy-alerts-btn { margin-bottom:0; }
.oy-ralerts .oy-alerts-btn[hidden] { display:none; }
.oy-ralerts .oy-alerts-btn:disabled { opacity:.6; }
.oy-ralerts-help { margin:10px 0 0; padding:9px 12px; border-radius:10px; font-size:15px; font-weight:600; line-height:1.4; background:var(--r-amber-bg); color:var(--r-amber); }
.oy-ralerts-help[hidden] { display:none; }

/* Map: one per order, kept alive by rider-map.js across the 10 s re-renders. */
.oy-rmap-box { margin:14px 0 0; }
.oy-rmap { height:230px; border-radius:14px; border:1px solid var(--r-sep); overflow:hidden; background:#E5E5EA; position:relative; z-index:0; }
.oy-rmap > .oy-rmap-canvas { position:absolute; inset:0; }
.oy-rmap-meta { display:flex; flex-wrap:wrap; align-items:center; gap:8px; margin-top:8px; }
.oy-rpin { padding:4px 10px; border-radius:999px; font-size:13px; font-weight:700; background:var(--r-fill); color:var(--r-ink-2); }
.oy-rpin.is-live { background:var(--r-green-bg); color:var(--r-green); }
.oy-rdist { font-size:16px; font-weight:700; color:var(--r-ink); }
.oy-rmap-pin { border:3px solid #fff; width:22px; height:22px; border-radius:50% 50% 50% 0; transform:rotate(-45deg); box-shadow:0 2px 6px rgba(0,0,0,.3); }
.oy-rmap-pin.shop { background:var(--oy-ink); }
.oy-rmap-pin.customer { background:#DC2626; }
.oy-rmap-me { width:16px; height:16px; border-radius:50%; background:#2563EB; border:3px solid #fff; box-shadow:0 0 0 4px rgba(37,99,235,.25); }

/* Voice note */
.oy-rvoice { margin:6px 0 4px; }
.oy-rvoice audio { width:100%; height:44px; }
.oy-rvoice-dl { display:inline-block; margin-top:8px; font-size:15px; font-weight:600; color:var(--r-blue); text-decoration:underline; }
/* KAN-10: the voice note as text. */
.oy-rvoice-text { margin-top:10px; padding:10px 12px; border-radius:12px; background:var(--r-fill); }
.oy-rvoice-text span { display:block; font-size:13px; font-weight:700; color:var(--r-ink-3); text-transform:uppercase; letter-spacing:.03em; }
.oy-rvoice-text p { margin:4px 0; font-size:16px; font-weight:500; line-height:1.45; color:var(--r-ink); }
.oy-rvoice-text small { display:block; font-size:13px; color:var(--r-ink-3); }

/* Items with prices; unpriced lines get a "Paid (Rs)" box for the line total. */
.oy-rlist.oy-ritems li { align-items:flex-start; flex-wrap:wrap; }
.oy-rlist.oy-ritems li.is-unpriced { background:var(--r-amber-bg); }
.oy-ritem-name { flex:1 1 auto; min-width:0; line-height:1.4; }
.oy-ritem-from { display:block; margin-top:2px; font-size:14px; font-weight:600; color:var(--r-blue); }
.oy-ritem-price { flex:0 0 auto; text-align:end; font-size:16px; font-weight:800; white-space:nowrap; }
.oy-ritem-price small { display:block; font-size:13px; font-weight:500; color:var(--r-ink-3); }
.oy-ritem-paid { display:flex; align-items:center; gap:8px; flex:0 0 auto; margin-inline-start:auto; font-size:14px; font-weight:700; color:var(--r-ink-2); }
.oy-ritem-paid input { width:110px; min-height:46px; box-sizing:border-box; padding:10px 12px; border:1px solid var(--r-sep); border-radius:12px; font:inherit; font-size:18px; font-weight:800; color:var(--r-ink); background:var(--r-card); text-align:end; }
.oy-ritem-paid input:focus { outline:none; border-color:var(--r-lime); box-shadow:0 0 0 3px rgba(166,206,57,.3); }
.oy-rprices { margin:0; }
.oy-rhint { margin:-4px 2px 10px; font-size:14px; font-weight:500; line-height:1.4; color:var(--r-ink-2); }
.oy-rsave { display:flex; align-items:center; justify-content:center; width:100%; min-height:48px; margin:0 0 12px; padding:12px; border:0; border-radius:14px; background:var(--r-green-bg); color:var(--r-green); font:inherit; font-size:16px; font-weight:800; cursor:pointer; }

/* Totals */
.oy-rtotals { margin:0 0 10px; padding:12px 14px; border-radius:14px; background:var(--r-fill); }
.oy-rtotals > div { display:flex; justify-content:space-between; gap:10px; padding:3px 0; font-size:16px; }
.oy-rtotals dt { font-weight:500; color:var(--r-ink-2); }
.oy-rtotals dd { margin:0; font-weight:700; color:var(--r-ink); font-variant-numeric:tabular-nums; }
.oy-rtotals .is-total { margin-top:6px; padding-top:8px; border-top:1px solid var(--r-sep); font-size:18px; }
.oy-rtotals .is-total dt, .oy-rtotals .is-total dd { color:var(--r-ink); font-weight:800; }

/* KAN-5/KAN-8: a form that has posted shows it is working and cannot be tapped twice. */
.oy-rcard-accept.is-sending:disabled, .oy-rsave.is-sending:disabled, .oy-rrelease.is-sending:disabled { opacity:.7; cursor:progress; }
.oy-rcard-accept.is-sending:disabled { background:var(--r-lime); color:#111; }

/* KAN-47: the active order's pay breakdown — km, petrol, fixed, total. */
.oy-rpay { margin: 10px 0 0; padding: 10px 12px; border-radius: 12px; background: rgba(166, 206, 57, .12); display: grid; gap: 4px; font-size: 14px; }
.oy-rpay > div { display: flex; justify-content: space-between; gap: 12px; }
.oy-rpay dt { margin: 0; font-weight: 600; }
.oy-rpay dd { margin: 0; font-weight: 700; }
.oy-rpay .is-total { border-top: 1px dashed rgba(0, 0, 0, .15); padding-top: 4px; font-size: 15px; }
