/**
 * LearnDash Stripe Autopilot — Checkout Styles
 *
 * Minimal styles for the Embedded Checkout container.
 * Stripe handles all styling inside its iframe.
 * We only style the wrapper, loading state, guarantee badge, and error state.
 */

/* Checkout wrapper — fills available width, centers on wide screens */
.ldsa-checkout-wrap {
  width: 100%;
  max-width: 800px;
  margin: 0 auto;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

/* Ensure parent Kadence column gives us full width */
.wp-block-kadence-column .ldsa-checkout-wrap,
.kt-inside-inner-col .ldsa-checkout-wrap {
  width: 100%;
  max-width: 100%;
}

/* Stripe iframe mount point */
.ldsa-checkout-mount {
  min-height: 350px;
  border-radius: 12px;
  overflow: hidden;
  background: #ffffff;
}

/* Make sure the Stripe iframe takes full width */
.ldsa-checkout-mount iframe {
  width: 100% !important;
}

/* Loading state */
.ldsa-checkout-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 350px;
  color: #6b7280;
  font-size: 14px;
  gap: 16px;
}

.ldsa-spinner {
  width: 32px;
  height: 32px;
  border: 3px solid #e5e7eb;
  border-top-color: #2563eb;
  border-radius: 50%;
  animation: ldsa-spin 0.7s linear infinite;
}

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

/* Error state */
.ldsa-checkout-error {
  padding: 24px;
  text-align: center;
  color: #991b1b;
  background: #fef2f2;
  border: 1px solid #fecaca;
  border-radius: 8px;
  font-size: 14px;
}

.ldsa-checkout-error p {
  margin: 0;
}

/* Guarantee badge */
.ldsa-guarantee {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 16px;
  padding: 12px 16px;
  font-size: 13px;
  color: #6b7280;
  background: #f9fafb;
  border-radius: 8px;
}

.ldsa-guarantee svg {
  flex-shrink: 0;
  color: #10b981;
}

/* Responsive: mobile */
@media (max-width: 639px) {
  .ldsa-checkout-mount {
    border-radius: 8px;
  }
}
