/* Creator Academy Hub payment UI repair. */

/* The old full-screen plan confirmation was reported as a black box. Stripe
   Checkout already provides the real payment review, so this duplicate overlay
   is permanently suppressed. */
#caPlanConfirm,
.ca-confirm-backdrop {
  display: none !important;
}

.ca-payment-status {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 11px;
  align-items: center;
  width: min(100%, 960px);
  margin: 0 auto;
  padding: 14px 16px;
  border: 1px solid rgba(36, 99, 235, 0.24);
  border-radius: 13px;
  background: linear-gradient(135deg, rgba(239, 246, 255, 0.97), rgba(240, 253, 250, 0.94));
  color: #1747b5;
  box-shadow: 0 12px 32px rgba(36, 99, 235, 0.1);
  font-weight: 760;
  line-height: 1.5;
  text-align: left;
}

.ca-payment-status::before {
  content: "";
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: currentColor;
  box-shadow: 0 0 0 5px color-mix(in srgb, currentColor 13%, transparent);
}

.ca-payment-status.warning {
  border-color: rgba(225, 154, 34, 0.38);
  background: linear-gradient(135deg, rgba(255, 248, 237, 0.98), rgba(255, 251, 235, 0.94));
  color: #854d0e;
}

.ca-payment-status.error {
  border-color: rgba(220, 38, 38, 0.28);
  background: linear-gradient(135deg, rgba(254, 242, 242, 0.98), rgba(255, 247, 237, 0.94));
  color: #991b1b;
}

.ca-payment-status.loading {
  border-color: rgba(8, 145, 178, 0.32);
  background: linear-gradient(135deg, rgba(236, 254, 255, 0.98), rgba(239, 246, 255, 0.94));
  color: #155e75;
}

.ca-payment-status.loading::before {
  animation: caPaymentStatusPulse 1s ease-in-out infinite;
}

.ca-plan-choice {
  position: relative;
}

.ca-plan-availability {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: fit-content;
  margin-top: 7px;
  padding: 4px 8px;
  border: 1px solid rgba(22, 163, 74, 0.24);
  border-radius: 999px;
  background: rgba(240, 253, 244, 0.9);
  color: #166534;
  font-size: 11px;
  font-weight: 850;
  line-height: 1.2;
}

.ca-plan-availability::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: currentColor;
  box-shadow: 0 0 0 3px rgba(22, 163, 74, 0.11);
}

.ca-plan-choice-unavailable {
  border-style: dashed;
  background: rgba(241, 245, 249, 0.82);
  cursor: not-allowed;
  opacity: 0.7;
}

.ca-plan-choice-unavailable:hover {
  transform: none;
  box-shadow: none;
  border-color: rgba(148, 163, 184, 0.42);
  background: rgba(241, 245, 249, 0.82);
}

.ca-plan-choice-unavailable .ca-plan-availability {
  border-color: rgba(148, 163, 184, 0.34);
  background: rgba(226, 232, 240, 0.86);
  color: #475569;
}

.ca-plan-choice-unavailable input {
  cursor: not-allowed;
}

.ca-secure-checkout-button {
  position: relative;
  overflow: hidden;
  min-height: 48px;
  padding-right: 46px !important;
  box-shadow: 0 14px 30px rgba(29, 78, 216, 0.2);
  transition: transform 160ms ease, box-shadow 160ms ease, opacity 160ms ease;
}

.ca-secure-checkout-button::after {
  content: "↗";
  position: absolute;
  top: 50%;
  right: 17px;
  transform: translateY(-52%);
  font-size: 1.05em;
  font-weight: 900;
  line-height: 1;
}

.ca-secure-checkout-button:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 18px 38px rgba(29, 78, 216, 0.27);
}

.ca-secure-checkout-button:focus-visible {
  outline: 3px solid rgba(56, 189, 248, 0.4);
  outline-offset: 3px;
}

.ca-plan-card.ca-payment-card-busy {
  outline: 2px solid rgba(14, 165, 233, 0.42);
  outline-offset: 3px;
  box-shadow: 0 24px 55px rgba(14, 165, 233, 0.17);
}

.ca-plan-card.ca-payment-card-busy .ca-plan-choice {
  pointer-events: none;
  opacity: 0.76;
}

button.ca-payment-loading {
  cursor: progress !important;
  opacity: 0.88;
}

button.ca-payment-loading::after {
  content: "";
  width: 15px;
  height: 15px;
  border: 2px solid rgba(255, 255, 255, 0.44);
  border-top-color: currentColor;
  border-radius: 999px;
  animation: caPaymentSpin 0.72s linear infinite;
}

@keyframes caPaymentSpin {
  to { transform: translateY(-52%) rotate(360deg); }
}

@keyframes caPaymentStatusPulse {
  0%, 100% { opacity: 0.55; transform: scale(0.9); }
  50% { opacity: 1; transform: scale(1.12); }
}

@media (max-width: 720px) {
  .ca-payment-status {
    padding: 12px;
    font-size: 14px;
  }

  .ca-secure-checkout-button {
    min-height: 52px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .ca-payment-status.loading::before,
  button.ca-payment-loading::after {
    animation: none;
  }

  .ca-secure-checkout-button {
    transition: none;
  }
}
