:root {
  --primary: #3B9AE8;
  --primary-dark: #2B7BC4;
  --dark: #2D3748;
  --gray: #718096;
  --light-gray: #E2E8F0;
  --bg: #F7FAFC;
  --white: #FFFFFF;
  --success: #38A169;
  --error: #E53E3E;
  --pending: #D69E2E;
  --jazzcash: #BB1E26;
  --easypaisa: #3AAA35;
  --radius: 12px;
  --shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

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

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: var(--bg);
  color: var(--dark);
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  padding: 20px;
}

.checkout-container {
  width: 100%;
  max-width: 420px;
  min-height: calc(100vh - 40px);
  display: flex;
  flex-direction: column;
}

/* Header */
.checkout-header {
  text-align: center;
  padding: 24px 0 16px;
}
.logo {
  height: 36px;
  width: auto;
}

/* Steps */
.step {
  display: none;
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 28px 24px;
  flex: 1;
  animation: fadeIn 0.3s ease;
}
.step.active { display: block; }

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

h2 {
  font-size: 20px;
  font-weight: 600;
  color: var(--dark);
  margin-bottom: 4px;
}
.step-desc {
  font-size: 14px;
  color: var(--gray);
  margin-bottom: 24px;
}

/* Back button */
.back-btn {
  background: none;
  border: none;
  color: var(--primary);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  padding: 0;
  margin-bottom: 16px;
}
.back-btn:hover { color: var(--primary-dark); }

/* Payment method cards */
.method-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.method-card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px;
  border: 2px solid var(--light-gray);
  border-radius: var(--radius);
  background: var(--white);
  cursor: pointer;
  transition: all 0.2s;
  width: 100%;
  text-align: left;
}
.method-card:hover {
  border-color: var(--primary);
  box-shadow: 0 2px 12px rgba(59, 154, 232, 0.15);
}
.method-icon {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 14px;
  color: var(--white);
  flex-shrink: 0;
}
.jazzcash-icon { background: var(--jazzcash); }
.easypaisa-icon { background: var(--easypaisa); }
.card-icon { background: var(--primary); font-size: 20px; }
.method-info {
  display: flex;
  flex-direction: column;
  flex: 1;
}
.method-name {
  font-size: 15px;
  font-weight: 600;
  color: var(--dark);
}
.method-label {
  font-size: 12px;
  color: var(--gray);
  margin-top: 2px;
}
.method-arrow {
  font-size: 24px;
  color: var(--gray);
  font-weight: 300;
}

/* Form */
.form-group {
  margin-bottom: 18px;
}
.form-group label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--dark);
  margin-bottom: 6px;
}
.form-group input {
  width: 100%;
  padding: 12px 14px;
  border: 2px solid var(--light-gray);
  border-radius: 8px;
  font-size: 16px;
  color: var(--dark);
  transition: border-color 0.2s;
  outline: none;
}
.form-group input:focus {
  border-color: var(--primary);
}
.field-hint {
  display: block;
  font-size: 12px;
  color: var(--gray);
  margin-top: 4px;
}
.form-row {
  display: flex;
  gap: 12px;
}
.form-group.half { flex: 1; }

/* Pay button */
.pay-btn {
  width: 100%;
  padding: 14px;
  background: var(--primary);
  color: var(--white);
  border: none;
  border-radius: 8px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s;
  margin-top: 8px;
}
.pay-btn:hover { background: var(--primary-dark); }
.pay-btn:disabled {
  background: var(--light-gray);
  color: var(--gray);
  cursor: not-allowed;
}

/* Processing */
.processing-content {
  text-align: center;
  padding: 40px 0;
}
.spinner {
  width: 48px;
  height: 48px;
  border: 4px solid var(--light-gray);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin: 0 auto 24px;
}
@keyframes spin {
  to { transform: rotate(360deg); }
}
.processing-sub {
  font-size: 12px;
  color: var(--gray);
  margin-top: 12px;
}

/* Result */
.result-content {
  text-align: center;
  padding: 20px 0;
}
.result-icon {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 20px;
  font-size: 32px;
}
.result-icon.success { background: #C6F6D5; color: var(--success); }
.result-icon.failed { background: #FED7D7; color: var(--error); }
.result-icon.pending { background: #FEFCBF; color: var(--pending); }

.result-details {
  background: var(--bg);
  border-radius: 8px;
  padding: 16px;
  margin: 24px 0;
  text-align: left;
}
.detail-row {
  display: flex;
  justify-content: space-between;
  padding: 8px 0;
  border-bottom: 1px solid var(--light-gray);
}
.detail-row:last-child { border-bottom: none; }
.detail-label {
  font-size: 13px;
  color: var(--gray);
}
.detail-value {
  font-size: 13px;
  font-weight: 600;
  color: var(--dark);
}

/* Footer */
.checkout-footer {
  text-align: center;
  padding: 16px 0;
  font-size: 12px;
  color: var(--gray);
}

/* Error message */
.error-msg {
  background: #FED7D7;
  color: var(--error);
  padding: 10px 14px;
  border-radius: 8px;
  font-size: 13px;
  margin-bottom: 16px;
  display: none;
}
.error-msg.show { display: block; }
