/* ============================================
   SendFP Pay — Shared Stylesheet
   Used by: index.html, checkout.html, success.html, failed.html, expired.html
   ============================================ */

:root {
  --surface: #ffffff;
  --surface-soft: #fafbff;
  --ink: #0a0e27;
  --ink-soft: #424770;
  --ink-muted: #6b7393;
  --line: #e6e9f2;
  --line-soft: #f1f3f9;
  --brand: #2fa409;
  --brand-hover: #268a07;
  --brand-soft: #effbe9;
  --brand-deep: #1f6b06;
  --success: #2fa409;
  --success-soft: #effbe9;
  --warn: #ff9500;
  --error: #e11d48;
  --error-soft: #fef1f3;
  --error-deep: #9f0d2f;
  --accent: #5cd136;
  --shadow-sm: 0 1px 2px rgba(10, 14, 39, 0.04), 0 1px 3px rgba(10, 14, 39, 0.04);
  --shadow-md: 0 4px 6px -1px rgba(10, 14, 39, 0.05), 0 2px 4px -2px rgba(10, 14, 39, 0.05);
  --shadow-lg: 0 25px 50px -12px rgba(10, 14, 39, 0.15);
  --shadow-focus: 0 0 0 4px rgba(47, 164, 9, 0.18);
  --shadow-brand: 0 8px 24px rgba(47, 164, 9, 0.3);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html, body {
  font-family: 'Inter Tight', -apple-system, sans-serif;
  color: var(--ink);
  background: var(--surface-soft);
  -webkit-font-smoothing: antialiased;
  font-feature-settings: "ss01", "cv11";
  min-height: 100vh;
  overflow-x: hidden;
}

/* ============ PAGE WRAPPERS ============ */
.page {
  min-height: 100vh;
  padding: 32px 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.page--centered {
  justify-content: center;
}
.page--top {
  align-items: center;
  padding-top: 32px;
}

/* Top header (light branding above the card) */
.top-header {
  width: 100%;
  max-width: 460px;
  display: flex;
  justify-content: center;
  margin-bottom: 24px;
}
.top-header img { height: 28px; }

/* Main card */
.card {
  background: var(--surface);
  border-radius: 16px;
  padding: 40px 40px 32px;
  width: 100%;
  max-width: 480px;
  box-shadow: var(--shadow-lg);
  height: fit-content;
  position: relative;
}

.card--wide {
  max-width: 540px;
  padding: 48px 56px;
}

/* Embedded brand at top of card */
.brand {
  display: flex;
  align-items: center;
  margin-bottom: 28px;
}
.brand-logo {
  height: 36px;
  width: auto;
  display: block;
}

/* ============ HEADINGS ============ */
.h1 {
  font-family: 'Instrument Serif', serif;
  font-weight: 400;
  font-size: 30px;
  letter-spacing: -0.02em;
  margin-bottom: 6px;
  line-height: 1.15;
}
.h1--center { text-align: center; }
.h1--lg { font-size: 32px; }
.h1 em { font-style: italic; color: var(--brand); }
.h1 em.error { color: var(--error); }

.sub {
  color: var(--ink-muted);
  font-size: 14px;
  margin-bottom: 24px;
  line-height: 1.5;
}
.sub--center { text-align: center; }
.sub strong { color: var(--ink); font-weight: 600; }

/* ============ POWERED BY FOOTER ============ */
.powered-footer {
  margin-top: 24px;
  font-size: 12px;
  color: var(--ink-muted);
  display: flex;
  align-items: center;
  gap: 6px;
}
.powered-footer strong { color: var(--ink); font-weight: 600; }

/* ============ BUTTONS ============ */
.btn {
  height: 48px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: none;
  width: 100%;
  text-decoration: none;
}

.btn-primary {
  background: var(--brand);
  color: #fff;
  box-shadow: 0 4px 12px rgba(47, 164, 9, 0.2);
  height: 52px;
  font-size: 15px;
}
.btn-primary:hover {
  background: var(--brand-hover);
  transform: translateY(-1px);
  box-shadow: 0 8px 20px rgba(47, 164, 9, 0.3);
}
.btn-primary:active { transform: scale(0.99); }

.btn-dark {
  width: 100%;
  height: 52px;
  background: var(--ink);
  color: #fff;
  border: none;
  border-radius: 10px;
  font-size: 15px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: all 0.2s;
  position: relative;
  overflow: hidden;
}
.btn-dark::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, #2fa409 0%, #5cd136 100%);
  opacity: 0;
  transition: opacity 0.3s;
}
.btn-dark span { position: relative; z-index: 1; }
.btn-dark:hover::before { opacity: 1; }
.btn-dark:active { transform: scale(0.99); }

.btn-secondary {
  background: #fff;
  color: var(--ink);
  border: 1px solid var(--line);
}
.btn-secondary:hover {
  border-color: var(--ink-soft);
  background: var(--surface-soft);
}

.btn-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 12px;
}

/* ============ ANIMATIONS ============ */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(4px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes pop {
  0%   { transform: scale(0); }
  60%  { transform: scale(1.15); }
  100% { transform: scale(1); }
}

@keyframes ring {
  0%   { transform: scale(1); opacity: 0.6; }
  100% { transform: scale(1.8); opacity: 0; }
}

@keyframes ping {
  0% { transform: scale(1); opacity: 0.6; }
  100% { transform: scale(3); opacity: 0; }
}

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  20%, 60% { transform: translateX(-4px); }
  40%, 80% { transform: translateX(4px); }
}

.fade-1 { animation: fadeUp 0.5s ease-out 0.05s backwards; }
.fade-2 { animation: fadeUp 0.5s ease-out 0.15s backwards; }
.fade-3 { animation: fadeUp 0.5s ease-out 0.25s backwards; }
.fade-4 { animation: fadeUp 0.5s ease-out 0.35s backwards; }
.fade-5 { animation: fadeUp 0.5s ease-out 0.45s backwards; }
.fade-6 { animation: fadeUp 0.5s ease-out 0.55s backwards; }

/* ============ STATUS PILLS ============ */
.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 100px;
  font-size: 11px;
  font-weight: 600;
}
.status-pill--success { background: var(--success-soft); color: var(--success); }
.status-pill--error { background: var(--error-soft); color: var(--error); }
.status-pill--warn { background: #fff8eb; color: #7a5610; }

.status-pill .pulse {
  width: 6px; height: 6px;
  border-radius: 50%;
  position: relative;
}
.status-pill--success .pulse { background: var(--success); }
.status-pill--success .pulse::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: var(--success);
  animation: ping 2s ease-out infinite;
}

/* ============ CALLOUTS ============ */
.callout {
  display: flex;
  gap: 10px;
  padding: 12px;
  border-radius: 10px;
  font-size: 12px;
  line-height: 1.5;
}
.callout--warn {
  background: #fff8eb;
  border: 1px solid #ffd98a;
  color: #7a5610;
}
.callout--error {
  background: var(--error-soft);
  border: 1px solid #fbd5db;
  color: var(--error-deep);
}
.callout-icon {
  flex-shrink: 0;
  width: 18px; height: 18px;
  border-radius: 50%;
  color: #fff;
  display: grid; place-items: center;
  font-weight: 700;
  font-size: 11px;
}
.callout--warn .callout-icon { background: var(--warn); }
.callout--error .callout-icon { background: var(--error); }

/* ============ COPY BUTTONS ============ */
.copy-btn {
  background: none;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 4px 10px;
  cursor: pointer;
  font-size: 11px;
  font-weight: 600;
  color: var(--brand);
  font-family: inherit;
  transition: all 0.15s;
}
.copy-btn:hover { background: var(--brand-soft); border-color: var(--brand); }
.copy-btn.copied { background: var(--success-soft); color: var(--success); border-color: var(--success); }

/* ============ FORM FIELDS ============ */
label {
  display: block;
  font-size: 13px;
  font-weight: 500;
  color: var(--ink-soft);
  margin-bottom: 6px;
}

input, select {
  width: 100%;
  height: 44px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  font-size: 15px;
  font-family: inherit;
  color: var(--ink);
  background: var(--surface);
  transition: all 0.15s;
  outline: none;
}
input::placeholder { color: var(--ink-muted); }
input:focus, select:focus {
  border-color: var(--brand);
  box-shadow: var(--shadow-focus);
}

.field-group { margin-bottom: 14px; }

.input-prefix {
  display: flex;
  align-items: stretch;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  transition: all 0.15s;
  overflow: hidden;
}
.input-prefix:focus-within {
  border-color: var(--brand);
  box-shadow: var(--shadow-focus);
}
.input-prefix .prefix {
  padding: 0 14px;
  display: flex; align-items: center; gap: 6px;
  background: var(--surface-soft);
  border-right: 1px solid var(--line);
  font-size: 14px;
  color: var(--ink-soft);
  font-weight: 500;
}
.input-prefix input {
  border: none;
  box-shadow: none;
  flex: 1;
}
.input-prefix input:focus { box-shadow: none; }

/* ============ MOBILE ============ */
@media (max-width: 600px) {
  .page { padding: 0; }
  .card, .card--wide {
    border-radius: 0;
    padding: 32px 20px;
    box-shadow: none;
    min-height: 100vh;
    max-width: 100%;
  }
  .top-header {
    padding-top: 24px;
    margin-bottom: 0;
  }
  .powered-footer { display: none; }
}
