/* PayOne store and admin: additions on top of style.css (shared base with the Neoleap page). */
.field textarea { width: 100%; padding: 10px 14px; background: var(--bg); border: 1px solid var(--line-strong); border-radius: var(--radius); color: var(--fg); font: inherit; font-size: 15px; outline: none; resize: vertical; }
.field textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(200, 138, 90, .25); }
.narrow { width: auto !important; }
.btn-small { display: inline-flex; align-items: center; height: 34px; padding: 0 12px; border: 1px solid var(--line-strong); border-radius: 8px; background: transparent; color: var(--fg); font: inherit; font-size: 13px; font-weight: 800; cursor: pointer; white-space: nowrap; }
.btn-small:hover { border-color: var(--accent); color: var(--accent); }
.btn-small:disabled { opacity: .6; cursor: wait; }
.small-link, .strong-link { color: var(--accent); font-weight: 700; }
.link-plain { color: var(--muted); font-size: 14px; text-decoration: underline; text-align: center; }
.danger { color: #fca5a5; }
.ok-text { color: #86efac; font-weight: 700; }
.bad-text { color: #fca5a5; font-weight: 700; }
.mono { direction: ltr; unicode-bidi: embed; }

/* Staging banner */
.test-banner { background: rgba(200, 138, 90, .14); border-bottom: 1px solid rgba(200, 138, 90, .35); color: #e7b68d; font-size: 13px; }
.test-banner .wrap { padding-top: 8px; padding-bottom: 8px; }
.test-banner .mono { color: var(--fg); font-weight: 700; }

/* Header cart */
.head-links { align-items: center; flex-wrap: wrap; justify-content: flex-end; }
.cart-link { position: relative; display: inline-flex; align-items: center; gap: 6px; height: 38px; padding: 0 12px; border: 1px solid var(--line-strong); border-radius: 999px; font-size: 14px; font-weight: 700; }
.cart-link:hover { border-color: var(--accent); color: var(--accent); }
.cart-link .count { min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px; background: var(--accent); color: var(--on-accent); font-size: 12px; line-height: 20px; text-align: center; }
.head-links form { margin: 0; }

/* Toast */
.toast { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin: 0 0 24px; padding: 12px 16px; border: 1px solid rgba(34, 197, 94, .4); background: rgba(34, 197, 94, .08); border-radius: var(--radius); color: #bbf7d0; }

/* Shop */
.shop-head { margin-bottom: 28px; }
.shop-head h1 { margin: 0 0 6px; font-family: Changa, 'IBM Plex Sans Arabic', sans-serif; font-size: 34px; }
.shop-head .lead { margin: 0; max-width: 620px; }
.products { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.product { display: flex; flex-direction: column; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; transition: border-color .2s; }
.product:hover { border-color: var(--line-strong); }
.product-img { aspect-ratio: 1 / 1; background: #0f0c0a; overflow: hidden; }
.product-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.product-body { display: flex; flex-direction: column; gap: 8px; padding: 18px; flex: 1; }
.product-body .tag { align-self: flex-start; }
.product h2 { margin: 0; font-size: 17px; font-weight: 700; line-height: 1.45; }
.product .price { margin: 0 0 8px; color: var(--accent); font-size: 20px; font-weight: 800; }
.product form { margin-top: auto; }
.product .btn-primary { height: 46px; font-size: 15px; }

/* Stepper */
.stepper { display: flex; gap: 8px; margin: 0 0 28px; padding: 0; list-style: none; }
.stepper li { flex: 1; display: flex; align-items: center; gap: 8px; padding-bottom: 10px; border-bottom: 3px solid var(--line); color: var(--muted); font-size: 14px; font-weight: 700; min-width: 0; }
.stepper li b { display: grid; place-items: center; flex: none; width: 26px; height: 26px; border-radius: 50%; border: 1px solid var(--line-strong); font-size: 13px; }
.stepper li span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.stepper li.done { border-bottom-color: rgba(34, 197, 94, .6); color: var(--fg); }
.stepper li.done b { background: var(--ok); border-color: var(--ok); color: #052e14; }
.stepper li.current { border-bottom-color: var(--accent); color: var(--fg); }
.stepper li.current b { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }

/* Cart */
.card > h1 { margin-bottom: 20px; }
.empty { max-width: 520px; margin: 0 auto; text-align: center; }
.line-item { display: flex; align-items: center; gap: 12px; white-space: normal; }
.line-item img { width: 64px; height: 64px; object-fit: cover; border-radius: 8px; flex: none; }
.line-item span { display: flex; flex-direction: column; font-weight: 700; }
.line-item small, .mini-lines small { color: var(--muted); font-weight: 400; }
input.qty { width: 72px; height: 40px; padding: 0 8px; background: var(--bg); border: 1px solid var(--line-strong); border-radius: 8px; color: var(--fg); font: inherit; text-align: center; }
.cart-table td { vertical-align: middle; }
.cart-foot { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin-top: 16px; flex-wrap: wrap; }
.cart-foot .btn-ghost { height: 42px; font-size: 14px; }
.cart-total { display: flex; gap: 16px; align-items: baseline; font-size: 18px; }
.cart-total b { font-size: 24px; color: var(--accent); }
.actions-row { display: flex; justify-content: space-between; gap: 12px; margin-top: 24px; padding-top: 20px; border-top: 1px solid var(--line); flex-wrap: wrap; }

/* Checkout */
.checkout { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: 24px; align-items: start; }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; }
.order-box { position: sticky; top: 20px; padding: 24px; }
.box-head { display: flex; justify-content: space-between; align-items: baseline; }
.mini-lines { list-style: none; margin: 0 0 12px; padding: 0; }
.mini-lines li { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.mini-lines li img { width: 48px; height: 48px; object-fit: cover; border-radius: 6px; flex: none; }
.mini-lines li span { flex: 1; display: flex; flex-direction: column; font-size: 14px; font-weight: 600; }
.mini-lines li b { white-space: nowrap; font-size: 14px; }
.total-row { display: flex; justify-content: space-between; align-items: baseline; padding-top: 8px; font-size: 16px; font-weight: 700; }
.total-row b { font-size: 22px; color: var(--accent); }
.pay-method { margin: 8px 0 12px; padding: 0; border: 0; }
.pay-method legend { padding: 0; margin-bottom: 8px; font-size: 14px; font-weight: 700; }
.method { display: flex; align-items: center; gap: 12px; padding: 14px; border: 1px solid var(--line-strong); border-radius: var(--radius); cursor: pointer; }
.method.selected { border-color: var(--accent); background: rgba(200, 138, 90, .07); }
.method input { accent-color: var(--accent); }
.method > span { flex: 1; display: flex; flex-direction: column; }
.method small { color: var(--muted); }
.fine.start { text-align: start; margin: 0 0 16px; }
.pay-logos { display: inline-flex; align-items: center; gap: 4px; }
.pay-logos b { display: inline-grid; place-items: center; height: 22px; padding: 0 6px; border-radius: 4px; background: #fff; font: 800 11px/1 system-ui, sans-serif; }
.pl-mada { color: #1b8b3a; }
.pl-visa { color: #1a1f71; font-style: italic; }
.pl-mc { width: 34px; position: relative; direction: ltr; }
.pl-mc i { position: absolute; top: 4px; width: 14px; height: 14px; border-radius: 50%; }
.pl-mc i:first-child { left: 5px; background: #eb001b; }
.pl-mc i:last-child { left: 14px; background: #f79e1b; opacity: .9; }

/* Result */
.result { max-width: 600px; }
.result-info .result-icon { background: #60a5fa; color: #0b1a33; }
.result .reason { margin-top: 0; }
.result-actions { display: grid; gap: 10px; margin: 0 0 8px; }
.result-actions form { margin: 0; }
.result .result-actions .btn-ghost { margin: 0; }
.receipt-items { margin: 0 0 24px; text-align: start; }
.receipt-items h3 { margin: 0 0 4px; }
.spinner { width: 56px; height: 56px; margin: 0 auto 20px; border-radius: 50%; border: 4px solid var(--line-strong); border-top-color: var(--accent); animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.progress { display: flex; margin: 0 0 24px; padding: 0; list-style: none; }
.progress li { flex: 1; position: relative; display: flex; flex-direction: column; align-items: center; gap: 6px; font-size: 12px; color: var(--muted); text-align: center; }
.progress li b { position: relative; z-index: 1; width: 16px; height: 16px; border-radius: 50%; background: var(--bg); border: 2px solid var(--line-strong); }
.progress li::before { content: ''; position: absolute; top: 7px; inset-inline-start: -50%; width: 100%; height: 2px; background: var(--line-strong); }
.progress li:first-child::before { display: none; }
.progress li.done { color: var(--fg); font-weight: 700; }
.progress li.done b { background: var(--ok); border-color: var(--ok); }
.progress li.done::before { background: var(--ok); }

/* Badges */
.badge { border-radius: 999px; white-space: nowrap; }
.badge-refund, .badge-info { background: rgba(96, 165, 250, .15); color: #93c5fd; }
.badge-muted { background: rgba(255, 255, 255, .08); color: var(--muted); }

/* Admin */
.is-admin .tabs { margin-bottom: 20px; }
.detail-head h1 { margin: 0; font-family: Changa, sans-serif; font-size: 28px; }
.detail-head .push { margin-inline-start: auto; }
.detail-grid { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 20px; align-items: start; }
.detail-grid .col { display: grid; grid-template-columns: minmax(0, 1fr); gap: 20px; min-width: 0; }
.detail-grid .card { padding: 24px; }
.stack { display: grid; gap: 4px; margin: 16px 0 0; }
.stack .btn-primary, .stack .btn-ghost, .stack .btn-stop { width: 100%; height: 44px; font-size: 15px; }
.stack p { margin: 0 0 8px; }
.side .summary { margin-bottom: 0; }
.total-tr td { font-weight: 800; }
.sub-row > td { padding-top: 0; white-space: normal; }
.sub-row summary { cursor: pointer; color: var(--accent); font-size: 13px; font-weight: 700; }
.sub-row details[open] summary { margin-bottom: 10px; }
table.inner { margin-bottom: 10px; font-size: 13px; }
table.inner td, table.inner th { padding: 6px 8px; }
.timeline { list-style: none; margin: 0; padding: 0; }
.timeline li { display: grid; grid-template-columns: 150px 100px 1fr; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.timeline .when { color: var(--muted); font-size: 13px; }
.timeline .who { font-size: 12px; font-weight: 800; color: var(--muted); text-transform: uppercase; }
.timeline .by-payone .who { color: #93c5fd; }
.timeline .by-admin .who { color: var(--accent); }
.timeline .by-auto .who, .timeline .by-system .who { color: #c4b5fd; }
.timeline .what { overflow-wrap: anywhere; }
.inline-form { display: flex; gap: 12px; align-items: end; flex-wrap: wrap; }
.inline-form .field { flex: 1; min-width: 220px; }
.inline-form .btn-ghost { width: auto; height: 42px; margin-bottom: 12px; }
.scenario { border-inline-start: 3px solid var(--accent); }
.scenario.is-done { border-inline-start-color: var(--ok); }
.scenario-head { display: flex; align-items: center; gap: 12px; margin-bottom: 8px; }
.scenario-head h2 { margin: 0; flex: 1; }
.scenario-n { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; background: var(--bg); border: 1px solid var(--line-strong); font-weight: 800; }
.scenario details { margin: 8px 0 16px; }
.scenario summary { cursor: pointer; color: var(--accent); font-weight: 700; }
.scenario .steps { margin-top: 10px; }

@media (max-width: 960px) {
  .products { grid-template-columns: 1fr 1fr; }
  .checkout, .detail-grid { grid-template-columns: 1fr; }
  .order-box { position: static; }
}
@media (max-width: 560px) {
  .products, .two { grid-template-columns: 1fr; }
  .stepper li span { display: none; }
  .stepper li { justify-content: center; }
  .site-header .wrap { height: auto; min-height: 64px; padding-top: 10px; padding-bottom: 10px; }
  .head-links .back-link { font-size: 13px; }
  .cart-link span { display: none; }
  .timeline li { grid-template-columns: 1fr; gap: 2px; }
  .shop-head h1 { font-size: 28px; }
}
@media print {
  .site-header, .site-footer, .test-banner, .stepper, .result-actions, .fine { display: none !important; }
  body { background: #fff; color: #000; }
  .card { border: 0; background: #fff; }
  .summary dt, .muted, .lead { color: #333; }
}
.result-brand { background: var(--accent); color: var(--on-accent); }
.result-brand svg { width: 28px; height: 28px; }

/* Direct payment page (amount entered by the customer) */
.pay-direct { max-width: 560px; }
.hint { display: block; margin-top: 6px; font-size: 13px; color: var(--muted); }
.purposes { margin: 8px 0 20px; padding: 18px 0 0; border: 0; border-top: 1px solid var(--line); }
.purposes legend { padding: 0; font-size: 14px; font-weight: 700; }
.purposes legend em { font-style: normal; font-weight: 400; color: var(--muted); }
.purposes .hint { margin: 2px 0 12px; }
.tiles { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.tile { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; min-height: 84px; padding: 12px 6px; text-align: center; border: 1px solid var(--line-strong); border-radius: var(--radius); cursor: pointer; color: var(--muted); font-size: 13px; font-weight: 700; line-height: 1.35; transition: border-color .15s, background .15s, color .15s; }
.tile:hover { border-color: var(--accent); color: var(--fg); }
.tile input { position: absolute; opacity: 0; pointer-events: none; }
.tile .tick { position: absolute; top: 6px; inset-inline-end: 6px; width: 14px; height: 14px; border-radius: 50%; border: 1px solid var(--line-strong); }
.tile:has(input:checked) { border-color: var(--accent); background: rgba(200, 138, 90, .1); color: var(--fg); }
.tile:has(input:checked) .tick { background: var(--accent); border-color: var(--accent); box-shadow: inset 0 0 0 3px var(--card); }
.tile:has(input:focus-visible) { box-shadow: 0 0 0 3px rgba(200, 138, 90, .35); }
.aside-note { max-width: 560px; margin: 18px auto 0; text-align: center; font-size: 14px; color: var(--muted); }
@media (max-width: 560px) { .tiles { grid-template-columns: repeat(2, 1fr); } }
