/* Checkout widget — scoped to reduce theme collisions */
.haiq-checkout-scope,
.haiq-checkout-success-scope {
  font-family: Raleway, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
}

.haiq-checkout-scope {
  --pd-navy: #24468f;
  --pd-navy-dark: #18346f;
  --pd-link: #00a6c8;
  --pd-border: #d8e2ea;
  --pd-text: #26323f;
  --pd-muted: #5f6f7c;
  --pd-soft: #f6fafb;
}

/* Main sales widget */
.haiq-checkout-scope .haiq-sales-card {
  width: 100%;
  max-width: 680px;
  margin: 28px auto 22px;
  padding: 26px 32px 28px;
  box-sizing: border-box;
  background: #ffffff;
  border: 1px solid var(--pd-border);
  border-radius: 4px;
  box-shadow: 0 6px 18px rgba(24, 52, 111, 0.07);
  text-align: center;
}

/* Billing toggle */
.haiq-checkout-scope .haiq-plan-toggle-wrap {
  display: flex;
  justify-content: center;
  margin: 0 0 14px;
}

.haiq-checkout-scope .haiq-plan-toggle {
  display: inline-flex;
  gap: 6px;
  flex-wrap: wrap;
  justify-content: center;
}

.haiq-checkout-scope .haiq-plan-btn {
  appearance: none;
  box-sizing: border-box;
  border: 1px solid var(--pd-border);
  border-radius: 3px;
  padding: 9px 18px;
  cursor: pointer;
  background: #ffffff;
  color: var(--pd-text);
  font-size: 13px;
  font-weight: 700;
  line-height: 1.2;
}

.haiq-checkout-scope .haiq-plan-btn.is-active,
.haiq-checkout-scope .haiq-plan-btn[aria-pressed="true"] {
  background: var(--pd-navy);
  border-color: var(--pd-navy);
  color: #ffffff;
}

/* Title and subtitle */
.haiq-checkout-scope .haiq-product-title {
  margin: 0 auto 6px;
  max-width: 620px;
  color: var(--pd-text);
  font-size: 22px;
  line-height: 1.3;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.haiq-checkout-scope .haiq-checkout-subtitle {
  margin: 6px auto 8px;
  max-width: 560px;
  padding: 0;
  text-align: center;
  color: var(--pd-muted);
  font-size: 12px;
  line-height: 1.45;
  font-weight: 600;
}

/* Price */
.haiq-checkout-scope .haiq-price-wrap {
  text-align: center;
  margin-top: 8px;
}

.haiq-checkout-scope .haiq-price-line {
  color: #111827;
  font-size: 30px;
  line-height: 1.1;
  font-weight: 800;
  letter-spacing: -0.3px;
}

.haiq-checkout-scope .haiq-price-suffix {
  margin-top: 2px;
  color: var(--pd-muted);
  font-size: 12px;
  line-height: 1.4;
}

/* Description */
.haiq-checkout-scope .haiq-product-description {
  max-width: 590px;
  margin: 14px auto 0;
  text-align: center;
  color: var(--pd-text);
  font-size: 13px;
  line-height: 1.6;
}

/* Subscribe button */
.haiq-checkout-scope .haiq-subscribe-wrap {
  display: flex;
  justify-content: center;
  margin: 20px 0 0;
}

.haiq-checkout-scope .haiq-subscribe-btn {
  appearance: none;
  min-width: 170px;
  border: 1px solid var(--pd-navy);
  border-radius: 3px;
  padding: 11px 24px;
  cursor: pointer;
  background: var(--pd-navy);
  color: #ffffff;
  font-weight: 800;
  letter-spacing: 0.04em;
  font-size: 12px;
  line-height: 1.2;
  text-transform: uppercase;
  transition: background-color 160ms ease, border-color 160ms ease, transform 160ms ease;
}

.haiq-checkout-scope .haiq-subscribe-btn:hover {
  background: var(--pd-navy-dark);
  border-color: var(--pd-navy-dark);
  transform: translateY(-1px);
}

/* Embedded Stripe checkout area */
.haiq-checkout-scope .haiq-checkout-section {
  display: none;
  max-width: 100%;
  margin: 18px auto 0;
  scroll-margin-top: min(120px, 20vh);
  scroll-margin-bottom: 1.5rem;
}

.haiq-checkout-scope .haiq-loading-text {
  text-align: center;
  font-size: 14px;
  color: var(--pd-muted);
  margin: 0 0 14px;
}

.haiq-checkout-scope .haiq-checkout-container {
  min-width: 0;
  width: 100%;
  max-width: 100%;
  margin: 0 auto;
}

.haiq-checkout-scope .haiq-cancel-wrap {
  text-align: center;
  margin-top: 16px;
}

.haiq-checkout-scope .haiq-cancel-btn {
  background: none;
  border: none;
  color: var(--pd-muted);
  text-decoration: underline;
  cursor: pointer;
  font-size: 13px;
  padding: 8px;
}

/* Mobile */
@media (max-width: 640px) {
  .haiq-checkout-scope .haiq-sales-card {
    max-width: 100%;
    margin: 22px auto 18px;
    padding: 22px 18px 24px;
  }

  .haiq-checkout-scope .haiq-product-title {
    font-size: 20px;
  }

  .haiq-checkout-scope .haiq-price-line {
    font-size: 28px;
  }

  .haiq-checkout-scope .haiq-subscribe-btn {
    min-width: 160px;
  }
}

/* Success page */
.haiq-checkout-success-scope #haiq-success-wrapper {
  text-align: center;
  padding: 50px 16px;
}

.haiq-checkout-success-scope #haiq-success {
  max-width: 760px;
  margin: 0 auto;
  padding: 56px 16px;
  color: #111827;
}

.haiq-checkout-success-scope .haiq-success-heading-row {
  display: flex;
  align-items: center;
  gap: 12px;
  justify-content: center;
}

.haiq-checkout-success-scope #haiq-spinner {
  width: 18px;
  height: 18px;
  border-radius: 999px;
  border: 2px solid #dbeafe;
  border-top-color: var(--pd-navy);
  animation: haiqspin 900ms linear infinite;
}

.haiq-checkout-success-scope #status-title {
  margin: 0;
  font-size: 22px;
  font-weight: 800;
  text-align: center;
}

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

.haiq-checkout-success-scope #haiq-message-shell {
  max-width: 560px;
  margin: 10px auto 0;
  min-height: 104px;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
}

.haiq-checkout-success-scope #status-message {
  margin: 0;
  text-align: center;
  font-size: 14px;
  line-height: 1.6;
  color: #6b7280;
}

.haiq-checkout-success-scope #haiq-email-meta {
  margin-top: 10px;
  min-height: 48px;
  font-size: 14px;
  line-height: 1.6;
  color: #6b7280;
}

.haiq-checkout-success-scope #haiq-email-meta strong {
  color: #4b5563;
  word-break: break-word;
}

.haiq-checkout-success-scope #haiq-steps-card {
  margin: 26px auto 0;
  max-width: 560px;
  background: #f9fafb;
  border: 1px solid #e5e7eb;
  border-radius: 4px;
  padding: 18px 16px;
}

.haiq-checkout-success-scope #haiq-steps {
  display: flex;
  flex-direction: column;
  gap: 18px;
  font-size: 14px;
  text-align: left;
}

.haiq-checkout-success-scope .haiq-step {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  text-align: left;
}

.haiq-checkout-success-scope .haiq-step-icon {
  width: 18px;
  height: 18px;
  min-width: 18px;
  border-radius: 999px;
  background: #dbeafe;
  color: var(--pd-navy);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 900;
  font-size: 12px;
  margin-top: 2px;
}

.haiq-checkout-success-scope .haiq-step-title {
  font-weight: 700;
}

.haiq-checkout-success-scope .haiq-step-subtitle {
  color: #6b7280;
  font-size: 12px;
  margin-top: 4px;
}

.haiq-checkout-success-scope #haiq-actions {
  display: none;
  margin: 18px auto 0;
  max-width: 560px;
}

.haiq-checkout-success-scope #haiq-primary-action {
  display: inline-block;
  width: 100%;
  box-sizing: border-box;
  text-align: center;
  text-decoration: none;
  background: var(--pd-navy);
  color: #ffffff;
  border-radius: 3px;
  padding: 12px 16px;
  font-weight: 700;
}

.haiq-checkout-success-scope #haiq-secondary-action {
  display: none;
  margin-top: 10px;
  width: 100%;
  box-sizing: border-box;
  text-align: center;
  text-decoration: none;
  background: #ffffff;
  color: var(--pd-navy);
  border: 2px solid var(--pd-navy);
  border-radius: 3px;
  padding: 12px 16px;
  font-weight: 700;
}

.haiq-checkout-success-scope #haiq-footnote {
  margin: 14px auto 0;
  max-width: 560px;
  text-align: center;
  font-size: 12px;
  line-height: 1.6;
  color: #9ca3af;
}

.haiq-checkout-success-scope .haiq-step-icon.is-done,
.haiq-checkout-success-scope #haiq-spinner.is-complete {
  background: var(--pd-navy);
  color: #ffffff;
  border-color: var(--pd-navy);
  animation: none;
}

.haiq-checkout-success-scope .haiq-step-icon.is-active {
  background: #dbeafe;
  color: var(--pd-navy);
}

.haiq-checkout-success-scope .haiq-step-icon.is-idle {
  background: #f3f4f6;
  color: #6b7280;
}