/* ============================================================================
   dCover — step 3 of the journey: the checkout (reserve) and the price hold (hold).
   Spec: docs/design/THREE-STEP-JOURNEY.md §7 (+ §2 step bar, §3 grid, §10 accessibility). Loaded AFTER app.css.
   The pieces shared with flights — .jsteps, .appwrap.jgrid, .jpanel, .jp-*, .jbar, .jh1/.jsub, --field-edge — live in
   app.css "ROUND 19"; only what step 3 adds is here. Spacing on the 8 ladder; 4 only inside a component.
   ========================================================================== */

/* -- the header stays and the step bar sticks right under it (app.css ROUND 19: .jsteps at --jhead, the header's real
   height). The slot has no box of its own, so the bar sticks to the page. The step bar is 57 / 73 px tall. -- */
.jslot{display:contents}
body.jflow{--jf-steps:57px}
@media (min-width:900px){body.jflow{--jf-steps:73px}}

/* a field, a heading or the error summary brought into view clears the header + step bar and the phone's bottom bar */
body.jflow .errsum,body.jflow .field,body.jflow fieldset.field,body.jflow .jh1,body.jflow .tcard{scroll-margin-top:calc(var(--jhead) + var(--safe-t) + var(--jf-steps) + 16px);scroll-margin-bottom:128px}
@media (min-width:900px){
  body.jflow .errsum,body.jflow .field,body.jflow fieldset.field,body.jflow .jh1,body.jflow .tcard{scroll-margin-top:calc(var(--jhead) + var(--safe-t) + var(--jf-steps) + 24px);scroll-margin-bottom:24px}
}

/* ---------------------------------------------------------------- the left column */
.co-main{min-width:0}
.co-holdline{margin:-8px 0 16px;font-size:15px;line-height:24px}
:root[data-lang="bn"] .co-holdline{font-size:16px}
.co-holdline a{display:inline-block;padding:12px 0;color:var(--ink);font-weight:600;text-decoration:underline;text-underline-offset:3px}
body.jflow .errsum{margin:0 0 16px}
.co-form{display:flex;flex-direction:column;gap:16px}
.co-stack{display:flex;flex-direction:column;gap:16px}
.co-form .famnote{margin:0}

/* the phone's collapsed trip card at the top (app.css hides .fsum-mob on app pages; step 3 wants it below 900) */
body.app.jflow .fsum-mob{display:block;margin:0 0 16px}
@media (min-width:900px){body.app.jflow .fsum-mob{display:none}}

/* a traveller card: "যাত্রী 1 · প্রাপ্তবয়স্ক (12+)" and, once it is all there, "✓ সম্পূর্ণ" — a word with the tick, never colour alone */
.tcard .hd h2 .tc-age{font-weight:400;color:var(--ink-2);font-size:15px}
.tc-ok{margin-inline-start:auto;display:inline-flex;align-items:center;gap:4px;min-height:32px;padding:0 12px;border-radius:999px;
  background:var(--chip);color:var(--ink);font-size:14px;font-weight:700;white-space:nowrap}
.tc-ok[hidden]{display:none}

/* contact: email and phone side by side on a desktop only; everything else full width (spec §7.3) */
.co-two .chk.full{min-height:48px}
@media (min-width:900px){.co-two{grid-template-columns:1fr 1fr}.co-two .full{grid-column:1/-1}}
.co-two .v15-forbox{margin-top:0}

/* paying later: one line, "পরে টাকা দেবেন: Zelle · বদলান" — the three choices open in place */
.co-pay{padding:0 4px}
.co-payline{margin:0;display:flex;flex-wrap:wrap;align-items:center;gap:0 8px;font-size:16px;line-height:24px;color:var(--ink)}
.co-payline b{font-weight:700}
.linkbtn{display:inline-flex;align-items:center;justify-content:center;min-height:48px;min-width:48px;padding:0 4px;background:none;border:0;
  font:inherit;font-weight:600;color:var(--ink);text-decoration:underline;text-underline-offset:3px;cursor:pointer}
.linkbtn:focus-visible{outline:3px solid var(--focus-ring);outline-offset:2px;border-radius:4px}
.co-pay .paypick{margin-top:8px}
.co-pay .paypick[hidden]{display:none}
.co-form .okline{margin:0}

/* -------------------------------------------------------------- the checkout
   Desktop: the right column, lifted, sticky under the step bar — the one thing he looks at last.
   Phone: the same content as the review block after the form ("দেখে নিন", names first, never collapsible). */
.jpanel.co{display:flex;flex-direction:column;gap:16px;margin-top:24px;background:var(--surface);border:1px solid var(--hair);border-radius:12px;padding:16px}
.co-sum{display:contents}
.co .jp-route{margin:-8px 0 0}
.co .jp-leg .k a{display:inline-flex;align-items:center;padding:12px 8px;margin:-12px -8px}    /* বদলান: a 48-tall hit area for a 13 px word */
.co .jp-leg .v{margin-top:4px}
.co .jp-leg .s{overflow-wrap:anywhere}
.co-long{white-space:nowrap;color:var(--ink);font-weight:600}
/* fare type · bags on one line; the fees with "নিয়ম ▾" at their end — opened, the rules take the full width below */
.co-fare{display:grid;grid-template-columns:minmax(0,1fr) auto;column-gap:16px;align-items:start;padding-top:16px;border-top:1px solid var(--hair);font-size:14px;line-height:20px}
.co-fare p{margin:0}
.co-f1{grid-column:1/-1;font-weight:700;color:var(--ink)}
.co-f2{color:var(--ink-2)}
.co-rules{margin-top:0}
.co-rules[open]{grid-column:1/-1}
.co-rules>summary{min-height:48px;margin:-14px 0;font-size:14px;font-weight:600;color:var(--ink);text-decoration:underline;text-underline-offset:3px}
.co-rules[open]>summary{margin:-14px 0 -8px auto;width:max-content}
.co-rules>summary .chev{text-decoration:none}
.co-rules[open]>summary .chev{transform:rotate(180deg)}
.co-rules .tbl{margin-top:8px}
.co-rules .note{margin:8px 0 0;font-size:13px;line-height:20px;color:var(--ink-2)}
.co-brk{display:grid;gap:8px;padding-top:16px;border-top:1px solid var(--hair);font-size:14px;line-height:20px;color:var(--ink-2)}
.co-brk .r{display:flex;justify-content:space-between;align-items:baseline;gap:16px}
.co-brk .r span:last-child{flex:none;color:var(--ink);font-weight:600;font-variant-numeric:tabular-nums}
.co .jp-tot span{font-size:16px;font-weight:700;color:var(--ink)}
.co-allin{margin:-8px 0 0;display:flex;gap:8px;font-size:13px;line-height:20px;color:var(--ink)}
.co-air{margin:-8px 0 0;font-size:13px;line-height:20px;color:var(--ink-2)}
.co-go{display:flex}
body.app .co-go .btn{flex:1;min-height:56px;font-size:17px}
.co .jp-safe{font-weight:600}
.co-prev{align-self:flex-start;display:inline-flex;align-items:center;min-height:48px;margin:-8px 0;color:var(--ink);font-weight:600;
  text-decoration:underline;text-underline-offset:3px}
.co-names{padding-top:16px;border-top:1px solid var(--hair)}
.co-names h3{margin:0 0 8px;font-size:14px;line-height:20px;font-weight:700;color:var(--ink-2)}
.co .review{display:grid;gap:8px}
.co .rv{display:flex;align-items:baseline;gap:8px;padding:0;background:none;border:0;border-radius:0;box-shadow:none}
.co .rv .rv-i{flex:none;min-width:16px;font-size:13px;font-weight:700;color:var(--ink-2);font-variant-numeric:tabular-nums}
.co .rv .nm{flex:1;min-width:0;font-family:var(--mono);font-size:15px;font-weight:700;letter-spacing:.02em;color:var(--ink);overflow-wrap:anywhere}
.co .rv .nm.empty{font-family:inherit;font-weight:400;letter-spacing:0;color:var(--ink-2)}
.co .rv .rv-k{flex:none;font-size:13px;color:var(--ink-2)}

/* the price changed on Reserve (spec §8.4): a plain box with a black edge and ⚠-free words — red stays the action colour */
.co-alert{padding:16px;border:1px solid var(--hair);border-left:4px solid var(--ink);border-radius:8px;background:var(--surface);color:var(--ink);
  font-size:14px;line-height:20px}
.co-alert[hidden]{display:none}
.co-alert p{margin:0}
.co-alert .btn{margin-top:8px;min-height:48px}

/* what happens next: a flat card below the checkout (desktop — its own row under the grid, so the sticky checkout stays
   short), a closed <details> on the phone */
.co-after{display:none}
@media (min-width:900px){.co-after{display:grid;margin-top:16px}.co-after .co-next{margin:0}}
.co-next h2{margin:0 0 16px;font-size:16px}
.co-next-m{margin-top:16px;padding:0 16px;border:1px solid var(--hair);border-radius:12px;background:var(--surface)}
.co-next-m>summary{list-style:none;cursor:pointer;display:flex;align-items:center;gap:8px;min-height:48px;font-weight:600;color:var(--ink)}
.co-next-m>summary::-webkit-details-marker{display:none}
.co-next-m>summary .chev{display:inline-block;transition:transform .2s ease}
.co-next-m[open]>summary .chev{transform:rotate(90deg)}
.co-next-m .timeline{padding:8px 0 16px}

/* hold: "what holding does" and the way back to reserving */
.co-what{margin:0 0 16px}
.co-what h2{margin:0 0 8px;font-size:17px}
.co-toreserve{margin:0;text-align:center}
.co-toreserve a{display:inline-block;padding:12px 0;color:var(--ink);font-weight:600;text-decoration:underline;text-underline-offset:3px}
.co-gone{margin-top:24px;display:grid;gap:16px;justify-items:start}
.co-gone .jh1{margin:0}
.co-gone p{margin:0;color:var(--ink-2)}

/* the breakdown sheet (phone: the total in the bar opens it) reuses the checkout's rows */
.co-sheet{display:flex;flex-direction:column;gap:16px;padding-bottom:8px}

/* ------------------------------------------------------------- phone and tablet (< 900) */
@media (max-width:899px){
  .co-dk{display:none!important}
  .co .jp-h{order:-2}
  .co .co-names{order:-1;padding-top:0;border-top:0}
  .co #go-d,.co .co-safe,.co .co-prev{display:none}
  .co-side{margin-top:24px}
  .co-side .jpanel.co{margin-top:0}
}
/* ------------------------------------------------------------- desktop (≥ 900): the right column */
@media (min-width:900px){
  .co-mb{display:none!important}
  .co-side{position:sticky;top:calc(var(--jhead) + var(--safe-t) + 97px);margin-top:24px;display:flex;flex-direction:column;gap:16px}   /* = .jpanel's */
  .co-side .jpanel.co{position:static;margin-top:0;padding:24px;border-radius:16px}
  @media (max-width:1199px){.co-side .jpanel.co{padding:16px}}    /* the 360 column: more lines wrap, so less padding keeps the button high */
  .co-side .jpanel.co.lift{border-color:transparent;box-shadow:var(--card-float)}
  .co-next{padding:24px;border-radius:16px}
}

/* ------------------------------------------------------------- the phone's bottom bar
   row 1: "✓ এখন কোনো টাকা কাটা হবে না" + the total (48-tall tap that opens the breakdown), row 2: ‹ আগের + the button.
   The line sits 8 px above the button (spec §7.4 #10: within 8 px, at every size, in every state). */
.co-bar{padding-top:16px}
.co-bar .jb-row{align-items:flex-end;min-height:24px}
.co-bar .co-safe-m{font-size:13px;line-height:20px;font-weight:600;color:var(--ink)}
.co-tot{flex:none;display:inline-flex;align-items:flex-end;gap:4px;min-height:48px;margin:-16px -8px -8px 0;padding:0 8px 10px;
  background:none;border:0;font:inherit;color:var(--ink);cursor:pointer}
.co-tot b{font-size:16px;line-height:20px;font-weight:800;font-variant-numeric:tabular-nums}
.co-tot .co-up{font-size:12px;line-height:20px;color:var(--ink-2)}
.co-tot:focus-visible{outline:3px solid var(--focus-ring);outline-offset:-3px;border-radius:8px}
.co-bar .co-alert{margin:0}
.co-bar .jb-go .btn.go{font-size:16px}
.co-long .co-ic{width:14px;height:14px;vertical-align:-2px;margin-inline-end:3px}
