/* Commerce layout. Typography uses the shared scale in tokens.css. */
.commerce-screen { min-width: 0; }
.commerce-screen :is(h1, h2, h3, p, dd, bdi, .quote-line) { overflow-wrap: anywhere; }
.commerce-screen :is(.detail-stack, .order-summary, .notification-row > div) { min-width: 0; }
.commerce-screen .status { white-space: normal; line-height: 1.5; font-size: var(--text-xs); padding: 4px 10px; }
.commerce-screen :is(.button, .back-link, .commerce-link) { min-height: 44px; }
.commerce-screen .button { white-space: normal; text-align: center; line-height: 1.5; font-size: var(--text-sm); }
.commerce-link { display: inline-flex; align-items: center; gap: 8px; color: var(--primary); font-weight: 600; }
.commerce-screen .back-link { display: inline-flex; align-items: center; gap: 6px; font-size: var(--text-sm); }
.commerce-screen .back-link .icon { width: 16px; height: 16px; }
html[dir="rtl"] .commerce-screen .back-link .icon { transform: scaleX(-1); }
html[dir="ltr"] .commerce-screen .back-link .icon { transform: none; }
.commerce-screen .page-heading { gap: 12px; }
.commerce-screen .page-heading h1 { font-size: var(--text-xl); line-height: 1.4; margin: 0; }
.commerce-screen .page-heading p { font-size: var(--text-xs); margin: 4px 0 0; }

/* A request is a compact summary row with a single, clear link. */
.commerce-screen .order-list { gap: 10px; }
.commerce-screen .order-card { display: grid; grid-template-columns: 40px minmax(0, 1fr) auto; align-items: start; gap: 6px 12px; padding: 16px; border-radius: var(--radius); box-shadow: none; }
.commerce-screen .order-card > .service-icon { width: 40px; height: 40px; border-radius: 12px; margin: 0; }
.commerce-screen .order-card > .service-icon .icon { width: 22px; height: 22px; }
.commerce-screen .order-summary h2 { font-size: var(--text-base); line-height: 1.5; margin: 3px 0; }
.commerce-screen .order-summary p, .commerce-screen .order-summary .eyebrow { font-size: var(--text-xs); margin: 0; line-height: 1.5; }
.commerce-screen .order-card > .status { margin: 0; justify-self: end; }
.commerce-screen .order-card-footer { grid-column: 2 / -1; display: flex; justify-content: space-between; align-items: center; font-size: var(--text-xs); color: var(--primary); font-weight: 600; padding-top: 6px; }
.commerce-screen .order-card-footer .icon { width: 16px; height: 16px; }
.orders-empty { display: flex; align-items: center; gap: 12px; padding: 20px; }
.orders-empty p { margin: 0; color: var(--muted); font-size: var(--text-sm); }
.orders-empty .service-icon { flex: none; margin: 0; }

/* One state message, request information and the current quote/action. */
.order-detail-screen .order-heading { align-items: center; }
.order-detail-screen .order-heading > div { min-width: 0; }
.order-detail-screen .order-heading > .status { flex-shrink: 0; max-width: 38%; }
.order-detail-screen .order-heading .eyebrow { margin: 0; font-size: var(--text-xs); }
.order-detail-screen .order-created { color: var(--muted); }
.order-context { padding: 12px 16px; display: flex; align-items: start; gap: 12px; margin-bottom: 12px; background: var(--blue); border-color: transparent; box-shadow: none; }
.order-context .service-icon { flex: none; width: 32px; height: 32px; border-radius: 10px; margin: 0; }
.order-context .service-icon .icon { width: 20px; height: 20px; }
.order-context strong { color: var(--primary); font-size: var(--text-sm); line-height: 1.5; }
.order-context p { margin: 3px 0 0; font-size: var(--text-xs); line-height: 1.6; color: var(--muted); }
.order-detail-screen .detail-grid { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 16px; align-items: start; }
.order-detail-screen .detail-stack { display: grid; gap: 12px; }
.order-detail-screen :is(.detail-card, .form-surface) { padding: 16px; box-shadow: none; }
.order-detail-screen :is(.detail-card, .form-surface) h2 { font-size: var(--text-lg); line-height: 1.5; margin: 0 0 8px; }
.order-detail-screen :is(.detail-card, .notice) p { font-size: var(--text-sm); line-height: 1.6; margin-block: 8px; }
.order-detail-screen .detail-values { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin: 0; }
.order-detail-screen .detail-values > div { min-width: 0; padding-bottom: 10px; border-bottom: 1px solid var(--line-soft); }
.order-detail-screen .detail-values .full-width { grid-column: 1 / -1; }
.order-detail-screen .detail-values dt { font-size: var(--text-xs); line-height: 1.5; color: var(--muted); }
.order-detail-screen .detail-values dd { margin: 3px 0 0; font-size: var(--text-sm); line-height: 1.6; }
.order-detail-screen details > summary { min-height: 44px; display: flex; align-items: center; gap: 10px; color: var(--primary); font-size: var(--text-sm); font-weight: 600; cursor: pointer; list-style: none; }
.order-detail-screen details > summary::after { content: '+'; margin-inline-start: auto; font-size: var(--text-lg); }
.order-detail-screen details[open] > summary::after { content: '−'; }
.order-detail-screen details > summary::-webkit-details-marker { display: none; }
.order-detail-screen details[open] > summary { margin-bottom: 10px; }
.order-detail-screen .archived-quote > summary { flex-wrap: wrap; gap: 6px 12px; }
.order-detail-screen .archived-quote > summary bdi { font-size: var(--text-base); margin-inline-start: auto; }
.order-detail-screen .archived-quote > summary small { font-size: var(--text-xs); font-weight: 400; }
.order-detail-screen .archived-quote > summary::after { margin-inline-start: 0; }
.order-detail-screen details > summary:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; border-radius: 4px; }
.order-detail-screen .order-service-help { padding: 8px 16px; margin: 0; background: var(--soft); border: 1px solid var(--line); }
.order-detail-screen .order-service-help p { font-size: var(--text-xs); }
.order-detail-screen .quote-card .eyebrow { font-size: var(--text-xs); margin: 0 0 4px; }
.order-detail-screen .quote-card .quote-total { font-size: var(--text-2xl); font-variant-numeric: tabular-nums; line-height: 1.35; letter-spacing: 0; margin: 8px 0; }
.order-detail-screen .quote-total small { font-size: var(--text-sm); font-weight: 500; }
.order-detail-screen .quote-line { padding: 10px 0; font-size: var(--text-sm); line-height: 1.6; }
.order-detail-screen .quote-line strong { font-size: var(--text-xs); margin-bottom: 3px; }
.order-detail-screen .quote-card .muted { font-size: var(--text-xs); line-height: 1.6; }
.order-detail-screen .quote-card .button { margin-top: 12px; padding: 10px 12px; min-height: 44px; }
.order-detail-screen .acceptance-note { margin-top: 8px; }
.order-detail-screen .notice { padding: 12px; font-size: var(--text-sm); }
.quote-expired-notice { margin-top: 12px; }
.order-resolution-summary { margin-bottom: 12px; overflow-wrap: anywhere; border-inline-start: 3px solid var(--primary); }
.order-resolution-summary small { color: var(--muted); font-size: var(--text-xs); }
.order-awaiting-quote .detail-grid { grid-template-columns: minmax(0, 1fr); }
.order-awaiting-quote .order-next-action:empty { display: none; }

.wallet-screen { max-width: 760px; margin-inline: auto; }
.wallet-overview { display: grid; grid-template-columns: minmax(0, 1fr); gap: 0; margin-bottom: 28px; }
.wallet-balance-card { background: linear-gradient(125deg, #b94800, #d8003f); background: linear-gradient(125deg, color-mix(in srgb, var(--accent-pressed), #000 8%), color-mix(in srgb, var(--brand-red), #000 8%)); color: var(--paper); position: relative; overflow: hidden; border: none; border-radius: 24px; min-height: 230px; padding: 26px 28px 44px; box-shadow: 0 12px 28px rgb(235 0 69 / 12%); }
.wallet-balance-card::before { content: ''; width: 290px; height: 290px; border: 1px solid rgb(255 255 255 / 25%); border-radius: 50%; position: absolute; inset-inline-end: -100px; top: -170px; pointer-events: none; }
.wallet-balance-card::after { content: ''; width: 240px; height: 240px; border: 32px solid rgb(255 255 255 / 5%); border-radius: 50%; position: absolute; inset-inline-start: -120px; bottom: -160px; pointer-events: none; }
.wallet-card-heading { display: flex; align-items: center; justify-content: space-between; gap: 16px; font-size: var(--text-sm); margin-bottom: 24px; }
.wallet-card-heading .icon { width: 26px; height: 26px; }
.wallet-balance-card .eyebrow, .wallet-balance-card .quote-total small { color: var(--paper); }
.wallet-screen .wallet-balance-card .quote-total { font-size: clamp(30px, 8vw, 44px); margin-block: 8px; color: var(--paper); }
.wallet-currency { display: inline-flex; font-size: var(--text-xs); margin-top: 8px; }
.wallet-actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); position: relative; z-index: 1; margin: -22px 18px 0; padding: 8px; border-radius: 18px; border: 1px solid var(--line-soft); background: var(--paper); box-shadow: var(--shadow); gap: 8px; }
.wallet-actions a { min-height: 66px; display: flex; align-items: center; justify-content: center; gap: 10px; border-radius: 12px; color: var(--muted); font-weight: 600; font-size: var(--text-sm); }
.wallet-actions a.selected { background: var(--blue); color: var(--primary); }
.wallet-actions a:focus-visible, .funding-method summary:focus-visible { outline: 2px solid var(--primary); outline-offset: 3px; }
.wallet-action-icon { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; background: var(--soft); color: var(--primary); font-size: var(--text-2xl); font-weight: 400; }
.wallet-action-icon .icon { width: 20px; height: 20px; }
.wallet-panel-heading { margin-bottom: 18px; }
.wallet-panel-heading h2 { font-size: var(--text-lg); margin: 0; }
.wallet-panel-heading p, .wallet-panel-heading > .muted { font-size: var(--text-sm); color: var(--muted); margin-top: 5px; }
.funding-method { border: 1px solid var(--line); background: var(--paper); border-radius: 18px; margin-bottom: 12px; overflow: hidden; }
.funding-method summary { list-style: none; display: flex; align-items: center; gap: 12px; min-height: 94px; padding: 18px; cursor: pointer; }
.funding-method summary::-webkit-details-marker { display: none; }
.funding-method-logo { flex: 0 0 76px; height: 54px; display: grid; place-items: center; background: #fff; border-radius: 10px; }
.funding-method-logo img { width: 100%; height: auto; max-height: 54px; object-fit: contain; }
.funding-method-logo.zakhir-logo img { width: 50px; height: 50px; }
.funding-method-copy { min-width: 0; flex: 1; }
.funding-method-copy strong, .funding-method-copy small { display: block; }
.funding-method-copy strong { font-size: var(--text-base); }
.funding-method-copy small { color: var(--muted); font-size: var(--text-xs); margin-top: 3px; }
.funding-soon { font-size: var(--text-xs); color: var(--muted); background: var(--soft); padding: 3px 9px; border-radius: 20px; }
.funding-chevron { font-size: var(--text-lg); color: var(--muted); }
.funding-method[open] .funding-chevron { transform: rotate(180deg); }
.funding-method-detail { padding: 0 18px 18px; color: var(--muted); font-size: var(--text-sm); line-height: 1.9; }
.funding-method-detail strong { color: var(--primary); }
.wallet-funding-note { color: var(--muted); font-size: var(--text-xs); text-align: center; margin-top: 20px; }
.wallet-transactions { list-style: none; margin: 0; padding: 0; }
.wallet-transaction { padding: 20px 24px; border-bottom: 1px solid var(--line); }
.wallet-transaction:last-child { border-bottom: none; }
.transaction-heading { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 12px; align-items: center; }
.transaction-heading h3 { font-size: var(--text-sm); margin: 0 0 3px; }
.transaction-heading time { font-size: var(--text-xs); color: var(--muted); }
.transaction-icon { width: 40px; height: 40px; display: grid; place-items: center; background: var(--blue); border-radius: 14px; font-size: var(--text-xl); color: var(--primary); }
.transaction-amount { font-size: var(--text-base); color: var(--primary); font-variant-numeric: tabular-nums; }
.transaction-amount small { font-size: var(--text-xs); font-weight: 500; }
.transaction-footer { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 8px; font-size: var(--text-xs); color: var(--muted); padding-top: 10px; margin-top: 12px; border-top: 1px solid var(--line-soft); }
.notification-unread { background: var(--blue); border-inline-start: 3px solid var(--primary); }
.notification-unread-label { display: inline-block; margin-inline-start: 6px; padding: 2px 7px; border-radius: 20px; background: var(--paper); color: var(--primary); font-size: var(--text-xs); font-weight: 600; vertical-align: middle; }
.commerce-screen .notification-row { gap: 14px; }
.commerce-screen .notification-row .service-icon { flex-shrink: 0; }
.commerce-screen .notification-row h2 { line-height: 1.8; }
.commerce-screen .notification-row p { line-height: 1.9; font-size: var(--text-sm); }
.commerce-screen .notification-row time { display: block; font-size: var(--text-xs); margin: 8px 0 0; }
.commerce-screen .notification-row a { font-size: var(--text-sm); margin-top: 4px; }
.commerce-screen .read-notifications { margin-bottom: 18px; }

/* The shell stays fixed; lengthy content remains reachable inside its region. */
.app-page .app-content-screen { display: flex; flex: 1 1 0; flex-direction: column; min-height: 0; width: 100%; }
.app-page .app-content-screen > :not(.commerce-scroll) { flex-shrink: 0; }
.app-page .app-content-screen > .page-heading { margin: 0 0 12px; gap: 12px; }
.app-page .app-content-screen .commerce-scroll { flex: 1 1 0; min-height: 0; min-width: 0; overflow: auto; overscroll-behavior-y: contain; scrollbar-width: none; scroll-padding-block: 12px; }
.app-page .app-content-screen .commerce-scroll::-webkit-scrollbar { display: none; }
.app-page .app-content-screen .commerce-scroll:focus-visible { outline: 2px solid var(--primary); outline-offset: -2px; }
.app-page .app-content-screen .order-list { padding: 2px 2px 12px; align-content: start; }
.app-page .app-content-screen > .pagination { margin-top: 10px; }
.app-page .app-content-screen > .read-notifications { margin-bottom: 10px; }
.app-page .app-content-screen > .back-link { align-self: flex-start; margin: 0; }
.app-page .order-detail-content { padding: 2px 2px 12px; }
.commerce-pagination { gap: 8px; flex-wrap: wrap; font-size: var(--text-xs); }
.commerce-pagination > .button { min-height: 44px; }
@media (max-width: 760px) {
  .commerce-screen .page-heading { flex-direction: row; align-items: center; }
  .commerce-screen .order-card { grid-template-columns: 36px minmax(0, 1fr); padding: 12px; gap: 6px 10px; }
  .commerce-screen .order-card > .service-icon { width: 36px; height: 36px; }
  .commerce-screen .order-summary { grid-column: 2; }
  .commerce-screen .order-card > .status { grid-column: 2; justify-self: start; }
  .commerce-screen .order-card-footer { grid-column: 2; }
  .order-detail-screen .order-heading h1 { font-size: var(--text-lg); }
  .order-detail-screen .order-created { display: none; }
  .order-detail-screen .detail-grid { display: flex; flex-direction: column; gap: 12px; }
  .order-detail-screen .detail-grid > * { width: 100%; }
  .order-detail-screen:not(.operator-screen) .order-next-action { order: -1; }
  .order-detail-screen :is(.detail-card, .form-surface) { padding: 12px; }
  .order-detail-screen .detail-card h2 { font-size: var(--text-base); }
  .order-context { padding: 12px; gap: 10px; }
  .app-page .app-content-screen > .commerce-pagination { display: flex; flex-wrap: wrap; gap: 8px; }
  .app-page .app-content-screen > .commerce-pagination > .muted { flex: 1; padding: 0; font-size: var(--text-xs); }
  .app-page .app-content-screen > .commerce-pagination > .button { padding: 6px 10px; font-size: var(--text-xs); }
  .wallet-overview { margin-bottom: 26px; }
  .wallet-screen .page-heading { margin-bottom: 14px; }
  .wallet-screen .page-heading p { display: none; }
  .wallet-screen .wallet-balance-card { min-height: 202px; padding: 18px 20px 34px; }
  .wallet-card-heading { margin-bottom: 12px; }
  .wallet-actions { margin-inline: 12px; }
  .wallet-actions a { font-size: var(--text-sm); min-height: 60px; }
  .funding-method summary { min-height: 84px; padding: 12px; gap: 8px; }
  .funding-method-logo { flex-basis: 62px; }
  .funding-method-copy strong { font-size: var(--text-sm); }
  .funding-soon { padding-inline: 7px; }
  .wallet-history { border-radius: 18px; }
  .wallet-transaction { padding: 18px 16px; }
  .transaction-heading { grid-template-columns: 36px minmax(0, 1fr); gap: 10px; }
  .transaction-icon { width: 36px; height: 36px; border-radius: 12px; }
  .transaction-amount { grid-column: 2; font-size: var(--text-lg); }
  .transaction-footer { align-items: start; gap: 4px; }
  .transaction-footer > span { width: 100%; }
  .commerce-screen .notification-row { padding: 18px 14px; gap: 12px; }
  .commerce-screen .notification-row .service-icon { width: 36px; height: 36px; border-radius: 12px; }
  .commerce-screen .notification-row h2 { font-size: var(--text-base); }
  .commerce-screen .notification-list { overflow: hidden; border-radius: 18px; }
}
@media (prefers-reduced-motion: no-preference) {
  .commerce-screen .order-card { transition: border-color 160ms ease; }
  .commerce-screen .order-card:hover { border-color: var(--primary); }
}
/* A short landscape screen or an open keyboard must not trap content. */
@media (max-height: 480px) {
  .app-page .app-content-screen { flex: 0 0 auto; }
  .app-page .app-content-screen .commerce-scroll { flex: 0 0 auto; overflow: visible; }
}
.orders-filters { padding: 0 12px; margin-bottom: 12px; }
.orders-filters summary { cursor: pointer; min-height: 44px; display: flex; align-items: center; font-size: var(--text-sm); color: var(--primary); }
.orders-filters summary::after { content: '+'; margin-inline-start: auto; }
.orders-filters[open] summary::after { content: '−'; }
.orders-filters[open] { max-height: 48%; overflow: auto; padding-bottom: 12px; }
.orders-filters .form-grid { gap: 10px; }
.payment-balance-summary { padding: 8px 12px; border-radius: var(--radius-control); background: var(--blue); color: var(--primary); }
.passport-document-links { display: flex; flex-wrap: wrap; gap: 8px 16px; }
.order-heading-copy { width: 100%; }
.order-meta-row { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 8px; margin-bottom: 8px; }
.order-detail-screen .order-title { font-size: var(--text-lg); margin-bottom: 10px; }
.order-route { display: grid; grid-template-columns: minmax(0, 1fr) 28px minmax(0, 1fr); align-items: center; gap: 10px; max-width: 560px; }
.order-route-point { min-width: 0; }
.order-route-point small { display: block; color: var(--muted); font-size: var(--text-xs); min-height: 2em; margin-bottom: 3px; }
.order-route-place { display: grid; align-content: start; gap: 4px; font-size: var(--text-lg); font-weight: 600; }
.order-airport-code { justify-self: start; font-size: var(--text-xs); font-weight: 500; padding: 2px 6px; background: var(--blue); border-radius: 6px; }
.order-route-arrow { font-size: var(--text-lg); text-align: center; color: var(--primary); }
.customer-order-detail, .payment-review-screen { max-width: 960px; margin-inline: auto; }
.customer-order-detail .detail-grid { grid-template-columns: minmax(0, 1fr); }
.customer-order-detail .order-next-action { order: -1; }
.order-payment-entry { display: flex; align-items: center; justify-content: space-between; gap: 12px; border: 1px solid var(--line); border-radius: var(--radius); padding: 10px 14px; margin-top: 10px; background: var(--paper); }
.order-payment-entry small, .order-payment-entry strong { display: block; }
.order-payment-entry small { font-size: var(--text-xs); color: var(--muted); }
.order-payment-entry .button { min-width: 120px; }
.payment-review-screen .detail-card { padding: 18px; margin: 2px; }
.payment-review-card .eyebrow { font-size: var(--text-xs); margin: 0 0 14px; }
.payment-review-values { margin: 16px 0 0; }
.payment-review-values > div { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px; padding: 12px 0; border-top: 1px solid var(--line-soft); }
.payment-review-values dt { font-size: var(--text-sm); color: var(--muted); }
.payment-review-values dd { margin: 0; font-size: var(--text-sm); font-weight: 600; }
.payment-confirm-actions { flex: none; display: grid; gap: 8px; text-align: center; padding: 10px 2px 0; }
.payment-confirm-actions p { margin: 0; font-size: var(--text-xs); }
.payment-confirm-actions .commerce-link { justify-self: center; }
.button:disabled { background: var(--soft); color: var(--muted); cursor: not-allowed; box-shadow: none; }
.payment-receipt { border-inline-start: 3px solid var(--success); margin-bottom: 12px; }
.payment-receipt-summary { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 8px; font-size: var(--text-sm); }
.payment-receipt-summary time { color: var(--muted); font-size: var(--text-xs); }
.payment-receipt bdi { overflow-wrap: anywhere; }
@media (max-width: 800px) { .order-route-place { font-size: var(--text-base); } .order-payment-entry .button { min-width: 100px; } }
@media (max-height: 680px) {
  .payment-review-screen .payment-review-card { padding: 12px; }
  .payment-review-card .eyebrow { margin-bottom: 8px; }
  .payment-review-values { margin-top: 8px; }
  .payment-review-values > div { padding-block: 8px; }
}
.ticket-delivery-card { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px; border-color: var(--primary); }
.ticket-delivery-heading { display: flex; align-items: center; gap: 12px; min-width: 0; }
.ticket-delivery-card h2 { margin: 0; font-size: var(--text-base); }
.ticket-delivery-card p { margin: 4px 0 0; font-size: var(--text-xs); }
.ticket-delivery-card .button { min-height: 44px; font-size: var(--text-sm); }
@media (max-width: 600px) { .ticket-delivery-card .button { width: 100%; } }
