/**
 *                          ___                   _       _         _
 *                         / __)                 | |     | |       | |
 *     _ _ _ _ _ _ _ _ _ _| |__ _____  ____ _   _| |  _  | |__   __| |
 *    | | | | | | | | | (_   __|____ |/ ___) | | | |_/ ) |  _ \ / _  |
 *    | | | | | | | | | | | |  / ___ | |   | |_| |  _ ( _| |_) | (_| |
 *     \___/ \___/ \___(_)|_|  \_____|_|   |____/|_| \_|_)____/ \____|
 *
 *
 * 	Author: MD OMAR FARUK
 * 	Author URI: www.faruk.bd
 * 	Author Contact: https://faruk.bd/#contact
 * 	Author Email: info@faruk.bd | farukmr@gmail.com
 * 	Copyright © 2026
 *                          ___                   _       _         _
 *                         / __)                 | |     | |       | |
 *     _ _ _ _ _ _ _ _ _ _| |__ _____  ____ _   _| |  _  | |__   __| |
 *    | | | | | | | | | (_   __|____ |/ ___) | | | |_/ ) |  _ \ / _  |
 *    | | | | | | | | | | | |  / ___ | |   | |_| |  _ ( _| |_) | (_| |
 *     \___/ \___/ \___(_)|_|  \_____|_|   |____/|_| \_|_)____/ \____|
 *
 */
/*
 * PayGate default theme - customer pages. Brand colour comes from --brand (set per brand).
 */
:root {
  --brand: #4f46e5;
  --brand2: #7c3aed;
  --ink: #0f172a;
  --ink2: #475569;
  --mute: #94a3b8;
  --line: #e2e8f0;
  --bg: #f1f5f9;
  --card: #ffffff;
  --ok: #059669;
  --bad: #dc2626;
  --radius: 16px;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  font: 15px/1.5 "Hind Siliguri", "Noto Sans Bengali", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  color: var(--ink);
  background: radial-gradient(1200px 500px at 50% -200px, color-mix(in srgb, var(--brand) 22%, transparent), transparent), var(--bg);
  min-height: 100vh;
}
.pg-wrap { max-width: 480px; margin: 0 auto; padding: 18px 16px 28px; }
.pg-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 14px; }
.pg-merchant { display: flex; align-items: center; gap: 10px; min-width: 0; }
.pg-logo { height: 36px; max-width: 140px; object-fit: contain; }
.pg-mark { width: 36px; height: 36px; border-radius: 10px; background: var(--brand); color: #fff; display: grid; place-items: center; font-weight: 700; }
.pg-mname { font-weight: 700; font-size: 16px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pg-lang { display: flex; gap: 2px; background: #fff; border: 1px solid var(--line); border-radius: 999px; padding: 2px; }
.pg-lang a { font-size: 12px; padding: 3px 9px; border-radius: 999px; color: var(--ink2); text-decoration: none; }
.pg-lang a.on { background: var(--brand); color: #fff; }

.pg-card { background: var(--card); border-radius: var(--radius); box-shadow: 0 10px 40px rgba(15, 23, 42, .08), 0 1px 2px rgba(15, 23, 42, .06); overflow: hidden; }
.pg-sum { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; padding: 20px 20px 18px;
  background: linear-gradient(135deg, var(--brand), var(--brand2)); color: #fff; }
.pg-label { font-size: 12px; opacity: .85; text-transform: uppercase; letter-spacing: .06em; }
.pg-amount { font-size: 30px; font-weight: 800; letter-spacing: -.02em; line-height: 1.2; }
.pg-ref { font-size: 13px; opacity: .9; }
.pg-timer { font-variant-numeric: tabular-nums; background: rgba(255, 255, 255, .18); border-radius: 999px; padding: 4px 10px; font-weight: 600; font-size: 13px; }
.pg-timer.late { background: #fee2e2; color: var(--bad); }

.pg-step { padding: 18px 20px 6px; }
.pg-h { margin: 0 0 10px; font-size: 15px; }
.pg-group { font-size: 12px; color: var(--mute); text-transform: uppercase; letter-spacing: .06em; margin: 14px 0 8px; }
.pg-methods { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.pg-method { --mc: #64748b; position: relative; display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 14px 8px 12px;
  border: 1.5px solid var(--line); border-radius: 12px; background: #fff; cursor: pointer; font: inherit; color: var(--ink); transition: .15s; }
.pg-method:hover, .pg-method:focus-visible { border-color: var(--mc); box-shadow: 0 0 0 3px color-mix(in srgb, var(--mc) 18%, transparent); outline: none; }
.pg-method img { height: 34px; max-width: 110px; object-fit: contain; }
.pg-mt { font-size: 13px; font-weight: 600; text-align: center; }
.pg-fee { font-size: 11px; color: var(--ink2); }
.pg-method.busy { opacity: .6; pointer-events: none; }
.pg-empty { color: var(--ink2); }

.pg-back { border: 0; background: none; color: var(--ink2); font: inherit; cursor: pointer; padding: 0; margin-bottom: 10px; }
.pg-wallet { --mc: var(--brand); border: 1.5px solid color-mix(in srgb, var(--mc) 35%, var(--line)); border-radius: 14px; overflow: hidden; }
.pg-whead { display: flex; align-items: center; gap: 10px; padding: 12px 14px; background: color-mix(in srgb, var(--mc) 10%, #fff); }
.pg-whead img { height: 26px; width: auto; max-width: 90px; object-fit: contain; border-radius: 5px; }
.pg-whead small { display: block; color: var(--ink2); font-size: 12px; }
.pg-rows { padding: 6px 14px; }
.pg-row { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px dashed var(--line); }
.pg-row:last-child { border-bottom: 0; }
.pg-row span { color: var(--ink2); font-size: 13px; width: 70px; }
.pg-row b { flex: 1; font-size: 17px; font-variant-numeric: tabular-nums; letter-spacing: .02em; }
.pg-copy { border: 1px solid var(--line); background: #fff; border-radius: 8px; font: 12px inherit; padding: 4px 10px; cursor: pointer; }
.pg-copy.ok { background: var(--ok); color: #fff; border-color: var(--ok); }
.pg-steps { margin: 0; padding: 10px 14px 12px 34px; font-size: 13.5px; color: var(--ink2); background: #f8fafc; border-top: 1px solid var(--line); }
.pg-steps li { margin: 3px 0; }

.pg-form { margin-top: 16px; display: grid; gap: 6px; }
.pg-form label { font-size: 13px; font-weight: 600; margin-top: 4px; }
.pg-form input { font: inherit; font-size: 16px; padding: 11px 12px; border: 1.5px solid var(--line); border-radius: 10px; width: 100%; }
.pg-form input:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 18%, transparent); }
#pg-trx { text-transform: uppercase; letter-spacing: .08em; font-weight: 600; }
#pg-trx::placeholder { text-transform: none; letter-spacing: normal; font-weight: 400; }
.pg-err { background: #fef2f2; color: var(--bad); border: 1px solid #fecaca; padding: 9px 12px; border-radius: 10px; font-size: 13.5px; }

.pg-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 0; border-radius: 12px; padding: 12px 18px;
  font: inherit; font-weight: 700; background: var(--brand); color: #fff; cursor: pointer; text-decoration: none; }
.pg-btn:hover { filter: brightness(1.06); }
.pg-btn.pg-wide { width: 100%; margin-top: 8px; padding: 14px; font-size: 16px; }
.pg-btn.pg-ghost { background: #fff; color: var(--ink); border: 1.5px solid var(--line); }
.pg-btn.busy { opacity: .7; }
.pg-btn.busy::before { content: ""; width: 16px; height: 16px; border: 2px solid rgba(255, 255, 255, .5); border-top-color: #fff; border-radius: 50%; animation: pgspin .8s linear infinite; }
.pg-link { border: 0; background: none; color: var(--ink2); font: inherit; font-size: 13px; text-decoration: underline; cursor: pointer; }
.pg-cancel { text-align: center; padding: 10px 20px 18px; }

.pg-wait { text-align: center; padding: 18px 6px 10px; }
.pg-wait h3 { margin: 14px 0 6px; }
.pg-wait p { color: var(--ink2); margin: 0 0 10px; }
.pg-small { font-size: 13px; }
.pg-spin { width: 52px; height: 52px; margin: 0 auto; border-radius: 50%; border: 4px solid color-mix(in srgb, var(--brand) 20%, #fff); border-top-color: var(--brand); animation: pgspin 1s linear infinite; }
@keyframes pgspin { to { transform: rotate(360deg); } }

.pg-done, .pg-msg { text-align: center; padding: 26px 20px 22px; }
.pg-done h2, .pg-msg h2 { margin: 12px 0 4px; }
.pg-done p, .pg-msg p { color: var(--ink2); margin: 0 0 14px; }
.pg-check svg { width: 72px; height: 72px; }
.pg-check circle { fill: none; stroke: var(--ok); stroke-width: 3; stroke-dasharray: 160; stroke-dashoffset: 160; animation: pgdraw .6s ease forwards; }
.pg-check path { fill: none; stroke: var(--ok); stroke-width: 4; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 40; stroke-dashoffset: 40; animation: pgdraw .4s .5s ease forwards; }
@keyframes pgdraw { to { stroke-dashoffset: 0; } }
.pg-actions { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }
.pg-bad h2 { color: var(--bad); }

.pg-foot { display: flex; flex-wrap: wrap; gap: 6px 14px; justify-content: center; margin-top: 16px; font-size: 12px; color: var(--mute); }
.pg-secure { display: inline-flex; align-items: center; gap: 4px; color: var(--ok); }

/* invoice / link / receipt / message */
.pg-pad { padding: 20px; }
.pg-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.pg-table th, .pg-table td { padding: 8px 4px; border-bottom: 1px solid var(--line); text-align: left; }
.pg-table td.r, .pg-table th.r { text-align: right; }
.pg-table tfoot td { font-weight: 700; border-bottom: 0; }
.pg-kv { display: grid; grid-template-columns: auto 1fr; gap: 6px 14px; font-size: 14px; }
.pg-kv dt { color: var(--ink2); }
.pg-kv dd { margin: 0; font-weight: 600; word-break: break-all; }
.pg-badge { display: inline-block; padding: 2px 10px; border-radius: 999px; font-size: 12px; font-weight: 700; background: #fef3c7; color: #92400e; }
.pg-badge.paid { background: #d1fae5; color: #065f46; }
.pg-field { display: grid; gap: 4px; margin-bottom: 10px; }
.pg-field label { font-size: 13px; font-weight: 600; }
.pg-field input { font: inherit; font-size: 16px; padding: 10px 12px; border: 1.5px solid var(--line); border-radius: 10px; }
.pg-print { margin-top: 14px; }
@media print { body { background: #fff; } .pg-lang, .pg-actions, .pg-print, .pg-foot { display: none; } .pg-card { box-shadow: none; } }
@media (max-width: 360px) { .pg-methods { grid-template-columns: 1fr; } .pg-amount { font-size: 26px; } }
.pg-test { margin: 6px 20px 0; padding: 8px 12px; border-radius: 10px; background: #fef3c7; color: #92400e; font-size: 13px; text-align: center; }
.pg-test .pg-link { color: #92400e; font-weight: 700; }
.pg-btn:not(.pg-ghost) { background: linear-gradient(135deg, var(--brand), var(--brand2)); }
.pg-mark { background: linear-gradient(135deg, var(--brand), var(--brand2)) !important; }

/* ---------- 1.1.0: wide pages + app install guide ---------- */
.pg-wrap.pg-wide { max-width: 820px; }
.pg-app-hero { display: block; padding: 26px 24px; }
.pg-app-title { font-size: 26px; font-weight: 800; line-height: 1.25; margin: 4px 0 6px; }
.pg-dl { font-size: 18px; padding: 16px; box-shadow: 0 10px 30px color-mix(in srgb, var(--brand) 35%, transparent); }
.pg-center { text-align: center; }
.pg-mono { font-family: ui-monospace, Consolas, monospace; word-break: break-all; }
.pg-h2 { font-size: 17px; margin: 26px 0 10px; }
.pg-steps-n { counter-reset: s; list-style: none; padding: 0; margin: 0; }
.pg-steps-n li { counter-increment: s; position: relative; padding: 2px 0 12px 40px; }
.pg-steps-n li::before { content: counter(s); position: absolute; left: 0; top: 0; width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center;
  background: linear-gradient(135deg, var(--brand), var(--brand2)); color: #fff; font-weight: 700; font-size: 14px; }
.pg-hl { border-radius: 14px; padding: 16px 18px; margin: 22px 0; border: 2px solid; }
.pg-hl h3 { margin: 0 0 8px; font-size: 16px; }
.pg-hl p { margin: 0 0 10px; }
.pg-hl-warn { background: #fffbeb; border-color: #f59e0b; color: #78350f; }
.pg-hl-warn h3 { color: #b45309; }
.pg-hl-info { background: #eff6ff; border-color: #3b82f6; color: #1e3a8a; }
.pg-hl-info h3 { color: #1d4ed8; }
.pg-hl-way { background: rgba(255, 255, 255, .7); border-radius: 10px; padding: 10px 14px; margin: 10px 0; }
.pg-hl-way ol { margin: 6px 0 0; padding-left: 20px; }
.pg-hl-way li { margin: 4px 0; }
.pg-hl code { background: #1e293b; color: #f8fafc; padding: 2px 8px; border-radius: 6px; font-size: 13px; }
.pg-brands th { width: 170px; vertical-align: top; color: inherit; }
.pg-brands td { color: inherit; }
.pg-faq { border: 1px solid var(--line); border-radius: 10px; padding: 10px 14px; margin: 8px 0; }
.pg-faq summary { cursor: pointer; font-weight: 600; }
.pg-faq p { margin: 8px 0 2px; color: var(--ink2); }
@media (max-width: 560px) { .pg-brands th { width: auto; display: block; padding-bottom: 0; border: 0; } .pg-brands td { display: block; } .pg-app-title { font-size: 21px; } }

/* ---------- 1.1.0: Bangla QR at checkout ---------- */
.pg-qrbox { text-align: center; padding: 16px 14px 10px; background: #fff; border-bottom: 1px dashed var(--line); }
.pg-qr svg, .pg-qrbox img { width: 240px; max-width: 100%; height: auto; padding: 10px; background: #fff; border-radius: 14px; border: 2px solid color-mix(in srgb, var(--brand) 40%, var(--line)); }
.pg-qrtag { margin-top: 10px; font-weight: 700; font-size: 14px; }
.pg-qrapps { font-size: 12px; color: var(--ink2); }
[hidden] { display: none !important; }

/* sponsor ad under the card (admin → Sponsor ads) */
.pgad { position: relative; display: flex; gap: 14px; align-items: center; background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 12px 14px; margin-top: 14px; overflow: hidden; }
.pgad::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: var(--adc, var(--brand)); }
.pgad img { max-height: 70px; max-width: 120px; border-radius: 10px; object-fit: cover; }
.pgad-body { flex: 1; min-width: 0; font-size: 14px; }
.pgad-body p { margin: 2px 0 6px; color: var(--ink2); font-size: 13px; }
.pgad-tag { position: absolute; right: 8px; top: 6px; font-size: 10px; text-transform: uppercase; letter-spacing: .06em; color: var(--mute); }
.pgad-btn { display: inline-block; padding: 5px 12px; border-radius: 8px; background: var(--adc, var(--brand)); color: #fff; text-decoration: none; font-size: 13px; font-weight: 600; }
@media (max-width: 420px) { .pgad { flex-direction: column; align-items: flex-start; } }

.pg-numimg { display: block; user-select: none; -webkit-user-select: none; pointer-events: none; }
