/* Maktoob — orders page: delivery problems, returns, refunds, calls (Batch 5). Loaded by build.py on orders.html. */

.ord-sr { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

/* ---------- a problem panel: icon heading, text, one next action ---------- */
.ord__prob { display: grid; gap: var(--s3); box-shadow: inset 4px 0 0 var(--blue); }
:root[dir="rtl"] .ord__prob { box-shadow: inset -4px 0 0 var(--blue); }
.ord__prob--warn { box-shadow: inset 4px 0 0 var(--red-act); }
:root[dir="rtl"] .ord__prob--warn { box-shadow: inset -4px 0 0 var(--red-act); }
.ord__prob--off { box-shadow: inset 4px 0 0 color-mix(in srgb, var(--ink) 40%, transparent); }
:root[dir="rtl"] .ord__prob--off { box-shadow: inset -4px 0 0 color-mix(in srgb, var(--ink) 40%, transparent); }
.ord__prob .panel__t { margin: 0; }
.ord__prob--warn .panel__t svg { color: var(--red-act); }
.ord__prob .field__hint--ink { font-size: 15px; line-height: 1.6; }
.ord__prob .ord__acts { margin-top: var(--s2); }

/* ---------- tracking: a failed leg, a parcel returned ---------- */
.track li.is-fail .track__dot { background: var(--red-act); box-shadow: none; color: var(--white); }
.track li.is-fail .track__t { color: var(--red-act); }
.track li.is-off .track__dot { background: color-mix(in srgb, var(--ink) 14%, var(--white)); box-shadow: none; color: var(--ink); }
.track li.is-off .track__t { color: var(--ink); font-weight: 700; }
.track li.is-fail::before, .track li.is-off::before { display: none; }

/* split parcels */
.ord__ph { font: 700 13px/1.2 var(--f-ui); letter-spacing: .09em; text-transform: uppercase; color: var(--ink-2); }
.ord__parcel .ord__k { margin-top: 4px; }
.ord__parcel .ord__eta { margin-top: 6px; }

/* ---------- the return ---------- */
.ord__ret-sum { margin-bottom: var(--s5); font-size: 14px; line-height: 1.5; color: var(--ink-2); }
.ord__ret .ord__eta { margin-top: 2px; }
.ord__ret .ord__acts { margin-top: var(--s2); }

/* ---------- refunds ---------- */
.ord__refunds { display: grid; gap: var(--s3); }
.ord__refunds .panel__t { margin: 0; }
.ord__rlist { display: grid; gap: 10px; }
.ord__rlist li { display: flex; justify-content: space-between; gap: 12px; align-items: baseline; padding-block: 10px; box-shadow: 0 1px 0 color-mix(in srgb, var(--ink) 10%, transparent); font-size: 15px; color: var(--ink); }
.ord__rlist li > span:first-child { display: grid; gap: 2px; }
.ord__rf dt { display: grid; gap: 2px; }
.ord__rf dd { white-space: nowrap; }
.ord__rf small { font-size: 12.5px; color: var(--ink-2); }
.ord__net { display: flex; justify-content: space-between; gap: 12px; font-weight: 700; color: var(--ink); }
.ord__net dd { font-variant-numeric: tabular-nums; }

/* ---------- dialogs: steps, items, cards, photos, the call ---------- */
.dlg .ord-step { margin-bottom: calc(-1 * var(--s3)); letter-spacing: .04em; }
.dlg .ord-fs { border: 0; padding: 0; margin: 0; min-width: 0; display: grid; gap: 10px; }
.dlg .ord-fs > legend { margin-bottom: 10px; }
.ord-cards--2 { grid-template-columns: 1fr 1fr; }
.ord-cards--2 > legend { grid-column: 1 / -1; }
.dlg .radio-card { min-height: 44px; }
.dlg .radio-card input { flex: none; width: 20px; height: 20px; margin: 1px 0 0; accent-color: var(--ink); }
.dlg .radio-card[aria-disabled="true"] { cursor: not-allowed; }
.ord-it { align-items: center; gap: 12px; padding: 10px 12px; min-height: 44px; border-radius: var(--r-md); box-shadow: inset 0 0 0 1.5px color-mix(in srgb, var(--ink) 16%, transparent); }
.ord-it:has(input:checked) { box-shadow: inset 0 0 0 2.5px var(--ink); }
.ord-it input { margin: 0; }
.ord-it .it__cv { width: 36px; flex: none; }
.ord-it__b { display: grid; gap: 2px; min-width: 0; font-size: 14px; }
.ord-it__b b { font-weight: 700; color: var(--ink); }
.ord-it__b small { font-size: 12.5px; line-height: 1.45; color: var(--ink-2); }
.ord-it.is-off { cursor: not-allowed; background: color-mix(in srgb, var(--ink) 4%, transparent); }
.ord-it.is-off .it__cv { opacity: .55; }
.ord-it.is-off .ord-it__b b { color: var(--ink-2); }
.select--block { display: flex; }
.select--block select { width: 100%; }
.select--light select { color: var(--ink); background: var(--white); box-shadow: inset 0 0 0 1.5px color-mix(in srgb, var(--ink) 20%, transparent); }

.ord-ph { gap: 10px; }
.ord-ph .field__hint--ink:empty { display: none; }
.ord-ph__list { display: flex; flex-wrap: wrap; gap: 10px; }
.ord-ph__list[hidden] { display: none; }
.ord-ph__list li { position: relative; width: 88px; height: 88px; border-radius: var(--r-md); overflow: hidden; background: var(--stone-50); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--ink) 12%, transparent); }
.ord-ph__list img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ord-ph__x { position: absolute; inset-block-start: 2px; inset-inline-end: 2px; display: grid; place-items: center; width: 44px; height: 44px; border: 0; padding: 0; background: transparent; cursor: pointer; color: var(--white); }
.ord-ph__x svg { width: 26px; height: 26px; padding: 6px; border-radius: 50%; background: rgb(0 41 56 / .78); }
.ord-ph__x:focus-visible { outline: 2px solid var(--ink); outline-offset: -4px; border-radius: 50%; }
.ord-ph__add { justify-self: start; position: relative; cursor: pointer; min-height: 44px; }
.ord-ph__add svg { width: 16px; height: 16px; }
.ord-ph__add[hidden] { display: none; }
.ord-ph__add:has(input:focus-visible) { outline: 2px solid var(--ink); outline-offset: 3px; }

.ord-call { display: grid; grid-template-columns: auto 1fr; gap: 6px 16px; align-items: baseline; padding: 14px 16px; border-radius: var(--r-md); background: var(--stone-50); }
.ord-call b { font: 700 18px/1.3 var(--f-ui); letter-spacing: .03em; color: var(--ink); text-align: start; }
.dlg__acts .btn svg { width: 18px; height: 18px; }
.dlg .note[hidden] { display: none; }

@media (max-width: 720px) {
  .ord-cards--2 { grid-template-columns: 1fr; }
  .dlg form { padding: var(--s5); }
  .dlg__acts { flex-direction: column-reverse; align-items: stretch; }
  .dlg__acts .btn { justify-content: center; }
  .ord-ph__list li { width: 80px; height: 80px; }
  .ord__rlist li { flex-wrap: wrap; }
  .ord__ret .step-p__h, .ord__parcel .step-p__h { flex-wrap: wrap; gap: 10px; }
  .ord__ret .step-p__h > div, .ord__parcel .step-p__h > div { flex: 1 1 100%; }
  /* Arabic: the status pill drops under the arrival time, so "اليوم، قبل ٦ م" keeps one line */
  [dir="rtl"] .step-p__h:has(> div > .ord__eta) { flex-wrap: wrap; gap: 10px; }
  [dir="rtl"] .step-p__h:has(> div > .ord__eta) > div { flex: 1 1 100%; }
}
.ord-en { display: contents; }

/* ---------- Batch 12: the confirmation head, the VAT line, receipts for e-books, gifts and Plus ---------- */
.ok__b { min-width: 0; }
.ok__meta { display: grid; gap: 6px; margin-top: var(--s4); font-size: 14.5px; line-height: 1.5; color: color-mix(in srgb, var(--stone) 88%, transparent); }
.ok__meta li { display: flex; gap: 10px; align-items: flex-start; }
.ok__meta svg { flex: none; width: 18px; height: 18px; margin-top: 2px; color: var(--sky); }
.ok__acts { display: flex; flex-wrap: wrap; gap: 10px; margin-top: var(--s5); }
.ok__acts .btn svg, .rc__acts .btn svg, .rc .btn svg { width: 18px; height: 18px; }
.ok .ok__ghost { --fg: var(--stone); box-shadow: inset 0 0 0 1.5px color-mix(in srgb, var(--stone) 45%, transparent); --hover: color-mix(in srgb, var(--stone) 12%, transparent); }
.ok .ok__ghost:hover { box-shadow: inset 0 0 0 1.5px var(--stone); }

/* "Includes VAT (14%)": quiet, under the total */
.sum .sum__vat { margin-top: -4px; font-size: 13px; color: var(--ink-2); }
.sum .sum__vat dd { color: var(--ink-2); }
.sum__vat + .sum__off { padding-top: 4px; }

/* the receipt */
.rc { display: grid; gap: var(--s4); }
.rc__item { display: flex; align-items: center; gap: 16px; padding-bottom: var(--s4); box-shadow: 0 1px 0 color-mix(in srgb, var(--ink) 10%, transparent); }
.rc__item .it__cv { width: 56px; flex: none; }
.rc__what { display: grid; gap: 2px; flex: 1; min-width: 0; }
.rc__what b { font: 700 18px/1.3 var(--f-ui); color: var(--ink); }
.rc__what b [lang="ar"] { font-family: var(--f-ar); }
.rc__what .tsub { font-size: 13px; color: var(--ink-2); }
.rc__amt { font: 700 20px/1.2 var(--f-ui); color: var(--ink); font-variant-numeric: tabular-nums; white-space: nowrap; }
.rc__plus { display: grid; place-items: center; width: 56px; aspect-ratio: 2 / 3; flex: none; border-radius: 4px; background: var(--ink); color: var(--sky); }
.rc__plus svg { width: 28px; height: 28px; }
.rc__t { margin: 0; }
.rc .ref { margin-top: -8px; }
.rc__p { display: flex; gap: 8px; align-items: flex-start; font-size: 15px; line-height: 1.6; }
.rc__p svg { flex: none; width: 18px; height: 18px; margin-top: 3px; color: var(--blue); }
.rc .field__hint--ink { font-size: 15px; line-height: 1.6; }
.rc__wa { margin: 0; }
.rc__refund { display: grid; gap: 4px; justify-items: start; padding-top: var(--s4); box-shadow: 0 -1px 0 color-mix(in srgb, var(--ink) 10%, transparent); }
.rc__refund .link--btn { min-height: 44px; font-weight: 600; }
.rc__facts dd { text-align: end; }
.shop__head > .pill { align-self: flex-end; margin-bottom: 6px; }

/* the orders list: purchases, and where they also live */
.ord__pu { margin-top: var(--s7); }
.ord__pu > h2 { margin-bottom: var(--s4); }
.ord__more { display: flex; gap: 10px; align-items: flex-start; margin-top: var(--s5); font-size: 14.5px; line-height: 1.5; color: var(--ink-2); }
.ord__more svg { flex: none; width: 18px; height: 18px; margin-top: 2px; color: var(--blue); }

@media (max-width: 720px) {
  .ok__acts .btn { flex: 1 1 100%; justify-content: center; }
  .rc__item { flex-wrap: wrap; }
  .rc__amt { font-size: 18px; }
  .rc__acts .btn { flex: 1 1 100%; justify-content: center; }
  .shop__head > .pill { align-self: flex-start; margin-bottom: 0; }
}
.shop__head h1 span[dir="ltr"] { white-space: nowrap; }

/* ---------- the return dialog: "Is something wrong with it?" points to Report a problem (a free pickup) ---------- */
.dlg .note[data-ret-fault] { font-size: 14px; }
.dlg .note[data-ret-fault] .link--btn { display: inline; min-height: 0; padding: 0; font-weight: 700; vertical-align: baseline; }
