/* flow.tech Checkout — lightweight styles (no framework, ~6KB) */
:root {
  --indigo: #6366f1;
  --purple: #9333ea;
  --ink: #1e293b;
  --muted: #94a3b8;
  --line: #eef2f7;
  --bg1: #f8fafc;
  --bg2: #eef2ff;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
body {
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  color: var(--ink);
  background: linear-gradient(150deg, var(--bg1), var(--bg2) 70%, #e0e7ff);
  -webkit-font-smoothing: antialiased;
  min-height: 100dvh;
}
.hidden { display: none !important; }
.muted { color: var(--muted); font-size: 13px; font-weight: 500; }

.wrap { max-width: 400px; margin: 0 auto; padding: 18px 14px 32px; }
.card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 26px;
  overflow: hidden;
  box-shadow: 0 18px 40px -18px rgba(79, 70, 229, 0.25);
}

/* Header */
.hd { display: flex; align-items: center; justify-content: space-between; padding: 18px 20px 16px; border-bottom: 1px solid var(--line); }
.hd-left { display: flex; align-items: center; gap: 12px; }
.logo {
  width: 44px; height: 44px; border-radius: 14px; flex-shrink: 0;
  background: linear-gradient(135deg, var(--indigo), var(--purple));
  color: #fff; font-weight: 800; font-size: 18px;
  display: flex; align-items: center; justify-content: center;
}
.hd-name { font-weight: 700; font-size: 15px; }
.hd-order { color: var(--muted); font-size: 11px; font-family: ui-monospace, monospace; letter-spacing: .04em; }
.badge {
  display: inline-flex; align-items: center; gap: 6px;
  background: #ecfdf5; border: 1px solid #a7f3d0; color: #047857;
  font-size: 10px; font-weight: 600; padding: 6px 10px; border-radius: 999px;
}
.dot { width: 6px; height: 6px; border-radius: 50%; background: #10b981; animation: pulse 1.6s infinite; }
@keyframes pulse { 0%,100% { opacity: 1; } 50% { opacity: .35; } }

/* Amount */
.amount { padding: 16px 20px; background: linear-gradient(90deg, #eef2ff, #faf5ff); border-bottom: 1px solid var(--line); }
.amount-label { color: var(--muted); font-size: 10px; text-transform: uppercase; letter-spacing: .12em; font-weight: 600; margin-bottom: 4px; }
.amount-value { display: flex; align-items: baseline; gap: 3px; }
.amount-value .rs { font-size: 18px; color: #64748b; }
.amount-value #amount-num { font-size: 32px; font-weight: 800; letter-spacing: -0.5px; }
.amount-value .inr { font-size: 13px; color: var(--muted); margin-left: 3px; }
.amount-for { color: var(--muted); font-size: 12px; margin-top: 5px; }

/* Body */
.body { padding: 16px 20px 20px; background-color: #ecfdf5 !important;}
.timer-row { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.timer { font-weight: 700; font-size: 14px; color: var(--indigo); font-variant-numeric: tabular-nums; }

.note { display: flex; gap: 10px; background: #fffbeb; border: 1px solid #fde68a; border-radius: 16px; padding: 12px 14px; margin-bottom: 14px; }
.note p { color: #92400e; font-size: 13px; line-height: 1.45; }

/* QR */
.qr-card {
  text-align: center; padding: 4px 0 6px; }
.qr {
  width: 200px; height: 200px; margin: 0 auto 10px;
  padding: 12px; background: #fff; border: 1px solid var(--line); border-radius: 18px;
  display: flex; align-items: center; justify-content: center;
}
.qr svg { width: 100%; height: 100%; display: block; }
.qr-hint { color: var(--muted); font-size: 12px; margin-bottom: 12px; }
.vpa {
  display: inline-flex; align-items: center; gap: 10px;
  background: #f1f5f9; border: 1px solid var(--line); border-radius: 12px;
  padding: 9px 14px; font-size: 13px; font-weight: 600; color: #475569; cursor: pointer;
}
.vpa .copy { color: var(--indigo); font-size: 12px; }
.copied { color: var(--indigo); font-size: 12px; font-weight: 500; margin-top: 8px; }

/* Divider */
.divider { display: flex; align-items: center; gap: 12px; margin: 18px 0; }
.divider::before, .divider::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.divider span { color: #637387; font-size: 10px; text-transform: uppercase; letter-spacing: .14em; }

/* Buttons */
.btn {
  width: 100%; border: none; border-radius: 14px; cursor: pointer;
  font-family: inherit; font-size: 15px; font-weight: 600; padding: 14px;
  margin-top: 10px; transition: transform .08s ease, opacity .15s ease;
}
.btn:active { transform: scale(.985); }
.btn:disabled { opacity: .6; cursor: default; }
.btn-primary { background: linear-gradient(135deg, var(--indigo), var(--purple)); color: #fff; }
.btn-phonepe { background: #5f259f; color: #fff; }
.btn-paytm { background: #00baf2; color: #fff; }
.fallback { color: var(--muted); font-size: 12px; text-align: center; margin-top: 10px; line-height: 1.45; }

/* UTR */
.utr { margin-top: 18px; padding-top: 18px; border-top: 1px solid var(--line); }
.utr label { display: block; font-size: 13px; font-weight: 600; color: #475569; margin-bottom: 8px; }
.utr input {
  width: 100%; border: 1px solid #e2e8f0; border-radius: 12px; padding: 12px 14px;
  font-family: inherit; font-size: 15px; letter-spacing: .04em; outline: none;
}
.utr input:focus { border-color: var(--indigo); box-shadow: 0 0 0 3px rgba(99,102,241,.12); }
.err { color: #dc2626; font-size: 12px; margin-top: 6px; }

/* Status */
.status { text-align: center; padding: 24px 8px 12px; }
.status .st-title { font-weight: 700; font-size: 17px; margin-top: 14px; }
.status .st-sub { color: var(--muted); font-size: 13px; margin-top: 6px; line-height: 1.5; }
.icon { width: 60px; height: 60px; border-radius: 50%; margin: 0 auto; display: flex; align-items: center; justify-content: center; font-size: 28px; color: #fff; }
.icon.ok { background: linear-gradient(135deg, #10b981, #059669); }
.icon.bad { background: linear-gradient(135deg, #f43f5e, #e11d48); }
.state-expired .icon.bad { background: linear-gradient(135deg, #f59e0b, #d97706); }
.spinner { width: 46px; height: 46px; margin: 0 auto; border: 4px solid #e0e7ff; border-top-color: var(--indigo); border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.status .btn { max-width: 220px; margin: 18px auto 0; }

/* Footer */
.ft { display: flex; align-items: center; justify-content: space-between; padding: 12px 20px 16px; border-top: 1px solid var(--line); }
.ft span { color: #cbd5e1; font-size: 10px; }

.settings-link { text-align: center; margin-top: 16px; }
.settings-link a { color: var(--indigo); font-size: 12px; text-decoration: none; }
.settings-link a:hover { text-decoration: underline; }

/* Device-aware: hide app-intent options on iOS / iPadOS */
.is-ios .intent-only { display: none !important; }
