/* PayPanda — unified checkout page stylesheet.
   Used by every /pay/<merchant>/index.html. To add a new merchant page,
   copy an existing pay/<merchant>/index.html and change only:
     1) the three --brand-* variables in its inline <style id="brand-theme">
     2) the logo, favicon, brand name text, and support links
   Every merchant then shares this exact layout, spacing, and behavior —
   no more copy-pasting or drifting per-page CSS. */

:root{
  /* Default brand accent — each checkout page overrides these three. */
  --brand-primary:#00d632;
  --brand-primary-dark:#00b82b;
  --brand-bg:#f0fff5;

  --co-black:#111111;
  --co-muted:#6b716d;
  --co-border:#dfe6e1;
  --co-white:#ffffff;
}

*{box-sizing:border-box;margin:0;padding:0}
html,body{min-height:100%}
body{
  font-family:'Inter',-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Helvetica,Arial,sans-serif;
  color:var(--co-black);
  background:var(--brand-bg);
  display:flex;justify-content:center;padding:0 20px;
}
body::before{
  content:"";position:fixed;inset:0;z-index:-1;pointer-events:none;
  background:
    radial-gradient(circle at 10% 0%, color-mix(in srgb, var(--brand-primary) 12%, transparent), transparent 32%),
    radial-gradient(circle at 100% 100%, color-mix(in srgb, var(--brand-primary) 8%, transparent), transparent 35%);
}
.page{width:100%;max-width:460px;min-height:100vh;display:flex;flex-direction:column}

.header{height:82px;display:flex;align-items:center;justify-content:center;border-bottom:1px solid #f0f0f0;position:relative}
.logo{width:42px;height:42px;object-fit:contain;border-radius:11px;position:absolute;left:0}
.brand{font-size:19px;font-weight:750;letter-spacing:-.45px}
.brand span{font-weight:500}
.secure{position:absolute;right:0;font-size:10px;color:#777;letter-spacing:.03em;display:flex;align-items:center;gap:4px}
.secure svg{width:11px;height:11px}

.main{padding:42px 4px 30px;flex:1}
.amount{text-align:center;margin-bottom:36px}
.amount-label{font-size:13px;color:#777;margin-bottom:8px}
.amount-big{font-size:58px;line-height:1;font-weight:650;letter-spacing:-2.5px;font-variant-numeric:tabular-nums}
.amount-big.active{color:#111}

.field{margin-bottom:18px}
.label{font-size:13px;font-weight:600;margin-bottom:8px;color:#333}
input{
  width:100%;height:52px;border:1px solid #d7d7d7;border-radius:12px;background:#fff;
  padding:0 15px;font-size:16px;color:#111;outline:none;transition:border .15s,box-shadow .15s;
}
input:focus{border-color:var(--brand-primary);box-shadow:0 0 0 3px color-mix(in srgb, var(--brand-primary) 16%, transparent)}
input::placeholder{color:#9a9a9a}

.quick{display:grid;grid-template-columns:repeat(4,1fr);gap:8px;margin:-5px 0 22px}
.q{height:42px;border:1px solid #ddd;background:#fff;border-radius:8px;font-size:14px;font-weight:600;cursor:pointer}
.q:hover,.q.sel{border-color:var(--brand-primary);background:color-mix(in srgb, var(--brand-primary) 8%, white)}

.verify{margin:8px 0 18px;padding:14px 15px;border-radius:9px;background:color-mix(in srgb, var(--brand-primary) 4%, white);border:1px solid var(--co-border);color:#404040;font-size:12.5px;line-height:1.5}
.verify strong{display:block;color:#111;font-size:13px;margin-bottom:3px}
.verify-video{margin-top:10px}
.verify-video summary{cursor:pointer;font-weight:700;text-decoration:underline;text-underline-offset:2px}
.verify-video video{display:block;width:100%;max-height:240px;margin-top:10px;border-radius:7px;background:#111}
.verify-video a{display:inline-block;margin-top:7px;color:#111;font-weight:700}

.pay{
  width:100%;height:54px;border:0;border-radius:14px;background:var(--brand-primary);color:#07140b;
  font-size:16px;font-weight:750;cursor:pointer;display:flex;align-items:center;justify-content:center;gap:8px;
  transition:background .15s,transform .1s;
}
.pay:hover{background:var(--brand-primary-dark)}
.pay:active{transform:scale(.995)}
.pay:disabled{opacity:.55;cursor:not-allowed}
.pay-icon{font-weight:800;font-size:18px}
.spinner{display:none;width:17px;height:17px;border:2px solid rgba(0,0,0,.18);border-top-color:#111;border-radius:50%;animation:spin .7s linear infinite}
.loading .spinner{display:block}
.loading .pay-icon{display:none}
@keyframes spin{to{transform:rotate(360deg)}}

.redirect{text-align:center;color:#777;font-size:11.5px;line-height:1.5;margin:12px 0 28px}

/* Trust row — accepted / live payment rails, industry-standard on a checkout page */
.trust-methods{display:flex;align-items:center;justify-content:center;gap:10px;flex-wrap:wrap;margin:0 0 28px}
.trust-methods img{height:20px;opacity:.85}

.support{border-top:1px solid #ededed;padding-top:24px;text-align:center}
.support h3{font-size:15px;margin-bottom:7px;letter-spacing:-.1px}
.support p{font-size:13px;line-height:1.55;color:#333;font-weight:650}
.links{display:flex;justify-content:center;gap:9px;margin-top:14px}
.social{display:flex;align-items:center;gap:7px;padding:9px 13px;border:1px solid #dedede;border-radius:8px;color:#222;text-decoration:none;font-size:12px;font-weight:650;background:#fff}
.social:hover{background:#fafafa}
.social svg{width:18px;height:18px;display:block}

.error{display:none;margin-top:14px;background:#fff5f5;border:1px solid #f1caca;color:#9a2727;border-radius:8px;padding:11px;font-size:12px;line-height:1.4;word-break:break-word}
.error.show{display:block}

.lightning-invoice{display:none;margin:18px 0;padding:16px;border:1px solid var(--co-border);border-radius:14px;background:#fff;text-align:center}
.lightning-invoice.show{display:block}
.lightning-invoice h3{font-size:15px;margin-bottom:6px}
.lightning-invoice p{font-size:12px;line-height:1.45;color:#444}
.lightning-qr{display:block;width:min(100%,260px);margin:12px auto;border-radius:7px}
.lightning-link,.copy-invoice{display:block;width:100%;margin-top:10px;padding:12px;border:1px solid var(--brand-primary-dark);border-radius:10px;background:var(--brand-primary);color:#07140b;font-size:13px;font-weight:700;text-decoration:none;cursor:pointer}
.copy-invoice{background:#fff;color:#111}

.footer{border-top:1px solid #f0f0f0;padding:18px 0 22px;text-align:center;color:#8a8a8a;font-size:10.5px;line-height:1.65}
.footer .powered{display:inline-flex;align-items:center;gap:5px;margin-top:6px;color:#8a8a8a;text-decoration:none;font-weight:600}
.footer .powered img{width:14px;height:14px;border-radius:4px}
.footer .footer-links{margin-top:8px;display:flex;justify-content:center;gap:10px}
.footer .footer-links a{color:#8a8a8a;text-decoration:underline;text-underline-offset:2px}

@media(max-width:520px){
  body{padding:0 16px}
  .header{height:72px}
  .logo{width:38px;height:38px}
  .brand{font-size:18px}
  .secure{display:none}
  .main{padding-top:34px}
  .amount-big{font-size:52px}
}

/* Legal policy modal (privacy/refund) — keeps the customer on the checkout
   page instead of navigating away mid-payment. Content is pulled live from
   privacy.html / refund-policy.html by assets/js/legal-modal.js, so there's
   one source of truth for the actual policy text. */
.legal-modal-overlay{
  position:fixed;inset:0;z-index:200;background:rgba(10,10,10,.55);
  display:flex;align-items:flex-end;justify-content:center;
  opacity:0;pointer-events:none;transition:opacity .2s ease;
}
.legal-modal-overlay.show{opacity:1;pointer-events:auto}
.legal-modal{
  width:100%;max-width:460px;max-height:82vh;overflow-y:auto;background:#fff;
  border-radius:20px 20px 0 0;padding:26px 22px 32px;position:relative;
  transform:translateY(16px);transition:transform .2s ease;
  box-shadow:0 -10px 40px rgba(0,0,0,.2);
}
.legal-modal-overlay.show .legal-modal{transform:translateY(0)}
.legal-modal-close{
  position:sticky;top:0;float:right;margin:-8px -6px 0 0;width:32px;height:32px;border-radius:50%;
  border:1px solid #e2e2e2;background:#fff;font-size:20px;line-height:1;cursor:pointer;color:#444;
}
.legal-modal-body{clear:both}
.legal-modal-body .legal-updated{font-size:11px;color:#9a9a9a;text-transform:uppercase;letter-spacing:.05em;margin-bottom:6px}
.legal-modal-body h1{font-size:21px;margin-bottom:8px;letter-spacing:-.3px}
.legal-modal-body .legal-intro{color:#555;font-size:13.5px;line-height:1.55;margin-bottom:22px}
.legal-modal-body h2{font-size:15px;margin:22px 0 8px;color:#111}
.legal-modal-body h2:first-of-type{margin-top:0}
.legal-modal-body p{font-size:13.5px;line-height:1.65;color:#444;margin-bottom:10px}
.legal-modal-body ul{font-size:13.5px;line-height:1.65;color:#444;margin:0 0 10px 18px}
.legal-modal-body li{margin-bottom:5px}
.legal-modal-body strong{color:#111}
.legal-modal-body a{color:var(--brand-primary-dark);text-decoration:underline;text-underline-offset:2px}
.legal-modal-body .legal-note{margin-top:22px;padding:14px 16px;border-radius:10px;background:var(--brand-bg);border:1px solid var(--co-border);font-size:12px;color:#555;line-height:1.55}
@media(min-width:560px){
  .legal-modal-overlay{align-items:center}
  .legal-modal{border-radius:20px;max-width:480px}
}
