/* ── Upsell Tier Picker ─────────────────────────────── */

.upsell-section {
  /* --org is the selection/state accent; amber stays on the payment button only */
  --accent: var(--org);
  --accent-light: rgba(26, 108, 255, 0.06);
  --accent-mid: rgba(26, 108, 255, 0.3);
  --border: var(--line);
  --bg-muted: var(--snow);
  --text-primary: var(--ink);
  --text-dim: var(--slate);
}

.upsell-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 6px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--ink);
}

.upsell-header h2 {
  margin: 0;
  padding-bottom: 0;
  border-bottom: none;
}

.upsell-powered {
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 9px;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}

.upsell-lead {
  font-size: 14px;
  color: var(--text-dim);
  margin: 0 0 20px;
  line-height: 1.5;
}

/* ── Tier cards ── */

.tier-stack {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.tier {
  position: relative;
  display: grid;
  grid-template-columns: 24px 1fr auto;
  align-items: start;
  gap: 14px;
  padding: 18px 20px;
  border: 1px solid var(--border);
  border-bottom: none;
  background: #fff;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
  user-select: none;
}

.tier:first-child { border-radius: 0; }
.tier:last-child  { border-radius: 0; border-bottom: 1px solid var(--border); }

.tier:hover { background: var(--bg-muted); }

.tier.is-active {
  background: var(--accent-light);
  border-color: var(--accent-mid);
  z-index: 1;
}

.tier.is-active + .tier { border-top-color: var(--accent-mid); }

/* Promoted tier */
.tier.is-promoted {
  border: 2px solid var(--accent);
  border-bottom: 2px solid var(--accent);
  border-radius: 0;
  margin: 6px 0;
  box-shadow: none;
}

.tier.is-promoted + .tier { border-top: 1px solid var(--border); }

.tier.is-promoted.is-active {
  box-shadow: none;
}

/* Radio dot */
.tier input[type="radio"] { display: none; }

.tier-dot {
  width: 18px;
  height: 18px;
  border: 2px solid #c1c9d4;
  border-radius: 50%;
  margin-top: 2px;
  position: relative;
  transition: border-color 0.15s;
  flex-shrink: 0;
}

.tier-dot::after {
  content: "";
  position: absolute;
  inset: 3px;
  border-radius: 50%;
  background: var(--accent);
  transform: scale(0);
  transition: transform 0.12s ease;
}

.tier.is-active .tier-dot {
  border-color: var(--accent);
}

.tier.is-active .tier-dot::after {
  transform: scale(1);
}

/* Content */
.tier-content { min-width: 0; }

.tier-title-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 3px;
}

.tier-name {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
  line-height: 1.3;
}

.tier-rec {
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
  background: var(--accent-light);
  padding: 2px 7px;
  border-radius: 2px;
  line-height: 1.6;
}

.tier.is-promoted .tier-rec {
  background: var(--accent);
  color: #fff;
}

.tier-desc {
  font-size: 13px;
  color: var(--text-dim);
  line-height: 1.45;
  margin: 0;
}

/* Includes line */
.tier-includes {
  margin-top: 8px;
  display: flex;
  flex-wrap: wrap;
  gap: 4px 12px;
  font-size: 12px;
  color: var(--text-dim);
}

.tier-includes span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.tier-includes span::before {
  content: "";
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: #c1c9d4;
  flex-shrink: 0;
}

.tier.is-active .tier-includes span::before {
  background: var(--accent);
  opacity: 0.5;
}

/* Price column */
.tier-price {
  text-align: right;
  white-space: nowrap;
  padding-top: 1px;
}

.tier-price-val {
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
}

/* ── Sticky sidebar ── */

.sidebar {
  position: sticky;
  top: 24px;
  align-self: start;
}

/* ── Selected tier label in sidebar ── */

.selected-tier-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  background: var(--wash);
  border: 1px solid var(--line);
  border-radius: 0;
  margin-bottom: 16px;
  font-size: 13px;
  color: var(--ink);
  transition: background 0.2s;
}

.selected-tier-label .stl-name {
  font-weight: 600;
}

.selected-tier-label .stl-change {
  font-size: 12px;
  color: var(--org);
  cursor: pointer;
  text-decoration: none;
}

.selected-tier-label .stl-change:hover {
  text-decoration: underline;
}

/* ── Delivery estimate ── */

/* Status pattern: mono caps + green dot, no coloured fill */
.delivery-estimate {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 0;
  background: none;
  border: none;
  margin-bottom: 16px;
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--green);
  font-weight: 500;
}

.delivery-estimate svg {
  flex-shrink: 0;
}

/* ── Tax ID optional hint ── */

.field-hint {
  font-size: 11px;
  color: var(--text-secondary, #64748b);
  margin-top: 4px;
  font-weight: 400;
}

.stripe-checkout-container {
  min-height: 400px;
}

.stripe-modal {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.stripe-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(10, 15, 28, 0.45);
  backdrop-filter: blur(8px);
}

.stripe-modal-content {
  position: relative;
  display: flex;
  flex-direction: column;
  background: #fff;
  border-radius: 4px;
  box-shadow: 0 8px 40px rgba(0, 0, 0, 0.15);
  max-width: 560px;
  width: 100%;
  min-height: 420px;
  max-height: 90vh;
  padding: 1rem;
}

.stripe-modal-scroll-area {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.stripe-modal-scroll-area::-webkit-scrollbar {
  display: none;
}

.stripe-modal-scroll-btn {
  flex-shrink: 0;
  align-self: flex-end;
  margin-top: -44px !important;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: #fff;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--slate);
  z-index: 10000;
}

.stripe-modal-scroll-btn:hover {
  border-color: var(--ink);
  background: #fff;
  color: var(--ink);
}

.stripe-modal-scroll-btn svg {
  width: 22px;
  height: 22px;
}

.stripe-modal-close {
  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
  background: none;
  border: none;
  font-size: 1.5rem;
  line-height: 1;
  color: var(--slate);
  cursor: pointer;
  padding: 0.25rem;
}

.stripe-modal-close:hover {
  color: var(--ink);
}
