/* ═══════════════════════════════════════════════════════════════
   css/payment.css — Checkout payment flow styles
   (append/import into checkout.css or include separately)
   ═══════════════════════════════════════════════════════════════ */

/* ── Step indicator ──────────────────────────────────────────── */
.co-step-indicator {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  margin-bottom: 20px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border-color);
  font-size: 12px;
  font-weight: 800;
  width: 100%;
}

.co-step {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 32px;
  padding: 6px 11px;
  border-radius: 999px;
  background: var(--bg-surface-alt);
  color: var(--text-muted);
  white-space: nowrap;
  transition: background .2s ease, color .2s ease, box-shadow .2s ease, transform .2s ease;
}

.co-step:not(.active) {
  display: none !important;
}

.co-step-num,
.co-step-check {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--border-color);
  color: var(--text-secondary);
  font-size: 11px;
  line-height: 1;
  flex: 0 0 auto;
}

.co-step.active {
  background: var(--accent-primary);
  color: var(--accent-inverted-text);
  box-shadow: 0 8px 18px rgba(0,0,0,.16);
  transform: translateY(-1px);
  padding: 8px 16px; 
  font-size: 13px; 
  position: relative;
}

.co-step.active::after {
  content: '→';
  position: absolute;
  right: -30px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  font-size: 18px;
  font-weight: 600;
}

.co-step.active:last-child::after {
  display: none;
}

.co-step.active .co-step-num {
  background: var(--accent-inverted-text);
  color: var(--accent-primary);
}

.co-step.done {
  background: var(--border-color);
  color: var(--text-primary);
}

.co-step.done .co-step-num,
.co-step.done .co-step-check {
  background: var(--accent-primary);
  color: var(--accent-inverted-text);
}

.co-step-sep {
  display: none !important;
}

.co-step.done + .co-step-sep {
  background: linear-gradient(90deg, #1a1a1a 0%, #d7d7d7 100%);
}

#checkoutBody.co-step-next > *,
#checkoutBody.co-step-back > * {
  animation-duration: .22s;
  animation-timing-function: ease;
  animation-fill-mode: both;
}

#checkoutBody.co-step-next > * {
  animation-name: coStepInNext;
}

#checkoutBody.co-step-back > * {
  animation-name: coStepInBack;
}

@keyframes coStepInNext {
  from { opacity: 0; transform: translateX(10px); }
  to { opacity: 1; transform: translateX(0); }
}

@keyframes coStepInBack {
  from { opacity: 0; transform: translateX(-10px); }
  to { opacity: 1; transform: translateX(0); }
}

/* ── Section label ───────────────────────────────────────────── */
.co-section-label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--text-muted);
  margin-bottom: 12px;
}

/* ── Payment method cards ────────────────────────────────────── */
.co-pay-methods {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-bottom: 20px;
}

.co-pay-card {
  border: 2px solid var(--border-color);
  border-radius: 10px;
  padding: 14px 10px;
  text-align: center;
  cursor: pointer;
  transition: border-color .2s, background .2s, transform .15s;
  user-select: none;
}

.co-pay-card:hover {
  border-color: var(--text-secondary);
  background: var(--bg-surface-alt);
  transform: translateY(-2px);
}

.co-pay-card.selected {
  border-color: var(--text-primary);
  background: var(--bg-surface-alt);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0,0,0,.1);
}

.co-pay-icon {
  font-size: 1.8rem;
  margin-bottom: 6px;
  line-height: 1;
}

.co-pay-label {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 3px;
}

.co-pay-sub {
  font-size: 11px;
  color: var(--text-muted);
}

/* ── Payment form fields ─────────────────────────────────────── */
.co-pay-fields {
  background: var(--bg-surface-alt);
  border: 1px solid var(--border-color);
  border-radius: 10px;
  padding: 16px;
  animation: fadeIn .2s ease;
}

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

.co-pay-note {
  font-size: 12px;
  color: var(--text-secondary);
  margin-bottom: 14px;
  line-height: 1.6;
  padding: 10px 12px;
  background: var(--bg-surface);
  border-left: 3px solid var(--accent-primary);
  border-radius: 0 6px 6px 0;
}

.co-field-group {
  display: flex;
  flex-direction: column;
  gap: 5px;
  margin-bottom: 12px;
}

.co-field-group label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .8px;
  color: var(--text-secondary);
}

.co-field-group input,
.co-field-group select {
  padding: 9px 12px;
  border: 1px solid var(--input-border);
  border-radius: 7px;
  font-size: 13px;
  font-family: inherit;
  background: var(--input-bg);
  color: var(--input-text);
  transition: border-color .15s;
  width: 100%;
  box-sizing: border-box;
}

.co-field-group input:focus,
.co-field-group select:focus {
  outline: none;
  border-color: var(--accent-primary);
}

.co-fields-row {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 12px;
}

.co-card-form {
  margin-top: 8px;
}

/* ── Confirmation box ────────────────────────────────────────── */
.co-success-box {
  text-align: center;
  padding: 10px 0;
}

.co-success-icon {
  font-size: 3rem;
  margin-bottom: 12px;
  line-height: 1;
}

.co-success-box h3 {
  font-size: 17px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 8px;
}

.co-success-box > p {
  font-size: 13px;
  color: var(--text-secondary);
  margin-bottom: 20px;
  line-height: 1.6;
}

.co-confirm-details {
  background: var(--bg-surface-alt);
  border-radius: 10px;
  padding: 16px 18px;
  text-align: left;
  margin-bottom: 16px;
}

.co-confirm-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 7px 0;
  border-bottom: 1px solid var(--border-color);
  font-size: 13px;
}

.co-confirm-row:last-child { border-bottom: none; }
.co-confirm-row span  { color: var(--text-muted); }
.co-confirm-row strong { color: var(--text-primary); }

.status-paid    { color: #2e7d32 !important; }
.status-pending { color: #e65100 !important; }

.co-pending-note {
  font-size: 12px;
  color: var(--text-secondary);
  background: var(--warning-bg, #fff8e1);
  border: 1px solid var(--warning-border, #ffe082);
  border-radius: 8px;
  padding: 10px 14px;
  text-align: left;
  line-height: 1.6;
}

/* ── Responsive ──────────────────────────────────────────────── */
@media (max-width: 768px) {
  .co-pay-methods { grid-template-columns: 1fr; gap: 8px; }
  .co-pay-card    { display: flex; align-items: center; text-align: left; gap: 12px; padding: 12px; }
  .co-pay-icon    { font-size: 1.4rem; margin-bottom: 0; flex-shrink: 0; }
  .co-fields-row  { grid-template-columns: 1fr; }
}

/* ── E-Wallet Proof Step ─────────────────────────────────────── */
.co-ewallet-instructions {
  color: var(--text-primary);
  text-align: center;
}

.co-ewallet-header {
  margin-bottom: 16px;
}

.co-ewallet-header h3 {
  font-size: 18px;
  font-weight: 800;
  color: var(--text-primary);
  margin: 8px 0;
}

.co-ewallet-icon {
  font-size: 2rem;
}

.co-ewallet-details {
  background: var(--bg-surface-alt);
  border: 1px solid var(--border-color);
  border-radius: 10px;
  padding: 16px;
  margin-bottom: 20px;
  text-align: left;
}

.co-ewallet-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 0;
  border-bottom: 1px solid var(--border-color);
}

.co-ewallet-row:last-child {
  border-bottom: none;
}

.co-ewallet-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
}

.co-ewallet-value {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 8px;
}

.co-copy-btn {
  background: var(--accent-primary);
  color: var(--accent-inverted-text) !important;
  border: none;
  border-radius: 4px;
  padding: 4px 8px;
  font-size: 12px;
  cursor: pointer;
  transition: background 0.2s;
  width: auto !important;
  margin: 0 !important;
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
}

.co-copy-btn:hover {
  background: var(--accent-hover);
}

.co-qr-wrap {
  text-align: center;
  margin-bottom: 20px;
}

.co-qr-code {
  max-width: 150px;
  border-radius: 8px;
  border: 1px solid var(--border-color);
}

.co-qr-hint {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 8px;
}

.co-proof-form {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: 10px;
  padding: 16px;
  text-align: left;
}

.co-proof-label {
  font-size: 13px;
  color: var(--text-secondary);
  margin-bottom: 12px;
  line-height: 1.5;
}
