/* EasyPay T-Bank Public Checkout — Quiet Editorial direction.
 *
 * Re-uses visual DNA from easypay-demo-showcase (consistent EasyPay brand):
 *  - Deep teal → emerald gradient background (06222A → 0B3B45 → 0F5C57)
 *  - Type pair: Fraunces (display, prices, italic accents) + Inter Tight (UI/body)
 *  - Numerics: JetBrains Mono, tabular
 *  - White cards on dark, 22px radius, hairline rule above CTA
 *  - One CTA-colour per surface (mint deep on light card)
 */

@import url('https://fonts.googleapis.com/css2?family=Fraunces:opsz,wght,ital@9..144,300,0;9..144,300,1;9..144,400,0;9..144,400,1;9..144,500,0;9..144,500,1;9..144,600,0&family=Inter+Tight:wght@400;500;600;700&family=JetBrains+Mono:wght@400;500;600&display=swap');

*, *::before, *::after { box-sizing: border-box; }

:root {
  /* Background (dark surface) */
  --qe-bg-1: #06222A;
  --qe-bg-2: #0B3B45;
  --qe-bg-3: #0F5C57;
  --qe-bg-glow: rgba(95, 224, 161, 0.07);

  /* Ink (on white card) */
  --qe-ink: #0A2A2F;
  --qe-ink-2: #4D6166;
  --qe-ink-3: #8FA3A8;
  --qe-line: rgba(11, 59, 69, 0.10);
  --qe-line-strong: rgba(11, 59, 69, 0.18);

  /* Foreground on dark */
  --qe-on-dark: #ffffff;
  --qe-on-dark-2: rgba(255, 255, 255, 0.72);
  --qe-on-dark-3: rgba(255, 255, 255, 0.48);
  --qe-on-dark-faint: rgba(255, 255, 255, 0.18);

  /* Accents */
  --qe-mint: #D3EBE3;
  --qe-mint-deep: #1A6B5C;
  --qe-green: #1B7F70;
  --qe-cream: #F4F1E9;
  --qe-pulse: #5FE0A1;

  /* Status */
  --qe-error: #C05454;
  --qe-error-bg: rgba(192, 84, 84, 0.10);

  /* Surface */
  --qe-surface: #ffffff;

  color-scheme: dark;
}

html, body { margin: 0; padding: 0; }

html { background: var(--qe-bg-1); }

body {
  font-family: 'Inter Tight', -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
  color: var(--qe-on-dark);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  font-feature-settings: "ss01", "cv11";
  background:
    radial-gradient(ellipse 60% 40% at 80% 6%, var(--qe-bg-glow) 0%, transparent 60%),
    linear-gradient(168deg, var(--qe-bg-1) 0%, var(--qe-bg-2) 45%, var(--qe-bg-3) 100%);
  min-height: 100vh;
}

#app {
  width: 100%;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ── Loading ───────────────────────────────────────── */

.tc-loading {
  width: 100%;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--qe-on-dark-3);
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 12px;
  letter-spacing: 0.12em;
}
.tc-loading .spinner {
  width: 28px;
  height: 28px;
  border: 1.5px solid var(--qe-on-dark-faint);
  border-top-color: var(--qe-on-dark);
  border-radius: 999px;
  animation: spin 0.7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ── Top bar ───────────────────────────────────────── */

.tc-top {
  padding: 32px 28px 20px;
  display: flex;
  justify-content: center;
  align-items: center;
}

.tc-brand {
  display: flex;
  align-items: center;
  justify-content: center;
}
.tc-brand-mark {
  font-family: 'Fraunces', Georgia, serif;
  font-size: 22px;
  font-weight: 500;
  letter-spacing: 0.005em;
  color: var(--qe-on-dark);
  text-align: center;
  max-width: 80vw;
}

/* ── Main wrapper ───────────────────────────────────────── */

.tc-main {
  flex: 1;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  padding: 24px 20px 60px;
}

/* ── Card ───────────────────────────────────────── */

.tc-card {
  background: var(--qe-surface);
  color: var(--qe-ink);
  border-radius: 22px;
  width: 100%;
  max-width: 460px;
  padding: 32px 28px 24px;
  box-shadow: 0 30px 80px -20px rgba(0, 0, 0, 0.4);
  position: relative;
}

.tc-eyebrow {
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--qe-ink-3);
  margin-bottom: 12px;
}

.tc-product-name {
  font-family: 'Fraunces', Georgia, serif;
  font-size: 28px;
  font-weight: 500;
  line-height: 1.15;
  margin: 0 0 12px;
  color: var(--qe-ink);
  letter-spacing: -0.005em;
}

.tc-product-description {
  font-size: 14px;
  line-height: 1.5;
  color: var(--qe-ink-2);
  margin: 0 0 24px;
}

/* ── Price row ───────────────────────────────────────── */

.tc-price-row {
  display: flex;
  align-items: baseline;
  gap: 12px;
  padding: 20px 0;
  margin-bottom: 12px;
  border-top: 1px solid var(--qe-line);
  border-bottom: 1px solid var(--qe-line);
}

.tc-price-main {
  font-family: 'Fraunces', Georgia, serif;
  font-size: 36px;
  font-weight: 500;
  color: var(--qe-ink);
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.015em;
}

.tc-price-original {
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 13px;
  color: var(--qe-ink-3);
}

/* ── Form ───────────────────────────────────────── */

.tc-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-top: 4px;
}

.tc-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.tc-label {
  font-size: 13px;
  font-weight: 500;
  color: var(--qe-ink-2);
  letter-spacing: -0.002em;
}

.tc-required {
  color: var(--qe-green);
  margin-left: 2px;
}
.tc-optional {
  color: var(--qe-ink-3);
  font-weight: 400;
  font-size: 12px;
}

.tc-input {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--qe-line-strong);
  border-radius: 10px;
  background: #FCFDFD;
  color: var(--qe-ink);
  font-family: inherit;
  font-size: 15px;
  line-height: 1.4;
  transition: border-color 0.15s, box-shadow 0.15s;
  appearance: none;
  -webkit-appearance: none;
}
.tc-input:focus {
  outline: none;
  border-color: var(--qe-mint-deep);
  box-shadow: 0 0 0 3px rgba(26, 107, 92, 0.15);
}
.tc-input[readonly] {
  background: #F4F6F6;
  color: var(--qe-ink-2);
  cursor: not-allowed;
}
.tc-input-amount {
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-variant-numeric: tabular-nums;
}
/* Remove number input spinners */
.tc-input-amount::-webkit-outer-spin-button,
.tc-input-amount::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}
.tc-input-amount[type=number] { -moz-appearance: textfield; }

.tc-hint {
  font-size: 11px;
  color: var(--qe-ink-3);
  margin-top: 2px;
}

.tc-form-error {
  min-height: 18px;
  font-size: 13px;
  color: var(--qe-error);
  padding: 0;
  border-radius: 8px;
  transition: padding 0.15s;
}
.tc-form-error:not(:empty) {
  background: var(--qe-error-bg);
  padding: 8px 12px;
  border-left: 2px solid var(--qe-error);
}

/* ── Submit ───────────────────────────────────────── */

.tc-submit {
  margin-top: 6px;
  width: 100%;
  padding: 16px 24px;
  background: var(--qe-mint-deep);
  color: var(--qe-on-dark);
  border: none;
  border-radius: 12px;
  font-family: inherit;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.005em;
  cursor: pointer;
  transition: background 0.15s, transform 0.05s;
  font-variant-numeric: tabular-nums;
}
.tc-submit:hover:not(:disabled) { background: #145443; }
.tc-submit:active:not(:disabled) { transform: translateY(1px); }
.tc-submit:disabled {
  background: var(--qe-ink-3);
  cursor: not-allowed;
}

/* ── Trust ───────────────────────────────────────── */

.tc-trust {
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid var(--qe-line);
}
.tc-trust-row {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: var(--qe-ink-3);
}
.tc-trust-dot {
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: var(--qe-pulse);
  flex-shrink: 0;
  box-shadow: 0 0 0 3px rgba(95, 224, 161, 0.15);
}

/* ── Footer ───────────────────────────────────────── */

.tc-footer {
  padding: 24px 28px 32px;
  display: flex;
  justify-content: center;
  align-items: center;
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 11px;
  letter-spacing: 0.06em;
  color: var(--qe-on-dark-3);
  text-align: center;
}

/* ── Error screen (no-order / not-found / etc) ─────── */

.tc-error-screen {
  flex: 1;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 32px 20px;
  min-height: 100vh;
}
.tc-error-card {
  background: var(--qe-surface);
  color: var(--qe-ink);
  border-radius: 22px;
  width: 100%;
  max-width: 420px;
  padding: 40px 32px 32px;
  text-align: center;
  box-shadow: 0 30px 80px -20px rgba(0, 0, 0, 0.4);
}
.tc-error-icon {
  width: 56px;
  height: 56px;
  border-radius: 999px;
  background: var(--qe-cream);
  color: var(--qe-mint-deep);
  font-family: 'Fraunces', Georgia, serif;
  font-size: 32px;
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
}
.tc-error-title {
  font-family: 'Fraunces', Georgia, serif;
  font-size: 24px;
  font-weight: 500;
  margin: 0 0 12px;
  color: var(--qe-ink);
  line-height: 1.2;
}
.tc-error-message {
  font-size: 14px;
  line-height: 1.5;
  color: var(--qe-ink-2);
  margin: 0;
}

/* Success / fail icons on thank-you.html and fail.html */
.tc-success-icon,
.tc-fail-icon {
  display: inline-flex;
  margin-bottom: 20px;
}

/* Order-id readout below success/fail message */
.tc-order-id {
  margin-top: 20px;
  padding: 10px 14px;
  background: var(--qe-cream);
  color: var(--qe-ink-2);
  border-radius: 8px;
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 12px;
  letter-spacing: 0.04em;
  word-break: break-all;
}

/* ── Mobile ───────────────────────────────────────── */

@media (max-width: 480px) {
  .tc-top { padding: 24px 16px 16px; }
  .tc-main { padding: 16px 12px 40px; }
  .tc-card { padding: 24px 20px 20px; border-radius: 18px; }
  .tc-product-name { font-size: 24px; }
  .tc-price-main { font-size: 30px; }
  .tc-footer { padding: 20px 16px 28px; font-size: 10px; }
}
