/* مقترح — مركز الدفع: نافذة إتمام الطلب، أزرار السلة، صفحة الرصيد */
.mqa-co, .mqa-cartpay, .mqa-wallet, .mqa-paybox, .mqa-toast {
	--p-primary: var(--mq-primary, #0a1826);
	--p-secondary: var(--mq-secondary, #01427a);
	--p-accent: var(--mq-accent, #3de6b0);
	--p-accent2: var(--mq-accent2, #e6d833);
	--p-surface: var(--mq-surface, #fff);
	--p-bg: var(--mq-bg, #f2f2f2);
	--p-heading: var(--mq-heading, #14202d);
	--p-muted: var(--mq-muted, #7b8794);
	--p-border: var(--mq-border, #e3e7ec);
	--p-price: var(--mq-price, var(--mq-secondary, #01427a));
	--p-sale: var(--mq-sale, #e11d48);
	--p-wa: var(--mq-whatsapp, #25d366);
	--p-r: var(--mq-r, 22px);
}

/* ---------- نافذة إتمام الطلب ---------- */
.mqa-co__box { width: min(560px, 100%); }
.mqa-co__ico { background: color-mix(in srgb, var(--p-accent) 18%, transparent) !important; color: var(--p-secondary) !important; }
.mqa-co__items { list-style: none; margin: 0 0 10px; padding: 12px 16px; background: var(--p-bg); border-radius: 14px; max-height: 180px; overflow-y: auto; }
.mqa-co__items li { display: flex; justify-content: space-between; gap: 12px; padding: 6px 0; font-size: 14px; }
.mqa-co__items li + li { border-top: 1px dashed var(--p-border); }
.mqa-co__items b { color: var(--p-price); white-space: nowrap; }
.mqa-co__sums { display: grid; gap: 4px; padding: 0 4px 14px; }
.mqa-co__row { display: flex; justify-content: space-between; align-items: center; gap: 10px; font-weight: 600; color: var(--p-heading); }
.mqa-co__row[hidden] { display: none; }
.mqa-co__disc { font-size: 14px; color: #047857; }
.mqa-co__total b { font-size: 22px; color: var(--p-price); }
.mqa-co__form { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 14px; }
.mqa-co__form label { display: flex; flex-direction: column; gap: 6px; font-size: 13px; font-weight: 600; color: var(--p-heading); }
.mqa-co__form label:first-of-type:last-of-type, .mqa-co__full { grid-column: 1 / -1; }
.mqa-co__form input, .mqa-co__form textarea { width: 100%; padding: 11px 14px; border-radius: 14px; border: 1.5px solid var(--p-border); background: var(--p-surface); font: inherit; font-weight: 400; }
.mqa-co__form input:focus, .mqa-co__form textarea:focus { outline: 0; border-color: var(--p-accent); box-shadow: 0 0 0 4px color-mix(in srgb, var(--p-accent) 20%, transparent); }
.mqa-co__form .is-invalid { border-color: var(--p-sale); }
.mqa-hp { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.mqa-co__methods { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 8px; margin-bottom: 14px; }
.mqa-co__methods button { display: flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 8px 12px; border: 0; border-radius: 14px; background: var(--p-bg); box-shadow: inset 0 0 0 1.5px var(--p-border); font: inherit; font-weight: 700; font-size: 14px; color: var(--p-heading); cursor: pointer; transition: .2s; }
.mqa-co__methods button[aria-checked=true] { background: color-mix(in srgb, var(--p-accent) 14%, #fff); box-shadow: inset 0 0 0 2px var(--p-accent); }
.mqa-co__methods svg { flex: none; }
.mqa-co__pane { display: grid; gap: 10px; }
.mqa-co__pane[hidden] { display: none; }
.mqa-co__bal { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 12px 14px; border-radius: 14px; background: color-mix(in srgb, var(--p-accent) 10%, #fff); }
.mqa-co__bal span { display: inline-flex; align-items: center; gap: 6px; color: var(--p-muted); font-size: 14px; }
.mqa-co__bal b { font-size: 19px; color: var(--p-primary); }
.mqa-co__bal a { margin-inline-start: auto; font-size: 13px; font-weight: 700; color: var(--p-secondary); }
.mqa-co__low { margin: 0; padding: 9px 12px; border-radius: 12px; background: #fff7ed; color: #9a3412; font-size: 13px; }
.mqa-co__low a { color: inherit; font-weight: 700; }
.is-low .mqa-co__walletbtn { opacity: .55; }
.mqa-co__guest { display: grid; gap: 8px; text-align: center; }
.mqa-co__guest p { margin: 0; color: var(--p-muted); font-size: 14px; }
.mqa-co__guest[hidden] { display: none; }
.mqa-co__msg { margin: 12px 0 0; padding: 10px 14px; border-radius: 12px; font-size: 14px; }
.mqa-co__msg.is-err { background: #fef2f2; color: #991b1b; }
.mqa-co__msg.is-ok { background: color-mix(in srgb, var(--p-accent) 16%, #fff); color: #065f46; }
.mqa-co__msg a { color: inherit; font-weight: 700; }
.mqa-co__terms { margin: 12px 0 0; font-size: 12px; color: var(--p-muted); text-align: center; }
.mqa-pp-loading, .mqa-pp-fail { margin: 0; padding: 12px; border-radius: 12px; background: var(--p-bg); color: var(--p-muted); font-size: 13px; text-align: center; }

/* ---------- أزرار الدفع داخل درج السلة ---------- */
.mqa-cartpay { display: grid; gap: 8px; }
.mqa-cartpay__bal { display: flex; align-items: center; gap: 8px; padding: 8px 12px; border-radius: 12px; background: color-mix(in srgb, var(--p-accent) 10%, #fff); font-size: 13px; }
.mqa-cartpay__bal span { color: var(--p-muted); }
.mqa-cartpay__bal b { color: var(--p-primary); }
.mqa-cartpay__bal a { margin-inline-start: auto; font-weight: 700; color: var(--p-secondary); }
.mqa-cartpay__btns { display: flex; gap: 6px; }
.mqa-cartpay__btns button { flex: 1; min-height: 38px; padding: 6px 8px; border: 0; border-radius: 999px; background: var(--p-bg); box-shadow: inset 0 0 0 1.5px var(--p-border); font: inherit; font-size: 13px; font-weight: 700; color: var(--p-heading); cursor: pointer; }
.mqa-cartpay__btns button:hover { box-shadow: inset 0 0 0 2px var(--p-accent); }
.mqa-cartpay__btns .is-whatsapp { color: #128c4b; }
.mqa-cartpay__btns .is-paypal { color: #003087; }

/* ---------- رصيدي ---------- */
.mqa-wallet { display: grid; gap: 22px; }
.mqa-wallet__grid { display: grid; grid-template-columns: minmax(0, 300px) minmax(0, 1fr); gap: 22px; align-items: start; }
.mqa-wallet__card { position: relative; overflow: hidden; display: grid; gap: 10px; padding: 22px; border-radius: var(--p-r); color: #fff; background: radial-gradient(120% 120% at 100% 0, var(--p-secondary), var(--p-primary)); }
.mqa-wallet__card::after { content: ""; position: absolute; inset: auto -40px -60px auto; width: 170px; height: 170px; border-radius: 50%; background: linear-gradient(135deg, var(--p-accent), var(--p-accent2)); opacity: .22; pointer-events: none; }
.mqa-wallet__label { font-size: 14px; opacity: .8; }
.mqa-wallet__bal { font-size: clamp(28px, 4vw, 38px); line-height: 1.2; color: var(--p-accent); }
.mqa-wallet__hint { margin: 0; font-size: 13px; opacity: .8; }
.mqa-wallet__tiers { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; font-size: 13px; position: relative; z-index: 1; }
.mqa-wallet__tiers li { display: flex; align-items: center; gap: 6px; }
.mqa-wallet__tiers svg { color: var(--p-accent2); flex: none; }
.mqa-wallet__topup { display: grid; gap: 12px; }
.mqa-wallet__topup h3, .mqa-wallet__log h3 { margin: 0; font-size: 18px; }
.mqa-wallet__presets { display: flex; flex-wrap: wrap; gap: 8px; }
.mqa-wallet__presets button { min-height: 42px; padding: 6px 16px; border: 0; border-radius: 999px; background: var(--p-bg); box-shadow: inset 0 0 0 1.5px var(--p-border); font: inherit; font-weight: 700; color: var(--p-heading); cursor: pointer; }
.mqa-wallet__presets button.is-on { background: var(--p-primary); color: #fff; box-shadow: none; }
.mqa-wallet .mqa-field { display: grid; gap: 6px; }
.mqa-wallet .mqa-field span { font-weight: 700; font-size: 14px; }
.mqa-wallet .mqa-field small { color: var(--p-muted); font-size: 12px; }
.mqa-wallet__amount { width: 100%; min-height: 46px; padding: 10px 14px; border: 1.5px solid var(--p-border); border-radius: 14px; font: inherit; font-size: 17px; }
.mqa-wallet__sum { display: grid; gap: 6px; }
.mqa-wallet__sum:empty { display: none; }
.mqa-wallet__sum div { display: flex; justify-content: space-between; gap: 10px; padding: 10px 14px; border-radius: 12px; background: var(--p-bg); font-size: 14px; }
.mqa-wallet__sum .is-bonus { background: color-mix(in srgb, var(--p-accent2) 22%, #fff); }
.mqa-wallet__msg { margin: 0; padding: 10px 14px; border-radius: 12px; font-size: 14px; }
.mqa-wallet__msg.is-err { background: #fef2f2; color: #991b1b; }
.mqa-wallet__msg.is-ok { background: color-mix(in srgb, var(--p-accent) 16%, #fff); color: #065f46; }
.mqa-wallet__manual { padding: 12px 14px; border-radius: 12px; background: #f8fafc; font-size: 13.5px; color: #334155; }
.mqa-wallet__manual p { margin: 0; }
.mqa-wallet__empty { margin: 0; color: var(--p-muted); }
.mqa-tx { display: grid; }
.mqa-tx__row { display: grid; grid-template-columns: auto minmax(0, 1fr) auto auto; align-items: center; gap: 12px; padding: 12px 0; border-top: 1px solid var(--p-border); }
.mqa-tx__row:first-child { border-top: 0; }
.mqa-tx__ico { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 12px; background: color-mix(in srgb, var(--p-accent) 18%, #fff); color: #047857; }
.mqa-tx__ico.is-neg { background: #fef2f2; color: #b91c1c; }
.mqa-tx__main { display: grid; min-width: 0; }
.mqa-tx__main small { color: var(--p-muted); font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mqa-tx__amt { color: #047857; white-space: nowrap; }
.mqa-tx__amt.is-neg { color: #b91c1c; }
.mqa-tx .mqa-chip { color: var(--c, #64748b); background: color-mix(in srgb, var(--c, #64748b) 12%, #fff); }
.mqa-paybox { display: grid; justify-items: center; gap: 10px; padding: 26px; border-radius: var(--p-r); background: var(--p-surface); text-align: center; }
.mqa-paybox p { margin: 0; }

/* ---------- رسالة ---------- */
.mqa-toast { position: fixed; z-index: 1100; inset-inline: 16px; bottom: 20px; max-width: 480px; margin-inline: auto; padding: 14px 18px; border-radius: 16px; background: var(--p-primary); color: #fff; font-size: 14px; box-shadow: 0 20px 40px -10px rgba(0, 0, 0, .35); transform: translateY(30px); opacity: 0; transition: .35s; }
.mqa-toast.is-show { transform: none; opacity: 1; }

@media (max-width: 760px) {
	.mqa-wallet__grid { grid-template-columns: 1fr; }
	.mqa-co__form { grid-template-columns: 1fr; }
}
@media (max-width: 520px) {
	.mqa-tx__row { grid-template-columns: auto minmax(0, 1fr) auto; }
	.mqa-tx__row .mqa-chip { grid-column: 2; justify-self: start; }
	.mqa-co__methods { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
	.mqa-co__methods button { flex-direction: column; gap: 4px; min-height: 58px; padding: 6px 4px; font-size: 12px; line-height: 1.3; text-align: center; }
}

/* ---------- الكوبونات ---------- */
.mqa-co__coupon { display: grid; gap: 8px; margin: 0 0 14px; }
.mqa-co__cform { display: flex; gap: 8px; }
.mqa-co__cform[hidden], .mqa-co__capplied[hidden], .mqa-co__cmine[hidden], .mqa-co__cmsg[hidden] { display: none; }
.mqa-co__ccode { flex: 1; min-width: 0; padding: 10px 14px; border-radius: 14px; border: 1.5px dashed var(--p-border); background: var(--p-surface); font: inherit; letter-spacing: .5px; text-transform: uppercase; }
.mqa-co__ccode:focus { outline: 0; border-color: var(--p-accent); border-style: solid; }
.mqa-co__capply { flex: none; padding: 8px 18px; border: 0; border-radius: 14px; background: var(--p-primary); color: #fff; font: inherit; font-weight: 700; cursor: pointer; }
.mqa-co__capplied { display: flex; align-items: center; gap: 8px; padding: 9px 12px; border-radius: 12px; background: color-mix(in srgb, var(--p-accent) 16%, #fff); color: #065f46; font-size: 13px; font-weight: 700; }
.mqa-co__capplied span { flex: 1; min-width: 0; }
.mqa-co__cremove { flex: none; width: 26px; height: 26px; border: 0; border-radius: 50%; background: #fff; color: var(--p-muted); font-size: 16px; line-height: 1; cursor: pointer; }
.mqa-co__cmine { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; font-size: 12px; color: var(--p-muted); }
.mqa-co__cmine button { padding: 4px 10px; border: 1.5px dashed color-mix(in srgb, var(--p-accent) 70%, #000 0%); border-radius: 999px; background: color-mix(in srgb, var(--p-accent) 8%, #fff); font: inherit; font-size: 12px; font-weight: 700; color: var(--p-heading); cursor: pointer; direction: ltr; }
.mqa-co__cmsg { margin: 0; font-size: 13px; }
.mqa-co__cmsg.is-err { color: #b91c1c; }
.mqa-co__cmsg.is-ok { color: var(--p-muted); }
.mqa-co__cdisc { font-size: 14px; color: #047857; }
.mqa-co__cdisc i { font-style: normal; font-weight: 800; }
.mqa-wallet__gift { position: relative; z-index: 1; display: flex; gap: 6px; margin-top: 4px; }
.mqa-wallet__gift input { flex: 1; min-width: 0; padding: 8px 12px; border: 1px dashed rgba(255, 255, 255, .45); border-radius: 12px; background: rgba(255, 255, 255, .08); color: #fff; font: inherit; font-size: 13px; text-transform: uppercase; }
.mqa-wallet__gift input::placeholder { color: rgba(255, 255, 255, .65); text-transform: none; }
.mqa-wallet__gift button { flex: none; padding: 6px 14px; border: 0; border-radius: 12px; background: linear-gradient(90deg, var(--p-accent), var(--p-accent2)); color: var(--p-primary); font: inherit; font-weight: 800; cursor: pointer; }
.mqa-wallet__giftmsg { position: relative; z-index: 1; margin: 0; font-size: 13px; }
.mqa-wallet__giftmsg.is-ok { color: var(--p-accent); }
.mqa-wallet__giftmsg.is-err { color: #fecaca; }
