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

html { -webkit-text-size-adjust: 100%; }

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background: #f0f4f8;
  min-height: 100vh;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 16px;
}

/* ============================================================
   Container
   ============================================================ */
.checkout-container {
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 4px 32px rgba(0,0,0,0.10);
  padding: 24px 20px 20px;
  width: 100%;
  max-width: 440px;
  margin-top: 12px;
}

/* ============================================================
   Header
   ============================================================ */
.checkout-header {
  text-align: center;
  margin-bottom: 10px;
}

/* ============================================================
   Order summary
   ============================================================ */
.order-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #f5f3ff;
  border: 1px solid #ede9fe;
  border-radius: 10px;
  padding: 12px 16px;
  margin-bottom: 20px;
}

.order-label {
  font-size: 0.8rem;
  font-weight: 600;
  color: #6b7280;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.order-amount {
  font-size: 1.35rem;
  font-weight: 700;
  color: #4f46e5;
  letter-spacing: -0.01em;
}

/* ============================================================
   Billing form
   ============================================================ */
.billing-divider {
  font-size: 0.72rem;
  font-weight: 700;
  color: #9ca3af;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 14px;
}

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

.field-group--sm { flex: 0 0 120px; }

.field-row {
  display: flex;
  gap: 10px;
}

.field-row .field-group { flex: 1; }

.field-label {
  display: block;
  font-size: 0.75rem;
  font-weight: 700;
  color: #374151;
  margin-bottom: 5px;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.field-hint {
  font-weight: 400;
  text-transform: none;
  letter-spacing: 0;
  color: #9ca3af;
}

.field-input {
  width: 100%;
  height: 44px;
  border: 1.5px solid #e5e7eb;
  border-radius: 10px;
  padding: 0 12px;
  font-size: 14px;
  color: #111827;
  background: #f9fafb;
  transition: border-color 0.15s, background 0.15s;
  -webkit-appearance: none;
  box-sizing: border-box;
}

.field-input:focus {
  border-color: #4f46e5;
  background: #fff;
  outline: none;
  box-shadow: 0 0 0 3px rgba(79,70,229,0.12);
}

.field-input::placeholder { color: #9ca3af; }

.billing-error {
  font-size: 0.82rem;
  color: #dc2626;
  background: #fef2f2;
  border-radius: 8px;
  padding: 10px 12px;
  margin-bottom: 12px;
}

.proceed-btn {
  width: 100%;
  background: #4f46e5;
  color: #fff;
  border: none;
  border-radius: 10px;
  font-size: 1rem;
  font-weight: 600;
  padding: 14px;
  margin-top: 4px;
  cursor: pointer;
  transition: background 0.15s;
}

.proceed-btn:hover { background: #4338ca; }

.secure-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: #ecfdf5;
  color: #059669;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 4px 12px;
  border-radius: 99px;
  margin-bottom: 6px;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.lock-icon {
  width: 13px;
  height: 13px;
  stroke: #059669;
}

.checkout-header h1 {
  font-size: 1.25rem;
  font-weight: 700;
  color: #111827;
}

/* ============================================================
   Loading spinner
   ============================================================ */
.status-message {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 28px 0;
  color: #6b7280;
  font-size: 0.9rem;
}

.status-message.error {
  color: #dc2626;
  background: #fef2f2;
  border-radius: 10px;
  padding: 14px 16px;
}

.spinner {
  width: 16px;
  height: 16px;
  border: 2px solid #d1d5db;
  border-top-color: #6366f1;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  flex-shrink: 0;
}

@keyframes spin { to { transform: rotate(360deg); } }

/* ============================================================
   Hide CardCorp brand selector — client request
   ============================================================ */
.wpwl-group-brand,
.wpwl-brand-card {
  display: none !important;
}

/* ============================================================
   CardCorp widget overrides
   ============================================================ */
.wpwl-container,
.wpwl-container * {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif !important;
  box-sizing: border-box !important;
}

/* Strip the inner card box the widget renders */
.wpwl-form-card {
  padding: 0 !important;
  border: none !important;
  background: transparent !important;
  box-shadow: none !important;
  margin: 0 !important;
}

/* Row groups */
.wpwl-group {
  margin-bottom: 14px !important;
}

/* Labels */
.wpwl-label,
.wpwl-label-cardNumber,
.wpwl-label-cardHolder,
.wpwl-label-expiry,
.wpwl-label-cvv {
  display: block !important;
  font-size: 0.78rem !important;
  font-weight: 700 !important;
  color: #374151 !important;
  margin-bottom: 6px !important;
  letter-spacing: 0.03em !important;
  text-transform: uppercase !important;
}

/* Input fields */
.wpwl-control,
.wpwl-control-cardNumber,
.wpwl-control-cardHolder,
.wpwl-control-expiry,
.wpwl-control-cvv {
  width: 100% !important;
  height: 48px !important;
  border: 1.5px solid #e5e7eb !important;
  border-radius: 10px !important;
  padding: 0 14px !important;
  font-size: 15px !important;
  color: #111827 !important;
  background: #f9fafb !important;
  transition: border-color 0.15s, background 0.15s !important;
  -webkit-appearance: none !important;
}

.wpwl-control:focus,
.wpwl-control-cardNumber:focus,
.wpwl-control-cardHolder:focus,
.wpwl-control-expiry:focus,
.wpwl-control-cvv:focus {
  border-color: #4f46e5 !important;
  background: #fff !important;
  outline: none !important;
  box-shadow: 0 0 0 3px rgba(79,70,229,0.12) !important;
}

/* Placeholder text */
.wpwl-control::placeholder { color: #9ca3af !important; }

.wpwl-button-pay {
  background: #4f46e5 !important;
  border: none !important;
  border-radius: 10px !important;
  font-size: 1rem !important;
  font-weight: 600 !important;
  padding: 14px !important;
  width: 100% !important;
  margin-top: 8px !important;
  cursor: pointer !important;
  transition: background 0.15s !important;
}

.wpwl-button-pay:hover {
  background: #4338ca !important;
}

/* ============================================================
   Trust bar
   ============================================================ */
.trust-bar {
  display: flex;
  justify-content: center;
  gap: 20px;
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid #f3f4f6;
}

.trust-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  font-size: 0.68rem;
  font-weight: 600;
  color: #6b7280;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.trust-item svg {
  width: 18px;
  height: 18px;
  stroke: #9ca3af;
}

/* ============================================================
   Card logos
   ============================================================ */
.card-logos {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  margin-top: 14px;
}

.card-logo {
  width: 48px;
  height: 16px;
  border-radius: 3px;
  opacity: 0.85;
}

/* ============================================================
   Mobile — screens under 400px
   ============================================================ */
@media (max-width: 400px) {
  body { padding: 0; align-items: flex-start; }

  .checkout-container {
    border-radius: 0;
    box-shadow: none;
    min-height: 100vh;
    margin-top: 0;
    padding: 20px 16px 24px;
  }

  .trust-bar { gap: 14px; }
}

/* ============================================================
   CardCorp widget overrides
   ============================================================ */
.wpwl-button-pay {
  font-size: 0 !important;
}
.wpwl-button-pay::after {
  content: "Pay Securely";
  font-size: 1rem;
}
