/* ── Reset & base ── */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen,
    Ubuntu, Cantarell, sans-serif;
  background: #f5f5f5;
  color: #1a1a2e;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
}

/* ── Layout ── */
.container {
  width: 100%;
  max-width: 440px;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

/* ── Hero header ── */
.hero {
  text-align: center;
}

.hero-icon {
  font-size: 3rem;
  display: block;
  margin-bottom: 0.5rem;
}

.hero h1 {
  font-size: 2rem;
  font-weight: 700;
  color: #1a1a2e;
  margin-bottom: 0.5rem;
}

.tagline {
  font-size: 1rem;
  color: #555;
  line-height: 1.6;
}

/* ── Card ── */
.card {
  background: #ffffff;
  border-radius: 12px;
  padding: 1.75rem;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
}

/* ── Field groups ── */
.field-group {
  margin-bottom: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.field-label {
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #444;
}

.optional {
  font-weight: 400;
  text-transform: none;
  letter-spacing: 0;
  color: #888;
}

/* ── Preset amount buttons ── */
.preset-btns {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.preset-btn {
  flex: 1 1 auto;
  min-width: 3.5rem;
  padding: 0.55rem 0.75rem;
  border: 2px solid #d1d5db;
  border-radius: 8px;
  background: #fff;
  color: #1a1a2e;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s, color 0.15s;
}

.preset-btn:hover {
  border-color: #6c63ff;
  background: #f0eeff;
}

.preset-btn--active {
  border-color: #6c63ff;
  background: #6c63ff;
  color: #fff;
}

/* ── Custom amount input ── */
.custom-amount-row {
  display: flex;
  align-items: center;
  border: 2px solid #d1d5db;
  border-radius: 8px;
  overflow: hidden;
  background: #fff;
  transition: border-color 0.15s;
}

.custom-amount-row:focus-within {
  border-color: #6c63ff;
}

.currency-symbol {
  padding: 0 0.75rem;
  font-size: 1.1rem;
  font-weight: 600;
  color: #555;
  background: #f9fafb;
  border-right: 2px solid #d1d5db;
  align-self: stretch;
  display: flex;
  align-items: center;
}

#custom-amount {
  flex: 1;
  border: none;
  outline: none;
  padding: 0.6rem 0.75rem;
  font-size: 1rem;
  color: #1a1a2e;
  background: transparent;
}

/* Hide number input spinners */
#custom-amount::-webkit-inner-spin-button,
#custom-amount::-webkit-outer-spin-button {
  -webkit-appearance: none;
}
#custom-amount[type=number] {
  -moz-appearance: textfield;
}

/* ── Text inputs ── */
input[type="text"],
input[type="email"] {
  width: 100%;
  padding: 0.65rem 0.875rem;
  border: 2px solid #d1d5db;
  border-radius: 8px;
  font-size: 1rem;
  color: #1a1a2e;
  background: #fff;
  transition: border-color 0.15s;
  outline: none;
}

input[type="text"]:focus,
input[type="email"]:focus {
  border-color: #6c63ff;
}

/* ── Buttons ── */
.btn {
  display: inline-block;
  width: 100%;
  padding: 0.8rem 1.25rem;
  border: none;
  border-radius: 8px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  text-align: center;
  transition: opacity 0.15s, transform 0.1s;
}

.btn:active {
  transform: scale(0.98);
}

.btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

.btn--primary {
  background: #6c63ff;
  color: #fff;
}

.btn--primary:hover:not(:disabled) {
  opacity: 0.9;
}

.btn--secondary {
  background: #f3f4f6;
  color: #1a1a2e;
  border: 2px solid #d1d5db;
}

.btn--secondary:hover:not(:disabled) {
  background: #e5e7eb;
}

.link-btn {
  background: none;
  border: none;
  padding: 0;
  font-size: 0.875rem;
  color: #6c63ff;
  cursor: pointer;
  text-decoration: underline;
}

/* ── Payment summary ── */
.payment-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.25rem;
  font-size: 0.95rem;
  color: #555;
}

/* ── Stripe Payment Element container ── */
#payment-element {
  margin-bottom: 1.25rem;
}

/* ── Inline payment message (card errors) ── */
.payment-message {
  color: #c0392b;
  font-size: 0.875rem;
  margin-bottom: 0.75rem;
  padding: 0.6rem 0.875rem;
  background: #fdf2f2;
  border-radius: 6px;
  border: 1px solid #f5c6cb;
}

/* ── Status cards ── */
.status-card {
  text-align: center;
}

.status-icon {
  font-size: 3rem;
  display: block;
  margin-bottom: 0.75rem;
}

.status-card h2 {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.status-card p {
  color: #555;
  line-height: 1.6;
  margin-bottom: 1.25rem;
}

.status-card p:last-child {
  margin-bottom: 0;
}

#retry-btn {
  max-width: 200px;
  margin: 0 auto;
}

/* ── Responsive ── */
@media (max-width: 480px) {
  body {
    align-items: flex-start;
    padding: 1rem;
  }

  .hero h1 {
    font-size: 1.6rem;
  }

  .card {
    padding: 1.25rem;
  }
}
