/* ==========================================================================
   Urgent Order Delivery — booking flow.
   Loads AFTER app-v2.css and reuses its tokens, header, footer and buttons.
   ========================================================================== */

.bk {
  background: var(--warm);
  min-height: 70vh;
  padding-block: clamp(26px, 4vw, 46px) clamp(46px, 6vw, 72px);
}
.bk__shell { max-width: 880px; margin-inline: auto; }

/* ---------- whatever the server sends back ---------- */
.alert {
  display: flex; align-items: flex-start; gap: 12px;
  padding: 16px 18px; margin-bottom: 20px;
  border-radius: 16px; border: 1.5px solid;
  font-size: 14.5px; line-height: 1.55; font-weight: 600;
}
.alert svg { flex-shrink: 0; margin-top: 1px; }
.alert b { display: block; font-weight: 800; margin-bottom: 4px; }
.alert ul { margin: 0; padding-inline-start: 18px; font-weight: 600; }
.alert li { margin-top: 3px; }
.alert--bad { background: var(--tint); border-color: #F3D8DD; color: var(--deep); }
.alert--bad svg { color: var(--red); }
.alert--ok  { background: var(--green-bg); border-color: #BFE6D1; color: #0A5B36; }
.alert--ok svg { color: var(--green); }
.awb-btn { margin-top: 12px; }
.awb-btn svg { color: #fff; }

/* ---------- progress rail ---------- */
.prog { margin-bottom: clamp(20px, 3vw, 30px); }
.prog__top {
  display: flex; align-items: center; justify-content: space-between;
  gap: 14px; margin-bottom: 12px;
}
.prog__step { font-size: 13px; font-weight: 700; color: var(--muted); }
.prog__step b { color: var(--ink); }

.prog__bar { height: 7px; border-radius: 99px; background: #E6E2DE; overflow: hidden; }
.prog__fill {
  position: relative; overflow: hidden;
  height: 100%; width: 20%; border-radius: 99px;
  background: linear-gradient(90deg, var(--deep), var(--red));
  transition: width .42s var(--ease);
}
/* a light travelling along the filled part, so the bar feels live */
.prog__fill::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(90deg,
    rgba(255,255,255,0) 0%, rgba(255,255,255,.55) 50%, rgba(255,255,255,0) 100%);
  transform: translateX(-100%);
  animation: progShine 2.4s ease-in-out infinite;
}
@keyframes progShine { 0% { transform: translateX(-100%); } 60%, 100% { transform: translateX(100%); } }

/* ---------- the step card ---------- */
.step-card {
  background: #fff; border-radius: 22px;
  padding: clamp(22px, 3.4vw, 38px);
  box-shadow: 0 14px 44px rgba(16,24,29,.09);
}
/* the header is sticky, so anything scrolled to the top of the window lands
   underneath it unless it reserves the header's height first */
.step-card, .sub-h { scroll-margin-top: clamp(84px, 10vw, 104px); }
.bstep { display: none; }
.bstep.on { display: block; animation: stepIn .34s var(--ease); }
@keyframes stepIn { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }

.bstep__eyebrow {
  font-size: 12px; font-weight: 700; letter-spacing: 1.7px;
  text-transform: uppercase; color: var(--red); margin-bottom: 9px;
}
.bstep__h {
  font-family: var(--font-display); font-weight: 900;
  font-size: clamp(25px, 3.3vw, 34px); letter-spacing: -.035em;
  line-height: 1.12; margin-bottom: 8px;
}
.bstep__sub { font-size: 15px; color: var(--muted); line-height: 1.6; margin-bottom: 22px; }

/* ---------- selectable option tiles ---------- */
.opts { display: grid; gap: 12px; margin-bottom: 26px; }
/* author display beats the browser's [hidden] rule, so say it again */
.opts[hidden] { display: none; }
.opts--4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
/* the wide tiles carry a title AND a line of description, so two across on a
   phone clipped the text — they get the full width until there is room */
.opts--2 { grid-template-columns: minmax(0, 1fr); }
.opts--cities { grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (min-width: 560px) {
  .opts--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (min-width: 680px) {
  .opts--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .opts--cities { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

.opt {
  position: relative; min-width: 0;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 9px; padding: 18px 12px;
  border: 2px solid #EFE7E9; border-radius: 18px;
  background: var(--tint); color: var(--deep);
  font-family: inherit; font-weight: 700; font-size: 15px; line-height: 1.25;
  text-align: center; cursor: pointer;
  transition: transform .18s var(--ease), box-shadow .18s var(--ease),
              background-color .18s ease, border-color .18s ease, color .18s ease;
}
.opt svg { width: 32px; height: 32px; flex-shrink: 0; }
.opt small { display: block; font-weight: 600; font-size: 12.5px; opacity: .78; }
.opt:hover:not([disabled]) { transform: translateY(-3px); box-shadow: 0 14px 28px rgba(196,18,48,.16); }
.opt[aria-pressed="true"] {
  background: var(--red); border-color: var(--red); color: #fff;
  box-shadow: 0 14px 30px rgba(196,18,48,.3);
}
.opt[disabled] {
  background: #F4F5F6; border-color: #E9ECEE; color: #A8B2B8;
  cursor: not-allowed; box-shadow: none;
}
.opt__tick {
  position: absolute; top: 9px; right: 9px;
  width: 20px; height: 20px; border-radius: 50%;
  background: #fff; color: var(--red);
  display: none; align-items: center; justify-content: center;
}
.opt[aria-pressed="true"] .opt__tick { display: flex; animation: tickPop .32s var(--ease); }
@keyframes tickPop {
  0%   { transform: scale(0) rotate(-35deg); opacity: 0; }
  62%  { transform: scale(1.22) rotate(4deg); opacity: 1; }
  100% { transform: scale(1) rotate(0); }
}
/* the chosen tile gives one short nudge, so the choice is felt as well as seen */
.opt[aria-pressed="true"] { animation: optPick .34s var(--ease); }
@keyframes optPick {
  0%   { transform: scale(1); }
  45%  { transform: scale(1.045); }
  100% { transform: scale(1); }
}

/* tiles arrive one after another when their step opens */
.bstep.on .opts > .opt {
  animation: tileIn .42s var(--ease) backwards;
  animation-delay: calc(var(--i, 0) * 42ms + 60ms);
}
@keyframes tileIn {
  from { opacity: 0; transform: translateY(14px) scale(.97); }
  to   { opacity: 1; transform: none; }
}
/* a picked tile must not be re-run by the entrance rule */
.bstep.on .opts > .opt[aria-pressed="true"] { animation: optPick .34s var(--ease); }

/* square tiles for the four services */
.opt--sq { aspect-ratio: 1 / 1; border-radius: 20px; }
.opt--sq svg { width: 38px; height: 38px; }
@media (min-width: 680px) { .opt--sq svg { width: 40px; height: 40px; } }

/* wide tiles for inside / outside city and the weight choice */
.opt--wide { flex-direction: row; justify-content: flex-start; gap: 15px; padding: 20px 20px; text-align: left; }
.opt--wide svg { width: 36px; height: 36px; }

/* compact tiles for the emirates */
.opt--city { flex-direction: row; gap: 10px; padding: 15px 13px; font-size: 14.5px; text-align: left; justify-content: flex-start; }
.opt--city svg { width: 20px; height: 20px; }

/* a long name takes the whole row rather than wrapping to three lines and
   leaving a tile twice the height of its neighbours */
.opt--span { grid-column: 1 / -1; }

/* ---------- sub-headings inside a combined step ---------- */
.sub-h {
  display: flex; align-items: center; gap: 10px;
  font-family: var(--font-display); font-weight: 800;
  font-size: 19.5px; letter-spacing: -.025em;
  margin: 2px 0 14px;
}
.sub-h svg { width: 20px; height: 20px; color: var(--red); flex-shrink: 0; }
.sub-h[hidden] { display: none; }
.sub-h + .opts { margin-bottom: 24px; }

/* the two city headings carry the step, so they are the bigger pair, and the
   red marker sits in a tinted disc so the eye lands on them first */
.sub-h--lg {
  font-size: clamp(21px, 2.9vw, 26px); letter-spacing: -.035em;
  gap: 12px; margin: 4px 0 16px;
}
.sub-h--lg .ic {
  display: inline-flex; align-items: center; justify-content: center;
  width: 38px; height: 38px; border-radius: 12px;
  background: var(--tint); color: var(--red); flex-shrink: 0;
}
.sub-h--lg .ic svg { width: 21px; height: 21px; }
.sub-h--lg small {
  display: block; font-family: var(--font-body); font-weight: 600;
  font-size: 13px; letter-spacing: 0; color: var(--muted); margin-top: 1px;
}

/* ---------- the route ribbon on the cities step ----------
   Appears as soon as a sender city is chosen, so the step shows its own
   progress rather than two silent grids. */
.route {
  display: flex; align-items: center; gap: 14px;
  padding: 15px 18px; margin-bottom: 22px;
  border-radius: 16px;
  background: linear-gradient(135deg, #FFFFFF 0%, var(--tint) 100%);
  border: 1.5px solid var(--blush);
  animation: routeIn .4s var(--ease);
}
.route[hidden] { display: none; }
@keyframes routeIn { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: none; } }

.route__pt { min-width: 0; flex: 1 1 0; }
.route__pt b {
  display: block; font-family: var(--font-display); font-weight: 800;
  font-size: 15.5px; letter-spacing: -.02em; color: var(--ink);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.route__pt span {
  display: block; font-size: 11px; font-weight: 700;
  letter-spacing: .9px; text-transform: uppercase; color: var(--red); margin-bottom: 2px;
}
.route__pt--to { text-align: right; }

.route__mid { position: relative; flex: 0 0 clamp(58px, 16vw, 132px); height: 24px; }
.route__mid::before {
  content: ""; position: absolute; left: 0; right: 0; top: 11px; height: 2px;
  background: repeating-linear-gradient(90deg, var(--blush) 0 7px, transparent 7px 14px);
}
.route__van {
  position: absolute; top: 0; left: 0; color: var(--red);
  animation: vanGo 2.8s var(--ease) infinite;
}
.route__van svg { width: 22px; height: 22px; display: block; }
@keyframes vanGo {
  0%        { transform: translateX(-10%); opacity: 0; }
  18%, 72%  { opacity: 1; }
  100%      { transform: translateX(calc(100% + 10px)); opacity: 0; }
}
html[dir="rtl"] .route__van svg { transform: scaleX(-1); }

/* the inside-city notice that stands in for the receiver grid */
.same-note {
  display: flex; align-items: flex-start; gap: 12px;
  padding: 16px 18px; margin-bottom: 26px;
  background: var(--tint); border: 1.5px solid #F3D8DD; border-radius: 16px;
  font-size: 14.5px; line-height: 1.55; color: var(--deep); font-weight: 600;
}
.same-note svg { width: 22px; height: 22px; color: var(--red); flex-shrink: 0; margin-top: 1px; }
.same-note[hidden] { display: none; }
.same-note b { font-weight: 800; }
/* the Western Area notice is guidance, not confirmation, so it sits in the
   neutral warm tone rather than the brand red */
.same-note--info { background: var(--warm); border-color: var(--line); color: var(--muted); }
.same-note--info svg { color: var(--muted); }
.same-note--info b { color: var(--ink); }

/* sender and receiver side by side on one step */
.two-col { display: grid; gap: 26px; margin-bottom: 26px; }
@media (min-width: 760px) { .two-col { grid-template-columns: 1fr 1fr; gap: 34px; } }
.two-col .fields { margin-bottom: 0; }

/* ---------- text fields ---------- */
.fields { display: grid; gap: 15px; margin-bottom: 26px; }
@media (min-width: 620px) { .fields--2 { grid-template-columns: 1fr 1fr; } .fields--2 .f--full { grid-column: 1 / -1; } }

.f label {
  display: block; font-size: 12.5px; font-weight: 700;
  letter-spacing: .7px; text-transform: uppercase;
  color: #8795A0; margin-bottom: 7px;
}
.f__wrap { position: relative; display: flex; align-items: center; }
.f__wrap svg {
  position: absolute; inset-inline-start: 14px;
  width: 19px; height: 19px; color: #A8B2B8; pointer-events: none;
}
.f input, .f textarea {
  width: 100%; font-family: inherit; font-size: 15.5px; color: var(--ink);
  padding: 14px 15px 14px 42px;
  background: var(--warm); border: 1.5px solid transparent; border-radius: 13px;
  transition: border-color .18s ease, background-color .18s ease;
}
.f textarea { padding-left: 15px; min-height: 84px; resize: vertical; }
.f input::placeholder, .f textarea::placeholder { color: #A8B2B8; }
.f input:focus, .f textarea:focus { outline: 0; border-color: var(--red); background: #fff; }
.f input[aria-invalid="true"], .f textarea[aria-invalid="true"] { border-color: var(--red); background: var(--tint); }
.f__err { display: none; font-size: 12.5px; font-weight: 600; color: var(--red); margin-top: 6px; }
.f__err.on { display: block; }
.f__hint { font-size: 12.5px; color: #8795A0; margin-top: 6px; }

/* ---------- charges ----------
   This panel used to be a near-black slab. Black against the brand red read
   as two competing darks, so it is now a light card: warm white, a blush
   edge, and the one piece of red that matters — the total. */
.quote {
  position: relative; overflow: hidden;
  background: linear-gradient(168deg, #FFFFFF 0%, #FFF7F8 46%, var(--tint) 100%);
  border: 1.5px solid var(--blush);
  border-radius: 22px;
  padding: clamp(22px, 3vw, 30px);
  color: var(--ink); margin-bottom: 22px;
  box-shadow: 0 14px 34px rgba(142,13,35,.09);
}
/* a soft red glow in the corner instead of a hard dark block */
.quote::before {
  content: ""; position: absolute; z-index: 0;
  top: -58px; inset-inline-end: -48px; width: 190px; height: 190px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(196,18,48,.13) 0%, rgba(196,18,48,0) 70%);
}
.quote > * { position: relative; z-index: 1; }

.quote__tag {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 6px 13px; margin-bottom: 15px; border-radius: 999px;
  background: var(--red); color: #fff;
  font-size: 11.5px; font-weight: 800; letter-spacing: 1.2px; text-transform: uppercase;
}
.quote__tag svg { width: 14px; height: 14px; }

.quote__row {
  display: flex; align-items: baseline; justify-content: space-between;
  gap: 16px; font-size: 14.5px; color: var(--muted);
  padding: 10px 0; border-bottom: 1px solid rgba(142,13,35,.10);
}
.quote__row span:last-child { color: var(--ink); font-weight: 700; text-align: right; }
.quote__total {
  display: flex; align-items: baseline; justify-content: space-between;
  gap: 16px; padding-top: 18px; margin-top: 6px;
}
/* only the label — this used to out-specify .quote__amt and shrink the total */
.quote__total > span:first-child { font-size: 15.5px; color: var(--muted); font-weight: 600; }
.quote__amt {
  font-family: var(--font-display); font-weight: 900;
  font-size: clamp(30px, 5vw, 46px); letter-spacing: -.04em;
  color: var(--red); direction: ltr;
  /* "AED 200" was breaking after "AED" on a phone */
  white-space: nowrap;
}
.quote__note { font-size: 12.5px; color: var(--muted); margin-top: 10px; line-height: 1.6; }

/* ---------- how would you like to pay ---------- */
.pay-h {
  font-family: var(--font-display); font-weight: 900;
  font-size: clamp(22px, 3vw, 28px); letter-spacing: -.035em;
  line-height: 1.15; color: var(--ink);
  margin: 30px 0 16px;
}

/* Square, the same shape as the service tiles on the first step, so the two
   payment choices read as choices and not as another paragraph. */
.opts--pay {
  grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px;
  /* capped, or each tile would be 350px wide and 170 tall on a desktop —
     a rectangle again, which is what these used to look like */
  max-width: 440px; margin-inline: auto;
}
.opt--pay {
  aspect-ratio: 1 / 1;
  flex-direction: column; align-items: center; justify-content: center;
  gap: 12px; padding: 22px 14px;
  border-radius: 20px; border-width: 2px; text-align: center;
}
/* Direct children only. `.opt--pay span` also matched .opt__tick, and being
   one degree more specific it overrode `display:none` — so an unselected
   tile sat there wearing a tick. */
.opt--pay > svg { width: 44px; height: 44px; }
.opt--pay > span:not(.opt__tick) { display: block; font-size: 16.5px; font-weight: 800; line-height: 1.25; }
.opt--pay .opt__tick { width: 24px; height: 24px; top: 11px; right: 11px; }
.opt--pay .opt__tick svg { width: 14px; height: 14px; }
.opt--pay small {
  display: block; margin-top: 5px;
  font-size: 12.5px; font-weight: 600; line-height: 1.4; opacity: .8;
}
@media (max-width: 420px) {
  .opt--pay { padding: 16px 8px; gap: 9px; }
  .opt--pay > svg { width: 36px; height: 36px; }
  .opt--pay > span:not(.opt__tick) { font-size: 14.5px; }
  .opt--pay small { font-size: 11.5px; }
}

/* ---------- the three reassurances, at the foot of the step ---------- */
.trust {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px; margin: 26px 0 24px;
}
.trust__i {
  display: flex; flex-direction: column; align-items: center; gap: 10px;
  padding: 22px 12px; border-radius: 18px;
  background: linear-gradient(170deg, #FFFFFF 0%, var(--tint) 100%);
  border: 1.5px solid var(--blush);
  text-align: center;
  transition: transform .2s var(--ease), box-shadow .2s var(--ease);
}
.trust__i:hover { transform: translateY(-3px); box-shadow: 0 14px 28px rgba(196,18,48,.14); }
.trust__ic {
  display: inline-flex; align-items: center; justify-content: center;
  width: 52px; height: 52px; border-radius: 16px;
  background: var(--red); color: #fff;
  box-shadow: 0 8px 20px rgba(196,18,48,.3);
}
.trust__ic svg { width: 26px; height: 26px; }
.trust__i b {
  display: block;
  font-family: var(--font-display); font-weight: 800;
  font-size: 15.5px; letter-spacing: -.02em; color: var(--ink); margin-bottom: 3px;
}
.trust__i > div > span { display: block; font-size: 12.5px; font-weight: 600; color: var(--muted); line-height: 1.45; }

@media (max-width: 560px) {
  .trust { grid-template-columns: minmax(0, 1fr); gap: 10px; }
  .trust__i { flex-direction: row; text-align: left; gap: 14px; padding: 15px 16px; }
  .trust__ic { width: 46px; height: 46px; flex-shrink: 0; }
  .trust__i > div { min-width: 0; }
}
@media (prefers-reduced-motion: reduce) { .trust__i:hover { transform: none; } }

/* ---------- review list ---------- */
.review-list { display: grid; gap: 1px; background: var(--line); border-radius: 16px; overflow: hidden; margin-bottom: 24px; }
.review-list div { display: flex; justify-content: space-between; gap: 14px; background: #fff; padding: 13px 16px; font-size: 14.5px; }
.review-list dt, .review-list .k { color: var(--muted); }
.review-list .v { font-weight: 700; text-align: right; }

/* ---------- navigation ---------- */
.nav-row { display: flex; gap: 12px; align-items: center; }
.nav-row .btn { flex: 1 1 auto; }
@media (min-width: 560px) { .nav-row .btn { flex: 0 0 auto; } .nav-row .btn--red { margin-inline-start: auto; } }

.btn[disabled] { opacity: .45; cursor: not-allowed; transform: none !important; box-shadow: none !important; }

.back-link {
  display: inline-flex; align-items: center; gap: 7px;
  font-size: 14.5px; font-weight: 600; color: var(--muted);
  background: none; border: 0; font-family: inherit; cursor: pointer; padding: 10px 2px;
}
.back-link:hover { color: var(--ink); }

/* ---------- done ---------- */
.done { text-align: center; padding-block: 12px; }
.done__tick {
  width: 76px; height: 76px; border-radius: 50%; background: var(--green-bg);
  display: flex; align-items: center; justify-content: center; margin: 0 auto 18px;
  color: var(--green);
  animation: tickDrop .5s var(--ease);
}
@keyframes tickDrop {
  0%   { transform: scale(.5); opacity: 0; }
  60%  { transform: scale(1.08); opacity: 1; }
  100% { transform: scale(1); }
}

/* the air waybill number, which is the thing they came away for */
.done__awb {
  display: inline-block;
  font-family: var(--font-display); font-weight: 900;
  font-size: clamp(27px, 4.4vw, 38px); letter-spacing: .02em;
  color: var(--red); direction: ltr;
  padding: 10px 24px; margin: 0 0 16px;
  background: var(--tint); border: 1.5px dashed var(--blush); border-radius: 14px;
}

/* Buttons on their own rows, never sharing a line with the text — the old
   inline-flex button sat in the message's line box and rode over it. */
.done__actions {
  display: flex; flex-wrap: wrap; justify-content: center;
  gap: 12px; margin-top: 26px;
}
.done__actions .btn { flex: 0 1 auto; }
@media (max-width: 560px) {
  .done__actions { flex-direction: column; align-items: stretch; }
  .done__actions .btn { width: 100%; }
}

/* ---------- right-to-left ---------- */
html[dir="rtl"] .opt--wide,
html[dir="rtl"] .opt--city { text-align: right; }
html[dir="rtl"] .f input,
html[dir="rtl"] .f textarea { padding: 14px 42px 14px 15px; }
html[dir="rtl"] .f textarea { padding-right: 15px; }
html[dir="rtl"] .f label { letter-spacing: normal; }
html[dir="rtl"] .review-list .v { text-align: left; }
html[dir="rtl"] .quote__row span:last-child { text-align: left; }
html[dir="rtl"] .prog__fill { background: linear-gradient(270deg, var(--deep), var(--red)); }
html[dir="rtl"] .back-link svg,
html[dir="rtl"] .nav-row .btn svg { transform: scaleX(-1); }
html[dir="rtl"] .opt__tick { right: auto; left: 9px; }

@media (prefers-reduced-motion: reduce) {
  .bstep.on { animation: none; }
  .opt:hover:not([disabled]) { transform: none; }
  .prog__fill { transition: none; }
}

/* ---- icon sizing -----------------------------------------------------------
   These icons are drawn with a viewBox and no width/height, so without an
   explicit size they stretch to fill their container — which blew the arrow
   up to the full width of the Continue button on narrow screens. */
.btn svg, .back-link svg { width: 18px; height: 18px; flex-shrink: 0; }
.opt__tick svg { width: 13px; height: 13px; }
.done__tick svg { width: 34px; height: 34px; }