/* ── Whop Payment Gateway ── */

/* Hide billing address section when user already has a saved address */
body.whop-has-billing-address #cfw-customer-info-address {
  display: none !important;
}

/* Make the payment box blend seamlessly */
.payment_method_whop .payment_box,
.cfw-payment-method-information-whop,
#payment .payment_methods li.payment_method_whop .payment_box {
  background: #fff !important;
}

.payment_method_whop .payment_box::before,
.payment_method_whop .payment_box::after {
  display: none !important;
}

/* Whop Elements container — remove extra spacing around the element */
.whop-element-container {
  margin: 0;
  position: relative;
}

.whop-element-mount {
  min-height: 0;
}

.whop-element-error {
  padding: 16px 20px;
  color: #b32d2e;
  font-size: 14px;
  background: #fdf2f2;
  border-left: 4px solid #b32d2e;
  border-radius: 4px;
}

/* Loading spinner */
.whop-embed-loading {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 30px 20px;
  color: #999;
  font-size: 14px;
}

.whop-embed-loading::before {
  content: "";
  width: 18px;
  height: 18px;
  border: 2px solid #e2e2e2;
  border-top-color: #666;
  border-radius: 50%;
  animation: whop-spin 0.6s linear infinite;
}

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

/* ── Saved Cards ── */

.whop-saved-cards {
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.whop-saved-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  border: 1.5px solid #e2e2e2;
  border-radius: 10px;
  margin: 0;
  cursor: pointer;
  transition:
    border-color 0.15s,
    background-color 0.15s,
    box-shadow 0.15s;
  background: #fff;
}

.whop-saved-card:hover {
  border-color: #c0c0c0;
  background-color: #fafafa;
}

.whop-saved-card--selected {
  border-color: #000;
  background-color: #fafafa;
  box-shadow: 0 0 0 1px #000;
}

.whop-saved-card input[type="radio"] {
  appearance: none;
  -webkit-appearance: none;
  width: 18px;
  height: 18px;
  border: 2px solid #ccc;
  border-radius: 50%;
  flex-shrink: 0;
  margin: 0;
  position: relative;
  cursor: pointer;
  transition: border-color 0.15s;
}

.whop-saved-card input[type="radio"]:checked {
  border-color: #000;
}

.whop-saved-card input[type="radio"]:checked::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 8px;
  height: 8px;
  background: #000;
  border-radius: 50%;
}

.whop-saved-card__icon {
  flex-shrink: 0;
  display: flex;
  align-items: center;
}

.whop-saved-card__icon svg {
  display: block;
  border-radius: 4px;
}

.whop-saved-card__details {
  display: flex;
  align-items: center;
  gap: 6px;
  flex: 1;
  min-width: 0;
  font-size: 14px;
  line-height: 1.4;
}

.whop-saved-card__brand {
  font-weight: 600;
  color: #1a1a1a;
}

.whop-saved-card__number {
  color: #666;
  letter-spacing: 0.5px;
}

.whop-saved-card__expiry {
  flex-shrink: 0;
  font-size: 13px;
  color: #999;
}

/* ── Alt gateway containers (Klarna, Scalapay, PayPal) ── */

.payment_method_whop_klarna .payment_box,
.payment_method_whop_scalapay .payment_box,
.payment_method_whop_paypal .payment_box,
.cfw-payment-method-information-whop_klarna,
.cfw-payment-method-information-whop_scalapay,
.cfw-payment-method-information-whop_paypal,
#payment .payment_methods li[class*="payment_method_whop_"] .payment_box {
  background: #fff !important;
}

.payment_method_whop_klarna .payment_box::before,
.payment_method_whop_klarna .payment_box::after,
.payment_method_whop_scalapay .payment_box::before,
.payment_method_whop_scalapay .payment_box::after,
.payment_method_whop_paypal .payment_box::before,
.payment_method_whop_paypal .payment_box::after {
  display: none !important;
}

