/* ============================================================
   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: 20px;
}

.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: 10px;
  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; }
}
