/* ------------------------------------------------------------------ */
/* Checkout public shell                                               */
/* ------------------------------------------------------------------ */
.co-wrap { max-width: 1100px; margin: 0 auto; padding: 0 1.25rem; }

.co-shell-head {
  background: #fff;
  border-bottom: 1px solid #e5e7eb;
  position: sticky;
  top: 0;
  z-index: 40;
}
.co-shell-head-inner {
  min-height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.co-brand { font-size: 1.1rem; font-weight: 800; color: #111827; text-decoration: none; letter-spacing: -.01em; }
.co-brand-dot { color: #2563eb; }

.co-main { padding: 2rem 0 3rem; }

/* ------------------------------------------------------------------ */
/* Step progress                                                       */
/* ------------------------------------------------------------------ */
.co-steps {
  display: flex;
  gap: 0;
  flex-wrap: wrap;
  margin-bottom: 1.75rem;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  overflow: hidden;
  background: #f9fafb;
}
.co-step {
  display: flex;
  align-items: center;
  gap: .45rem;
  padding: .55rem .8rem;
  color: #9ca3af;
  font-size: .8rem;
  font-weight: 500;
  flex: 1 1 auto;
  min-width: 0;
  white-space: nowrap;
  border-right: 1px solid #e5e7eb;
  position: relative;
}
.co-step:last-child { border-right: none; }
.co-step-badge {
  width: 1.4rem;
  height: 1.4rem;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #e5e7eb;
  color: #6b7280;
  font-size: .7rem;
  font-weight: 700;
  flex-shrink: 0;
}
.co-step-label { overflow: hidden; text-overflow: ellipsis; }
.co-step.is-current {
  background: #eff6ff;
  color: #1d4ed8;
  font-weight: 600;
}
.co-step.is-current .co-step-badge { background: #2563eb; color: #fff; }
.co-step.is-complete { color: #166534; background: #f0fdf4; }
.co-step.is-complete .co-step-badge { background: #16a34a; color: #fff; }
.co-step.is-complete .co-step-label::after { content: " ✓"; }

@media (max-width: 640px) {
  .co-steps { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: thin; }
  .co-step { flex: 0 0 auto; font-size: .72rem; padding: .45rem .6rem; }
  .co-step-label { display: none; }
  .co-step.is-current .co-step-label { display: inline; }
}

/* ------------------------------------------------------------------ */
/* Cards                                                               */
/* ------------------------------------------------------------------ */
.co-card {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 16px;
  padding: 1.5rem 1.75rem;
}
.co-card + .co-card { margin-top: 1rem; }
.co-card-narrow { max-width: 560px; margin: 0 auto; }
.co-title { margin: 0 0 .35rem; font-size: 1.6rem; font-weight: 700; color: #111827; letter-spacing: -.02em; }
.co-sub { margin: 0 0 1.25rem; color: #6b7280; font-size: .95rem; }

/* ------------------------------------------------------------------ */
/* Billing cycle toggle                                                */
/* ------------------------------------------------------------------ */
.co-cycle-wrap { margin-bottom: 1.5rem; }
.co-cycle-label { font-size: .82rem; font-weight: 600; color: #374151; text-transform: uppercase; letter-spacing: .04em; margin-bottom: .5rem; }
.co-cycle-switch {
  display: inline-flex;
  background: #f3f4f6;
  border-radius: 10px;
  padding: 3px;
  gap: 2px;
}
.co-cycle-btn {
  padding: .45rem 1.1rem;
  border-radius: 8px;
  border: none;
  background: transparent;
  color: #6b7280;
  font-size: .88rem;
  font-weight: 500;
  cursor: pointer;
  transition: background .15s, color .15s, box-shadow .15s;
  white-space: nowrap;
}
.co-cycle-btn.is-active {
  background: #fff;
  color: #1d4ed8;
  font-weight: 700;
  box-shadow: 0 1px 4px rgba(0,0,0,.10);
}
.co-cycle-save-badge {
  display: inline-block;
  margin-left: .35rem;
  background: #dcfce7;
  color: #166534;
  font-size: .72rem;
  font-weight: 700;
  padding: .1rem .4rem;
  border-radius: 999px;
  vertical-align: middle;
}

/* ------------------------------------------------------------------ */
/* Plan selection grid                                                 */
/* ------------------------------------------------------------------ */
.co-plan-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
  margin-bottom: 1.5rem;
}
.co-plan-card {
  border: 2px solid #e5e7eb;
  border-radius: 14px;
  padding: 1.1rem 1rem;
  display: flex;
  flex-direction: column;
  gap: .5rem;
  cursor: pointer;
  transition: border-color .15s, box-shadow .15s;
  position: relative;
}
.co-plan-card:has(input:checked) {
  border-color: #2563eb;
  box-shadow: 0 0 0 3px #dbeafe;
}
.co-plan-card input[type="radio"] { position: absolute; opacity: 0; pointer-events: none; }
.co-plan-recommended {
  position: absolute;
  top: -.7rem;
  left: 50%;
  transform: translateX(-50%);
  background: #2563eb;
  color: #fff;
  font-size: .72rem;
  font-weight: 700;
  padding: .15rem .65rem;
  border-radius: 999px;
  white-space: nowrap;
  letter-spacing: .02em;
}
.co-plan-name { font-weight: 700; font-size: 1.05rem; color: #111827; }
.co-plan-price { font-size: 1.5rem; font-weight: 800; color: #111827; line-height: 1; }
.co-plan-price-sub { font-size: .8rem; color: #6b7280; margin-top: .15rem; }
.co-plan-unit { font-size: .82rem; color: #6b7280; }
.co-plan-features { margin-top: .4rem; display: flex; flex-direction: column; gap: .2rem; }
.co-plan-feature { font-size: .82rem; color: #374151; display: flex; align-items: center; gap: .3rem; }
.co-plan-feature::before { content: "✓"; color: #16a34a; font-weight: 700; flex-shrink: 0; }

/* ------------------------------------------------------------------ */
/* Comparison table                                                    */
/* ------------------------------------------------------------------ */
.co-compare-wrap { margin: 1.5rem 0; overflow-x: auto; }
.co-compare-title { font-size: .85rem; font-weight: 700; color: #374151; text-transform: uppercase; letter-spacing: .04em; margin-bottom: .6rem; }
.co-compare {
  width: 100%;
  border-collapse: collapse;
  font-size: .875rem;
}
.co-compare thead th {
  background: #f8fafc;
  font-weight: 700;
  color: #374151;
  padding: .65rem .8rem;
  border-bottom: 2px solid #e5e7eb;
  text-align: left;
  white-space: nowrap;
}
.co-compare thead th:first-child { color: #6b7280; font-weight: 600; }
.co-compare tbody tr { border-bottom: 1px solid #f3f4f6; }
.co-compare tbody tr:last-child { border-bottom: none; }
.co-compare tbody th { padding: .55rem .8rem; color: #374151; font-weight: 500; }
.co-compare tbody td { padding: .55rem .8rem; color: #374151; text-align: left; }
.co-compare td[data-val="Yes"] { color: #16a34a; font-weight: 700; }
.co-compare td[data-val="-"] { color: #d1d5db; }

/* ------------------------------------------------------------------ */
/* Form layout helpers                                                 */
/* ------------------------------------------------------------------ */
.co-inline-form {
  display: grid;
  grid-template-columns: 1fr 1fr auto;
  gap: .75rem;
  margin-bottom: 1.25rem;
  align-items: end;
}

.co-field-label {
  font-weight: 600;
  color: #111827;
}

.co-select {
  border-color: #d1d5db;
  border-radius: 10px;
  min-height: 42px;
}

.co-input {
  border-color: #d1d5db;
  border-radius: 10px;
  min-height: 42px;
}

.co-select:focus,
.co-input:focus {
  border-color: #2563eb;
  box-shadow: 0 0 0 3px #dbeafe;
}

/* ------------------------------------------------------------------ */
/* Actions / buttons                                                   */
/* ------------------------------------------------------------------ */
.co-actions {
  display: flex;
  gap: .6rem;
  margin-top: 1.25rem;
  flex-wrap: wrap;
  align-items: center;
}
.co-actions-end { justify-content: flex-end; }

/* ------------------------------------------------------------------ */
/* Order summary panel                                                 */
/* ------------------------------------------------------------------ */
.co-summary-panel {
  background: #f8fafc;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 1rem 1.1rem;
  font-size: .875rem;
}
.co-summary-panel h6 { font-weight: 700; color: #374151; margin-bottom: .6rem; font-size: .82rem; text-transform: uppercase; letter-spacing: .04em; }
.co-summary-row { display: flex; justify-content: space-between; gap: .5rem; padding: .25rem 0; color: #374151; }
.co-summary-row-total { font-weight: 700; font-size: 1rem; color: #111827; border-top: 1px solid #e5e7eb; margin-top: .35rem; padding-top: .5rem; }
.co-summary-cycle-badge {
  display: inline-block;
  background: #dbeafe;
  color: #1d4ed8;
  border-radius: 999px;
  font-size: .72rem;
  font-weight: 600;
  padding: .1rem .45rem;
  margin-left: .3rem;
  vertical-align: middle;
}

/* ------------------------------------------------------------------ */
/* Payment page trust badge                                            */
/* ------------------------------------------------------------------ */
.co-stripe-trust {
  display: flex;
  align-items: center;
  gap: .6rem;
  padding: .75rem 1rem;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  background: #f9fafb;
  margin-bottom: 1.25rem;
  font-size: .85rem;
  color: #374151;
}
.co-stripe-trust-icon { font-size: 1.25rem; flex-shrink: 0; }
.co-stripe-trust-text strong { color: #111827; display: block; }
.co-payment-note { font-size: .8rem; }

/* ------------------------------------------------------------------ */
/* Payment confirming / spinner                                        */
/* ------------------------------------------------------------------ */
.co-confirming-wrap { text-align: center; padding: 2.5rem 1rem; }
.co-spinner {
  width: 48px;
  height: 48px;
  border: 4px solid #e5e7eb;
  border-top-color: #2563eb;
  border-radius: 50%;
  animation: co-spin .8s linear infinite;
  margin: 0 auto 1.25rem;
}
@keyframes co-spin { to { transform: rotate(360deg); } }
.co-confirming-title { font-size: 1.35rem; font-weight: 700; color: #111827; margin-bottom: .5rem; }
.co-confirming-sub { color: #6b7280; font-size: .9rem; max-width: 360px; margin: 0 auto 1.5rem; }
.co-confirming-note { font-size: .8rem; color: #9ca3af; }

/* ------------------------------------------------------------------ */
/* Onboarding success banner                                           */
/* ------------------------------------------------------------------ */
.co-success-banner {
  display: flex;
  align-items: center;
  gap: .75rem;
  padding: .85rem 1.1rem;
  background: #f0fdf4;
  border: 1px solid #86efac;
  border-radius: 10px;
  margin-bottom: 1.25rem;
  font-size: .9rem;
  color: #166534;
  font-weight: 600;
}
.co-success-icon { font-size: 1.3rem; flex-shrink: 0; }

/* ------------------------------------------------------------------ */
/* Alerts                                                              */
/* ------------------------------------------------------------------ */
.co-alert-warning {
  background: #fffbeb;
  border: 1px solid #fde68a;
  color: #92400e;
  border-radius: 8px;
  padding: .65rem .9rem;
  font-size: .875rem;
  margin-bottom: 1rem;
}

/* ------------------------------------------------------------------ */
/* Responsive                                                          */
/* ------------------------------------------------------------------ */
@media (max-width: 900px) {
  .co-inline-form { grid-template-columns: 1fr; }
  .co-plan-grid { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .co-card { padding: 1rem 1rem; border-radius: 12px; }
  .co-title { font-size: 1.3rem; }
}
