/* TierBook Sponsorship Builder — public-facing configurator.
 * Scoped under .ccr-sb-* to avoid colliding with .ccr-sp-* (sponsorship-packages.php)
 * and the admin .crm-* design system (docs/DESIGN_SYSTEM.md is admin-only).
 * No CDN assets, no flexbox/gap assumptions beyond what evergreen browsers support.
 */

.ccr-sb {
  --ccr-sb-primary: #1d4ed8;
  --ccr-sb-primary-dark: #1e3a8a;
  --ccr-sb-primary-tint: #eff4ff;
  --ccr-sb-text: #1f2937;
  --ccr-sb-muted: #6b7280;
  --ccr-sb-surface: #ffffff;
  --ccr-sb-surface-alt: #f9fafb;
  --ccr-sb-border: #e5e7eb;
  --ccr-sb-radius: 12px;
  --ccr-sb-shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.04);
  --ccr-sb-shadow-md: 0 12px 28px -16px rgba(15, 23, 42, 0.18);
  --ccr-sb-shadow-lg: 0 24px 48px -24px rgba(15, 23, 42, 0.22);
  --ccr-sb-success: #065f46;
  --ccr-sb-success-bg: #ecfdf5;
  --ccr-sb-error: #7f1d1d;
  --ccr-sb-error-bg: #fef2f2;

  color: var(--ccr-sb-text);
  font-size: 15px;
  line-height: 1.5;
}

.ccr-sb,
.ccr-sb *,
.ccr-sb *::before,
.ccr-sb *::after {
  box-sizing: border-box;
}

/* An author `display` rule on any element (e.g. .ccr-sb-btn's `display: inline-flex`)
 * beats the UA stylesheet's `[hidden] { display: none }` regardless of specificity, since
 * author styles always win over UA defaults for equal-importance declarations. Guard every
 * hidden element in the builder so JS-driven .hidden toggling always actually hides it. */
.ccr-sb [hidden] {
  display: none !important;
}

/* ---------- Boxed shell — break out of a narrow theme content column and present the
 * builder as one self-contained card, regardless of how much width the embedding page
 * actually gives it. The doubled selector beats the block theme's zero-specificity
 * `:where()` layout-width rule without needing !important. */
.ccr-sb.ccr-sb {
  max-width: 1180px;
}

.ccr-sb {
  width: 100%;
  margin: 0 auto;
  padding: clamp(24px, 4vw, 40px) clamp(20px, 4vw, 40px) clamp(32px, 5vw, 48px);
  background: var(--ccr-sb-surface);
  border: 1px solid var(--ccr-sb-border);
  border-radius: 18px;
  box-shadow: var(--ccr-sb-shadow-sm), var(--ccr-sb-shadow-lg);
}

/* ---------- Async states ---------- */

.ccr-sb-state {
  padding: 32px 16px;
  text-align: center;
  color: var(--ccr-sb-muted);
}

.ccr-sb-state--error {
  color: var(--ccr-sb-error);
  background: var(--ccr-sb-error-bg);
  border: 1px solid #fecaca;
  border-radius: var(--ccr-sb-radius);
}

.ccr-sb-state--error .ccr-sb-retry-btn {
  margin-top: 12px;
}

.ccr-sb-spinner {
  display: inline-block;
  width: 28px;
  height: 28px;
  margin-bottom: 12px;
  border: 3px solid var(--ccr-sb-border);
  border-top-color: var(--ccr-sb-primary);
  border-radius: 50%;
  animation: ccr-sb-spin 0.8s linear infinite;
}

@media (prefers-reduced-motion: reduce) {
  .ccr-sb-spinner {
    animation-duration: 2s;
  }
}

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

/* ---------- Header ---------- */

.ccr-sb-header {
  position: relative;
  margin: 0 0 28px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--ccr-sb-border);
}

.ccr-sb-start-over-btn {
  position: absolute;
  top: 0;
  right: 0;
  border: none;
  background: none;
  padding: 4px 0;
  font-size: 13px;
  font-weight: 600;
  color: var(--ccr-sb-muted);
  text-decoration: underline;
  cursor: pointer;
}

.ccr-sb-start-over-btn:hover {
  color: var(--ccr-sb-primary);
}

.ccr-sb-title {
  margin: 0 0 6px;
  font-size: clamp(22px, 2.6vw, 28px);
  font-weight: 700;
  letter-spacing: -0.01em;
}

.ccr-sb-description {
  margin: 0;
  max-width: 640px;
  color: var(--ccr-sb-muted);
}

.ccr-sb-description:empty {
  display: none;
}

/* ---------- Wizard progress indicator ---------- */

.ccr-sb-progress {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 4px;
  margin: 18px 0 0;
  padding: 0;
  list-style: none;
}

.ccr-sb-progress-step {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px 5px 8px;
  border-radius: 999px;
  background: var(--ccr-sb-surface-alt);
  color: var(--ccr-sb-muted);
  font-size: 13px;
  font-weight: 600;
}

.ccr-sb-progress-step-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--ccr-sb-border);
  color: var(--ccr-sb-text);
  font-size: 11px;
}

.ccr-sb-progress-step--current {
  background: var(--ccr-sb-primary-tint);
  color: var(--ccr-sb-primary-dark);
}

.ccr-sb-progress-step--current .ccr-sb-progress-step-num {
  background: var(--ccr-sb-primary);
  color: #fff;
}

.ccr-sb-progress-step--done {
  cursor: pointer;
}

.ccr-sb-progress-step--done .ccr-sb-progress-step-num {
  background: var(--ccr-sb-success);
  color: #fff;
}

.ccr-sb-progress-step--done:hover {
  background: var(--ccr-sb-border);
}

/* ---------- Wizard step navigation ---------- */

.ccr-sb-stepnav {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-top: 8px;
  padding-top: 24px;
  border-top: 1px solid var(--ccr-sb-border);
}

.ccr-sb-stepnav .ccr-sb-btn {
  width: auto;
  min-width: 140px;
  padding-left: 24px;
  padding-right: 24px;
}

.ccr-sb-stepnav .ccr-sb-btn:only-child {
  margin-left: auto;
}

/* ---------- Busy state — a request (add/remove package, event toggle, save, etc.) is in
 * flight. Freezes the whole app visibly so a click during that window can't land on the wrong
 * target and get silently dropped by the JS `if (this.busy) return;` guards — previously the
 * only feedback was whatever the clicked button itself showed, so a second click elsewhere
 * (e.g. Add on another package, or Continue) simply did nothing with no way to tell why. ---------- */
.ccr-sb-busy .ccr-sb-app {
  cursor: progress;
  pointer-events: none;
  opacity: 0.6;
  transition: opacity 0.15s ease;
}

/* ---------- Layout: mobile-first single column, summary as a bottom sheet ---------- */

.ccr-sb-layout {
  display: block;
}

.ccr-sb-main {
  display: block;
}

.ccr-sb-section {
  margin-bottom: 32px;
}

.ccr-sb-section-title {
  margin: 0 0 14px;
  font-size: 18px;
  font-weight: 700;
}

/* ---------- Event selection ---------- */

.ccr-sb-event-list {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
}

.ccr-sb-event-option {
  display: block;
  border: 1px solid var(--ccr-sb-border);
  border-radius: var(--ccr-sb-radius);
  background: var(--ccr-sb-surface);
  padding: 12px 14px;
  cursor: pointer;
  transition:
    border-color 0.15s,
    background-color 0.15s;
}

.ccr-sb-event-option:focus-within {
  outline: none;
  border-color: var(--ccr-sb-primary);
  box-shadow: 0 0 0 3px rgba(29, 78, 216, 0.15);
}

.ccr-sb-event-option:has(input:checked) {
  border-color: var(--ccr-sb-primary);
  background: var(--ccr-sb-primary-tint);
}

.ccr-sb-event-option input[type="checkbox"] {
  margin-right: 8px;
}

.ccr-sb-event-option--companion {
  border-style: dashed;
}

.ccr-sb-section-hint {
  margin: -4px 0 10px;
  color: var(--ccr-sb-muted);
  font-size: 13px;
}

/* ---------- Objectives + recommendation ---------- */

.ccr-sb-objective-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 14px;
}

.ccr-sb-objective-option {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 1px solid var(--ccr-sb-border);
  border-radius: 999px;
  background: var(--ccr-sb-surface);
  padding: 7px 16px;
  font-size: 14px;
  cursor: pointer;
  transition:
    border-color 0.15s,
    background-color 0.15s;
}

.ccr-sb-objective-option:focus-within {
  outline: none;
  border-color: var(--ccr-sb-primary);
  box-shadow: 0 0 0 3px rgba(29, 78, 216, 0.15);
}

.ccr-sb-objective-option:has(input:checked) {
  border-color: var(--ccr-sb-primary);
  background: var(--ccr-sb-primary-tint);
  color: var(--ccr-sb-primary-dark);
  font-weight: 600;
}

.ccr-sb-btn--recommend {
  width: auto;
  padding-left: 20px;
  padding-right: 20px;
}

.ccr-sb-recommendation-alternatives {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 16px;
  margin-top: 14px;
}

.ccr-sb-recommendation-card--best {
  border-color: var(--ccr-sb-primary);
  box-shadow: 0 0 0 1px var(--ccr-sb-primary);
}

.ccr-sb-recommendation-rationale {
  margin: 0 0 12px;
  color: var(--ccr-sb-muted);
  font-size: 13px;
  font-style: italic;
}

/* ---------- Companion events (Task 11) ---------- */

.ccr-sb-companion-event {
  margin-bottom: 20px;
  padding: 14px;
  border: 1px dashed var(--ccr-sb-border);
  border-radius: var(--ccr-sb-radius);
  background: var(--ccr-sb-surface-alt);
}

.ccr-sb-companion-event:last-child {
  margin-bottom: 0;
}

.ccr-sb-companion-event-title {
  margin: 0 0 10px;
  font-size: 15px;
  font-weight: 700;
}

.ccr-sb-companion-package-grid {
  margin: 0;
}

/* ---------- Package grid (progressive disclosure: one row of cards, not a giant SKU table) ---------- */

.ccr-sb-package-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 16px;
}

/* When more than one Event is selected, eventGroupedMarkup() nests a `.ccr-sb-package-grid` per
 * Event inside the section's own top-level one — switch the outer container to a plain vertical
 * stack so it doesn't also try to lay those group blocks out as grid cells. */
.ccr-sb-package-grid:has(.ccr-sb-event-package-group) {
  display: block;
}

.ccr-sb-event-package-group + .ccr-sb-event-package-group {
  margin-top: 28px;
}

.ccr-sb-package-group-title {
  margin: 0 0 12px;
  font-size: 15px;
  font-weight: 700;
  color: var(--ccr-sb-muted);
}

.ccr-sb-package-card {
  position: relative;
  display: flex;
  flex-direction: column;
  border: 1px solid var(--ccr-sb-border);
  border-radius: var(--ccr-sb-radius);
  background: var(--ccr-sb-surface);
  padding: 20px;
  transition:
    box-shadow 0.15s,
    border-color 0.15s;
}

.ccr-sb-package-card:hover {
  border-color: #cbd5e1;
  box-shadow: var(--ccr-sb-shadow-md);
}

@media (prefers-reduced-motion: no-preference) {
  .ccr-sb-package-card {
    transition-property: box-shadow, border-color, transform;
  }

  .ccr-sb-package-card:hover {
    transform: translateY(-2px);
  }
}

.ccr-sb-package-card--selected {
  border-color: var(--ccr-sb-primary);
  box-shadow:
    0 0 0 2px var(--ccr-sb-primary),
    var(--ccr-sb-shadow-md);
}

.ccr-sb-package-card--sold-out {
  opacity: 0.65;
}

.ccr-sb-package-badge {
  display: inline-block;
  align-self: flex-start;
  margin-bottom: 8px;
  padding: 3px 10px;
  border-radius: 999px;
  background: var(--ccr-sb-primary-tint);
  color: var(--ccr-sb-primary-dark);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.ccr-sb-package-name {
  margin: 0 0 4px;
  font-size: 17px;
  font-weight: 700;
}

.ccr-sb-package-price {
  margin: 0 0 10px;
  color: var(--ccr-sb-primary-dark);
  font-size: 18px;
  font-weight: 700;
}

.ccr-sb-package-desc {
  margin: 0 0 12px;
  color: var(--ccr-sb-muted);
  font-size: 14px;
}

.ccr-sb-package-availability {
  margin: 0 0 10px;
  font-size: 13px;
  color: var(--ccr-sb-muted);
}

.ccr-sb-package-availability--sold-out {
  color: var(--ccr-sb-error);
  font-weight: 600;
}

.ccr-sb-package-availability--limited {
  color: #92400e;
  font-weight: 600;
}

.ccr-sb-package-actions {
  margin-top: auto;
}

/* ---------- Buttons ---------- */

.ccr-sb-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  padding: 11px 16px;
  border: 1px solid var(--ccr-sb-primary);
  border-radius: 8px;
  background: var(--ccr-sb-primary);
  color: #fff;
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  box-shadow: var(--ccr-sb-shadow-sm);
  transition:
    background-color 0.15s,
    border-color 0.15s,
    box-shadow 0.15s;
}

.ccr-sb-btn:hover:not(:disabled) {
  background: var(--ccr-sb-primary-dark);
  border-color: var(--ccr-sb-primary-dark);
  box-shadow: var(--ccr-sb-shadow-md);
}

.ccr-sb-btn:focus-visible {
  outline: 3px solid rgba(29, 78, 216, 0.4);
  outline-offset: 2px;
}

.ccr-sb-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.ccr-sb-btn--added {
  background: var(--ccr-sb-success);
  border-color: var(--ccr-sb-success);
}

.ccr-sb-btn--remove {
  background: var(--ccr-sb-surface);
  color: var(--ccr-sb-error);
  border-color: #fecaca;
}

.ccr-sb-btn--remove:hover:not(:disabled) {
  background: var(--ccr-sb-error-bg);
}

/* ---------- Summary (static card at the end of the flow on mobile — a `position: sticky`
 * bottom sheet risks stacking on top of whatever section happens to be short enough to sit
 * behind it; sticky sidebar on desktop instead, where it sits beside content, not over it) */

.ccr-sb-summary {
  margin-top: 32px;
  border: 1px solid var(--ccr-sb-border);
  border-radius: var(--ccr-sb-radius);
  background: var(--ccr-sb-surface);
  box-shadow: var(--ccr-sb-shadow-sm), var(--ccr-sb-shadow-md);
}

.ccr-sb-summary-inner {
  padding: 20px;
}

.ccr-sb-summary-title {
  margin: 0 0 10px;
  font-size: 15px;
  font-weight: 700;
}

.ccr-sb-summary-items {
  list-style: none;
  margin: 0 0 10px;
  padding: 0;
  max-height: 180px;
  overflow-y: auto;
}

.ccr-sb-summary-item {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  padding: 6px 0;
  border-bottom: 1px solid var(--ccr-sb-border);
  font-size: 14px;
}

.ccr-sb-summary-item:last-child {
  border-bottom: none;
}

.ccr-sb-summary-item-label {
  flex: 1;
}

.ccr-sb-summary-item-remove {
  background: none;
  border: none;
  padding: 0;
  color: var(--ccr-sb-error);
  font-size: 13px;
  cursor: pointer;
  text-decoration: underline;
}

.ccr-sb-summary-item-remove:focus-visible {
  outline: 2px solid var(--ccr-sb-error);
  outline-offset: 2px;
}

.ccr-sb-summary-empty {
  margin: 0 0 10px;
  color: var(--ccr-sb-muted);
  font-size: 14px;
}

.ccr-sb-summary-total {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding-top: 10px;
  border-top: 1px solid var(--ccr-sb-border);
  font-weight: 700;
}

.ccr-sb-summary-total-value {
  font-size: 18px;
  color: var(--ccr-sb-primary-dark);
}

.ccr-sb-summary-live {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

/* ---------- Your details (step 7) / Save & Share / next-step actions (step 8) ---------- */

.ccr-sb-details-form {
  max-width: 440px;
}

.ccr-sb-required {
  color: var(--ccr-sb-error);
}

.ccr-sb-btn--secondary {
  background: var(--ccr-sb-surface);
  color: var(--ccr-sb-primary-dark);
  border-color: var(--ccr-sb-border);
}

.ccr-sb-btn--secondary:hover:not(:disabled) {
  background: var(--ccr-sb-surface-alt);
}

.ccr-sb-save-field {
  margin-bottom: 14px;
}

.ccr-sb-save-field label {
  display: block;
  margin-bottom: 4px;
  font-size: 13px;
  font-weight: 600;
}

.ccr-sb-save-field input {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--ccr-sb-border);
  border-radius: 8px;
  font-size: 14px;
}

.ccr-sb-save-field input:focus {
  outline: none;
  border-color: var(--ccr-sb-primary);
  box-shadow: 0 0 0 3px rgba(29, 78, 216, 0.15);
}

.ccr-sb-request-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-width: 360px;
}

.ccr-sb-share-link-wrap {
  max-width: 440px;
  margin-top: 28px;
  padding-top: 20px;
  border-top: 1px solid var(--ccr-sb-border);
}

.ccr-sb-share-link-row {
  display: flex;
  gap: 8px;
}

.ccr-sb-share-url {
  flex: 1;
  min-width: 0;
  padding: 8px 10px;
  border: 1px solid var(--ccr-sb-border);
  border-radius: 6px;
  font-size: 13px;
  background: var(--ccr-sb-surface-alt);
}

.ccr-sb-share-link-row .ccr-sb-btn {
  width: auto;
  padding-left: 14px;
  padding-right: 14px;
}

.ccr-sb-revoke-link-btn {
  margin-top: 8px;
  background: none;
  border: none;
  padding: 0;
  color: var(--ccr-sb-error);
  font-size: 13px;
  cursor: pointer;
  text-decoration: underline;
}

/* ---------- Desktop layout ---------- */

@media (min-width: 900px) {
  .ccr-sb-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 340px;
    gap: 40px;
    align-items: start;
  }

  .ccr-sb-summary {
    position: sticky;
    top: 24px;
    bottom: auto;
    margin-top: 0;
    max-height: calc(100vh - 48px);
    overflow-y: auto;
  }
}

/* ==========================================================================
 * Showcase layer — event cards, tier cards, included-option choices, and the
 * display options (columns / corners / no-summary). Everything reads the same
 * --ccr-sb-* tokens, so the "accent" option recolors all of it at once.
 * ========================================================================== */

.ccr-sb--square {
  --ccr-sb-radius: 4px;
}

.ccr-sb--square.ccr-sb {
  border-radius: 6px;
}

/* ---------- Event cards ---------- */

.ccr-sb-event-list {
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 16px;
}

.ccr-sb-event-card {
  padding: 0;
  overflow: hidden;
}

.ccr-sb-event-card .ccr-sb-event-check {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.ccr-sb-event-card {
  position: relative;
}

.ccr-sb-event-inner {
  display: flex;
  flex-direction: column;
  height: 100%;
}

.ccr-sb-event-media {
  display: block;
  aspect-ratio: 16 / 10;
  background: var(--ccr-sb-primary-tint);
  overflow: hidden;
}

.ccr-sb-event-media img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.ccr-sb-event-media--empty {
  background: linear-gradient(
    135deg,
    var(--ccr-sb-primary-tint),
    var(--ccr-sb-surface-alt)
  );
}

.ccr-sb-event-body {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 12px 44px 14px 14px;
}

.ccr-sb-event-card--compact .ccr-sb-event-body {
  padding-top: 14px;
}

.ccr-sb-event-date {
  color: var(--ccr-sb-muted);
  font-size: 13px;
}

.ccr-sb-event-name {
  font-size: 16px;
  font-weight: 700;
  line-height: 1.3;
}

.ccr-sb-event-where {
  color: var(--ccr-sb-muted);
  font-size: 13px;
}

.ccr-sb-event-tick {
  position: absolute;
  right: 12px;
  bottom: 14px;
  width: 22px;
  height: 22px;
  border: 2px solid var(--ccr-sb-border);
  border-radius: 50%;
  background: var(--ccr-sb-surface);
  transition:
    background-color 0.15s,
    border-color 0.15s;
}

.ccr-sb-event-card:has(input:checked) {
  box-shadow: 0 0 0 2px var(--ccr-sb-primary);
}

.ccr-sb-event-card:has(input:checked) .ccr-sb-event-tick {
  border-color: var(--ccr-sb-primary);
  background: var(--ccr-sb-primary)
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='none' stroke='%23fff' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4.5 10.5l3.5 3.5 7.5-8'/%3E%3C/svg%3E")
    center / 14px no-repeat;
}

/* ---------- Tier cards ---------- */

.ccr-sb-package-card {
  padding: 22px 20px 20px;
}

.ccr-sb-package-card--featured {
  border-color: var(--ccr-sb-primary);
  box-shadow:
    0 0 0 1px var(--ccr-sb-primary),
    var(--ccr-sb-shadow-md);
  padding-top: 32px;
}

.ccr-sb-package-ribbon {
  position: absolute;
  top: 0;
  right: 16px;
  padding: 4px 12px;
  border-radius: 0 0 var(--ccr-sb-radius) var(--ccr-sb-radius);
  background: var(--ccr-sb-primary);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.ccr-sb-package-price {
  font-size: 26px;
  letter-spacing: -0.01em;
  color: var(--ccr-sb-text);
}

.ccr-sb-package-highlights {
  margin: 0 0 14px;
  padding: 12px 0 0;
  border-top: 1px solid var(--ccr-sb-border);
  list-style: none;
}

.ccr-sb-package-highlights li {
  position: relative;
  margin: 0 0 7px;
  padding-left: 22px;
  font-size: 14px;
}

.ccr-sb-package-highlights li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.3em;
  width: 14px;
  height: 14px;
  background: var(--ccr-sb-primary);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='none' stroke='%23000' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4.5 10.5l3.5 3.5 7.5-8'/%3E%3C/svg%3E")
    center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='none' stroke='%23000' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4.5 10.5l3.5 3.5 7.5-8'/%3E%3C/svg%3E")
    center / contain no-repeat;
}

.ccr-sb-package-actions .ccr-sb-btn {
  width: 100%;
  justify-content: center;
}

/* ---------- Included "choose N" options ---------- */

.ccr-sb-choice-teaser {
  margin: 0 0 14px;
  padding: 8px 10px;
  border-radius: var(--ccr-sb-radius);
  background: var(--ccr-sb-primary-tint);
  color: var(--ccr-sb-primary-dark);
  font-size: 13px;
  font-weight: 600;
}

.ccr-sb-choice-group {
  margin: 0 0 14px;
  padding: 12px;
  border: 1px solid var(--ccr-sb-border);
  border-radius: var(--ccr-sb-radius);
  background: var(--ccr-sb-surface-alt);
}

.ccr-sb-choice-group {
  min-width: 0;
}

.ccr-sb-choice-group legend {
  float: left;
  width: 100%;
  margin: 0 0 10px;
  padding: 0;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.35;
}

.ccr-sb-choice-count {
  display: block;
  margin: 2px 0 0;
}

.ccr-sb-choice-count {
  color: var(--ccr-sb-primary-dark);
  font-weight: 600;
}

.ccr-sb-choice-options {
  clear: both;
  display: grid;
  gap: 8px;
}

.ccr-sb-choice {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 9px 10px;
  border: 1px solid var(--ccr-sb-border);
  border-radius: var(--ccr-sb-radius);
  background: var(--ccr-sb-surface);
  color: var(--ccr-sb-text);
  font: inherit;
  font-size: 14px;
  text-align: left;
  cursor: pointer;
  transition:
    border-color 0.15s,
    background-color 0.15s;
}

.ccr-sb-choice:hover:not(:disabled) {
  border-color: var(--ccr-sb-primary);
}

.ccr-sb-choice:focus-visible {
  outline: 2px solid var(--ccr-sb-primary);
  outline-offset: 2px;
}

.ccr-sb-choice:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.ccr-sb-choice.is-chosen {
  border-color: var(--ccr-sb-primary);
  background: var(--ccr-sb-primary-tint);
  font-weight: 600;
}

.ccr-sb-choice-check {
  flex: none;
  width: 18px;
  height: 18px;
  border: 2px solid var(--ccr-sb-border);
  border-radius: 50%;
  background: var(--ccr-sb-surface);
}

.ccr-sb-choice.is-chosen .ccr-sb-choice-check {
  border-color: var(--ccr-sb-primary);
  background: var(--ccr-sb-primary)
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='none' stroke='%23fff' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4.5 10.5l3.5 3.5 7.5-8'/%3E%3C/svg%3E")
    center / 12px no-repeat;
}

/* ---------- Display options ---------- */

@media (min-width: 640px) {
  .ccr-sb--cols-2 .ccr-sb-package-grid,
  .ccr-sb--cols-3 .ccr-sb-package-grid,
  .ccr-sb--cols-4 .ccr-sb-package-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 900px) {
  .ccr-sb--cols-3 .ccr-sb-package-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .ccr-sb--cols-4 .ccr-sb-package-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .ccr-sb--no-summary .ccr-sb-layout {
    display: block;
  }
}

.ccr-sb--no-summary .ccr-sb-summary {
  display: none;
}

/* Embedded in an iframe: the host page provides the frame, so drop the outer card chrome. */
.ccr-sb--embedded.ccr-sb {
  max-width: none;
  border: 0;
  border-radius: 0;
  box-shadow: none;
}
