/* Checkout polish v8 — matches site blue theme, scoped to /checkout */

html.cv-checkout-page {
  scroll-behavior: smooth;
}

html.cv-checkout-page body {
  background: #f8fafc;
}

/* ── Progress (inside max-w-6xl) ── */
#cv-co-progress {
  margin: 0 0 1.25rem;
  padding: 0.85rem 1rem;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.06);
}

#cv-co-progress .cv-co-steps {
  display: grid;
  grid-template-columns: 1fr auto 1fr auto 1fr;
  align-items: center;
  gap: 0.5rem 0.35rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

#cv-co-progress .cv-co-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.35rem;
  text-align: center;
  font-size: 0.7rem;
  font-weight: 600;
  color: #64748b;
  line-height: 1.2;
}

@media (min-width: 480px) {
  #cv-co-progress .cv-co-step {
    font-size: 0.75rem;
  }
}

#cv-co-progress .cv-co-dot {
  width: 1.75rem;
  height: 1.75rem;
  border-radius: 999px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.72rem;
  font-weight: 700;
  background: #e2e8f0;
  color: #475569;
  border: 2px solid #cbd5e1;
}

#cv-co-progress .cv-co-step.cv-done .cv-co-dot {
  background: #2563eb;
  border-color: #2563eb;
  color: #fff;
}

#cv-co-progress .cv-co-step.cv-active .cv-co-dot {
  background: #1d4ed8;
  border-color: #1d4ed8;
  color: #fff;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.25);
}

#cv-co-progress .cv-co-step.cv-active {
  color: #1e3a8a;
}

#cv-co-progress .cv-co-bar {
  height: 3px;
  background: #e2e8f0;
  border-radius: 99px;
  align-self: center;
  margin-bottom: 1.1rem;
  min-width: 1.5rem;
}

#cv-co-progress .cv-co-bar.cv-fill {
  background: linear-gradient(90deg, #2563eb, #93c5fd);
}

/* ── Subtitle under H1 ── */
#cv-co-subtitle,
.cv-co-subtitle {
  color: #64748b !important;
  font-size: 0.95rem !important;
  line-height: 1.55 !important;
  margin: 0 0 1.5rem !important;
  max-width: 36rem;
}

/* ── After-payment block (above payment section) ── */
#cv-co-next {
  margin: 0 0 1.25rem;
  padding: 1rem 1.1rem;
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  border-radius: 12px;
}

#cv-co-next h3 {
  margin: 0 0 0.65rem;
  font-size: 0.88rem;
  font-weight: 700;
  color: #1e3a8a;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

#cv-co-next ol {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

#cv-co-next li {
  display: flex;
  align-items: flex-start;
  gap: 0.55rem;
  font-size: 0.84rem;
  color: #334155;
  line-height: 1.4;
}

#cv-co-next .cv-co-num {
  flex-shrink: 0;
  width: 1.25rem;
  height: 1.25rem;
  border-radius: 999px;
  background: #2563eb;
  color: #fff;
  font-size: 0.65rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 0.1rem;
}

#cv-co-next li strong {
  color: #0f172a;
  font-weight: 600;
}

/* ── Accepted card brands (payment section) ── */
#cv-co-cards.cv-co-cards {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.65rem 0.85rem;
  margin: 0 0 1rem;
  padding: 0.65rem 0.85rem;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
}

#cv-co-cards .cv-co-cards-label {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #64748b;
  flex: 0 0 auto;
}

#cv-co-cards .cv-co-cards-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.45rem;
  flex: 1 1 auto;
}

#cv-co-cards .cv-co-card {
  display: inline-flex;
  line-height: 0;
  border-radius: 6px;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.08);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

#cv-co-cards .cv-co-card:hover {
  transform: translateY(-1px);
  box-shadow: 0 3px 8px rgba(15, 23, 42, 0.12);
}

#cv-co-cards .cv-co-card svg {
  display: block;
  width: 52px;
  height: auto;
}

@media (max-width: 480px) {
  #cv-co-cards.cv-co-cards {
    flex-direction: column;
    align-items: flex-start;
  }

  #cv-co-cards .cv-co-card svg {
    width: 46px;
  }
}

/* ── Page shell (patched bundle classes) ── */
html.cv-checkout-page .cv-co-page {
  background: #f8fafc !important;
  padding-top: 1.5rem !important;
  padding-bottom: 2rem !important;
}

html.cv-checkout-page .cv-co-urgency {
  animation: none !important;
  background: #fffbeb !important;
  border: 1px solid #fcd34d !important;
  box-shadow: none !important;
}

html.cv-checkout-page .cv-co-back:hover {
  color: #2563eb !important;
}

html.cv-checkout-page #root h1.text-gray-900 {
  font-size: clamp(1.5rem, 3.5vw, 1.875rem) !important;
  font-weight: 700 !important;
  color: #0f172a !important;
  margin-bottom: 0.35rem !important;
}

/* Sidebar order card */
html.cv-checkout-page .cv-co-sidebar > div:first-child {
  background: #fff !important;
  border: 1px solid #e2e8f0 !important;
  border-radius: 1rem !important;
  box-shadow: 0 4px 24px rgba(15, 23, 42, 0.07) !important;
}

html.cv-checkout-page .cv-co-sidebar h2 {
  font-size: 1.1rem !important;
  font-weight: 700 !important;
  color: #0f172a !important;
}

html.cv-checkout-page .text-3xl.text-emerald-600,
html.cv-checkout-page .text-3xl.font-black {
  font-size: 2rem !important;
  color: #2563eb !important;
}

/* Pay button — always visible (Tailwind gradient may be missing from build) */
html.cv-checkout-page button.cv-co-pay,
html.cv-checkout-page .cv-co-page button[type="button"].cv-co-pay,
section.cv-co-page button.cv-co-pay {
  background: linear-gradient(to right, #2563eb, #1d4ed8) !important;
  background-image: linear-gradient(to right, #2563eb, #1d4ed8) !important;
  color: #fff !important;
  -webkit-text-fill-color: #fff !important;
  border: none !important;
  box-shadow: 0 4px 14px rgba(37, 99, 235, 0.4) !important;
  border-radius: 0.75rem !important;
  font-size: 1.05rem !important;
  font-weight: 700 !important;
  min-height: 3.25rem !important;
  cursor: pointer !important;
  opacity: 1 !important;
}

html.cv-checkout-page button.cv-co-pay:disabled {
  background: linear-gradient(to right, #64748b, #475569) !important;
  background-image: linear-gradient(to right, #64748b, #475569) !important;
  color: #fff !important;
  opacity: 0.85 !important;
  cursor: not-allowed !important;
}

html.cv-checkout-page button.cv-co-pay:hover:not(:disabled) {
  background: linear-gradient(to right, #1d4ed8, #1e40af) !important;
  background-image: linear-gradient(to right, #1d4ed8, #1e40af) !important;
  box-shadow: 0 6px 20px rgba(37, 99, 235, 0.45) !important;
  transform: translateY(-1px);
}

html.cv-checkout-page button.cv-co-pay:active:not(:disabled) {
  transform: translateY(0);
}

html.cv-checkout-page .cv-co-billing-card {
  background: #fff !important;
  border-color: #e2e8f0 !important;
}

html.cv-checkout-page .cv-co-stripe-wrap {
  border-color: #e2e8f0 !important;
  background: #fff !important;
}

html.cv-checkout-page .cv-co-stripe-wrap:focus-within {
  border-color: #2563eb !important;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15) !important;
}

html.cv-checkout-page #root input:focus,
html.cv-checkout-page #root select:focus {
  border-color: #2563eb !important;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12) !important;
  outline: none !important;
}

/* Grid breathing room on mobile */
@media (max-width: 1023px) {
  html.cv-checkout-page .cv-co-grid {
    gap: 1.5rem !important;
  }

  html.cv-checkout-page .cv-co-sidebar {
    order: -1;
  }
}

/* Mobile sticky bar */
#cv-co-mobile-cta {
  display: none;
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 80;
  padding: 0.7rem 1rem calc(0.7rem + env(safe-area-inset-bottom, 0));
  background: #fff;
  border-top: 1px solid #e2e8f0;
  box-shadow: 0 -4px 20px rgba(15, 23, 42, 0.1);
}

#cv-co-mobile-cta.cv-show {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

#cv-co-mobile-cta .cv-co-m-label {
  font-size: 0.68rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #64748b;
}

#cv-co-mobile-cta .cv-co-m-amount {
  font-size: 1.25rem;
  font-weight: 800;
  color: #2563eb;
  line-height: 1.1;
}

#cv-co-mobile-cta button {
  flex-shrink: 0;
  padding: 0.75rem 1.1rem;
  border: none;
  border-radius: 0.65rem;
  font-weight: 700;
  font-size: 0.9rem;
  color: #fff;
  background: linear-gradient(to right, #2563eb, #1d4ed8);
  box-shadow: 0 2px 10px rgba(37, 99, 235, 0.35);
  cursor: pointer;
}

@media (max-width: 1023px) {
  html.cv-checkout-page #cv-co-mobile-cta.cv-show {
    display: flex;
  }

  html.cv-checkout-page body {
    padding-bottom: 4.75rem;
  }
}

@media (min-width: 1024px) {
  #cv-co-mobile-cta {
    display: none !important;
  }

  html.cv-checkout-page body {
    padding-bottom: 0;
  }
}
