/* ============================================================
   NETICKS CHARGE — PUBLIC DRIVER SIDE
   What someone sees after photographing the QR on a station.
   Mobile-first, same Neticks ink/line/radius language as the
   console, but with no console chrome and nothing to log into.
   ============================================================ */

:root {
  --ink: #111827;
  --ink-soft: #374151;
  --muted: #6b7280;
  --faint: #9ca3af;
  --line: #e5e7eb;
  --line-soft: #f3f4f6;
  --panel: #f9fafb;
  --success: #10b981;
  --success-bg: #dcfce7;
  --success-ink: #166534;
  --warning-bg: #fef3c7;
  --warning-ink: #92400e;
  --danger: #ef4444;
  --danger-bg: #fee2e2;
  --danger-ink: #991b1b;
  --info-bg: #dbeafe;
  --info-ink: #1e40af;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: #f9fafb;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
}

.shell {
  max-width: 520px;
  margin: 0 auto;
  padding: 28px 18px 56px;
}

/* ---------------- brand ---------------- */
.brand {
  text-align: center;
  margin-bottom: 22px;
}

.brand img {
  height: 38px;
  width: auto;
}

.brand-tagline {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--faint);
  padding: 7px 16px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 20px;
  display: inline-block;
  margin-top: 12px;
}

/* ---------------- card ---------------- */
.card {
  background: #fff;
  border: 2px solid var(--line);
  border-radius: 16px;
  padding: 26px 22px;
  margin-bottom: 18px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.card-title {
  font-size: 22px;
  font-weight: 700;
  margin: 0 0 6px;
  color: var(--ink);
}

.card-sub {
  font-size: 14px;
  color: var(--muted);
  margin: 0 0 20px;
  line-height: 1.6;
}

/* ---------------- station identity ---------------- */
.station {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px;
  background: var(--panel);
  border: 2px solid var(--line);
  border-radius: 12px;
  margin-bottom: 20px;
}

.station-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: var(--ink);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  flex-shrink: 0;
}

.station-name { font-size: 16px; font-weight: 700; color: var(--ink); }
.station-meta { font-size: 12.5px; color: var(--muted); margin-top: 2px; }

/* ---------------- price hero ---------------- */
.price-hero {
  background: var(--ink);
  border-radius: 16px;
  padding: 26px 20px;
  text-align: center;
  color: #fff;
  margin-bottom: 20px;
}

.price-label {
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: rgba(255, 255, 255, 0.6);
}

.price-value {
  font-size: 46px;
  font-weight: 700;
  line-height: 1.05;
  margin: 8px 0 4px;
}

.price-unit { font-size: 14px; color: rgba(255, 255, 255, 0.72); }

/* ---------------- key/value rows ---------------- */
.kv {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 13px 0;
  border-bottom: 1px solid var(--line-soft);
}

.kv:last-child { border-bottom: none; }
.kv-key { font-size: 13px; color: var(--muted); font-weight: 500; }
.kv-value { font-size: 14px; font-weight: 700; color: var(--ink); text-align: right; }

/* ---------------- forms & buttons ---------------- */
.field { margin-bottom: 16px; }

.field label {
  display: block;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--muted);
  margin-bottom: 6px;
}

.field input {
  width: 100%;
  padding: 14px 16px;
  border: 2px solid var(--line);
  border-radius: 12px;
  font-size: 16px; /* 16px stops iOS zooming on focus */
  font-family: inherit;
  color: var(--ink);
  outline: none;
  transition: border-color 0.2s;
}

.field input:focus { border-color: var(--ink); }

.btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 16px 24px;
  border: none;
  border-radius: 12px;
  background: var(--ink);
  color: #fff;
  font-size: 16px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: all 0.2s;
  text-decoration: none;
}

.btn:hover { background: var(--ink-soft); }
.btn:disabled { opacity: 0.55; cursor: not-allowed; }

.btn.ghost {
  background: #fff;
  color: var(--ink);
  border: 2px solid var(--line);
}

.btn.ghost:hover { border-color: var(--ink); background: var(--line-soft); }
.btn.danger { background: var(--danger); }
.btn.danger:hover { background: #dc2626; }

.btn + .btn { margin-top: 10px; }

/* ---------------- live session ---------------- */
.live-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  background: var(--success-bg);
  color: var(--success-ink);
  border-radius: 20px;
  font-size: 13px;
  font-weight: 700;
  margin-bottom: 18px;
}

.live-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--success);
  animation: pulse-dot 1.6s infinite;
}

@keyframes pulse-dot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.55; transform: scale(1.25); }
}

.energy {
  text-align: center;
  padding: 22px 0 8px;
}

.energy-value {
  font-size: 54px;
  font-weight: 700;
  line-height: 1;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}

.energy-unit {
  font-size: 14px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-top: 8px;
}

.running-cost {
  font-size: 22px;
  font-weight: 700;
  color: var(--ink);
  margin-top: 14px;
}

/* ---------------- notices ---------------- */
.notice {
  padding: 14px 16px;
  border-radius: 12px;
  border: 2px solid transparent;
  font-size: 13.5px;
  line-height: 1.6;
  margin-bottom: 16px;
  font-weight: 500;
}

.notice.info    { background: #eff6ff; border-color: var(--info-bg);    color: var(--info-ink); }
.notice.warning { background: #fffbeb; border-color: var(--warning-bg); color: var(--warning-ink); }
.notice.error   { background: #fef2f2; border-color: var(--danger-bg);  color: var(--danger-ink); }
.notice.success { background: #f0fdf4; border-color: var(--success-bg); color: var(--success-ink); }

/* ---------------- receipt ---------------- */
.receipt-total {
  text-align: center;
  padding: 24px;
  background: var(--panel);
  border: 2px solid var(--line);
  border-radius: 16px;
  margin-bottom: 20px;
}

.receipt-total-label {
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--muted);
}

.receipt-total-value {
  font-size: 42px;
  font-weight: 700;
  color: var(--ink);
  line-height: 1.1;
  margin-top: 6px;
}

/* ---------------- footer ---------------- */
.foot {
  text-align: center;
  font-size: 12px;
  color: var(--faint);
  line-height: 1.7;
  margin-top: 26px;
}

.foot a { color: var(--muted); text-decoration: none; }
.foot a:hover { text-decoration: underline; }

/* ---------------- stripe element ---------------- */
#payment-element { margin-bottom: 18px; }

.spinner {
  width: 18px;
  height: 18px;
  border: 2px solid rgba(255, 255, 255, 0.35);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }
