/* Non-admin plans purchase + sticky cart / payment dock */

.pp-mode-purchase .pp-purchase-hide {
  display: none !important;
}

.pp-mode-purchase .pp-header {
  border-bottom: 1px solid #1e293b;
}

.pp-mode-purchase .pp-back-link {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  margin: 0 0 0.45rem;
  padding: 0.35rem 0.75rem;
  border-radius: 0.45rem;
  border: 1px solid #0f766e;
  background: #0d9488;
  color: #ecfdf5;
  text-decoration: none;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.pp-mode-purchase .pp-back-link:hover {
  background: #14b8a6;
  color: #fff;
  text-decoration: none;
}

.pp-purchase-root {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  background:
    radial-gradient(1200px 480px at 10% -10%, rgba(13, 148, 136, 0.18), transparent 55%),
    linear-gradient(180deg, #0b1220 0%, #0f172a 40%, #0b1220 100%);
}

.pp-purchase-layout {
  flex: 1;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 22rem;
  gap: 0;
  min-height: 0;
  align-items: stretch;
}

.pp-purchase-shop {
  overflow: auto;
  padding: 1.25rem 1.35rem 7rem;
}

.pp-buy-hero {
  max-width: 46rem;
  margin-bottom: 1.35rem;
}

.pp-buy-kicker {
  margin: 0 0 0.35rem;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #5eead4;
}

.pp-buy-hero h2 {
  margin: 0 0 0.4rem;
  font-size: clamp(1.45rem, 2.4vw, 1.9rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  color: #f8fafc;
}

.pp-buy-hero p {
  margin: 0;
  color: #94a3b8;
  font-size: 0.95rem;
  line-height: 1.5;
  max-width: 40rem;
}

.pp-buy-plans {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(15.5rem, 1fr));
  gap: 0.9rem;
  margin-bottom: 2rem;
}

.pp-buy-plan {
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
  padding: 1rem 1rem 1.05rem;
  border: 1px solid #334155;
  border-radius: 0.65rem;
  background: rgba(15, 23, 42, 0.72);
  min-height: 100%;
}

.pp-buy-plan.is-selected {
  border-color: #14b8a6;
  box-shadow: inset 0 0 0 1px rgba(20, 184, 166, 0.35);
  background: rgba(13, 148, 136, 0.12);
}

.pp-buy-plan header {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.pp-buy-plan h3 {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 800;
  color: #f1f5f9;
}

.pp-buy-price {
  font-size: 1.15rem;
  font-weight: 800;
  color: #5eead4;
  font-variant-numeric: tabular-nums;
}

.pp-buy-desc {
  margin: 0;
  font-size: 0.82rem;
  line-height: 1.45;
  color: #94a3b8;
}

.pp-buy-plan ul {
  margin: 0;
  padding: 0 0 0 1rem;
  color: #cbd5e1;
  font-size: 0.8rem;
  line-height: 1.45;
  flex: 1;
}

.pp-buy-plan li + li {
  margin-top: 0.2rem;
}

.pp-buy-select {
  margin-top: auto;
  width: 100%;
  border: 1px solid #0f766e;
  background: #0d9488;
  color: #ecfdf5;
  font: inherit;
  font-weight: 800;
  font-size: 0.85rem;
  border-radius: 0.45rem;
  padding: 0.55rem 0.75rem;
  cursor: pointer;
}

.pp-buy-plan.is-selected .pp-buy-select {
  background: #115e59;
  border-color: #134e4a;
}

.pp-buy-select:hover {
  background: #14b8a6;
}

.pp-buy-addons-head {
  margin-bottom: 0.75rem;
}

.pp-buy-addons-head h2 {
  margin: 0 0 0.25rem;
  font-size: 1.15rem;
  color: #f8fafc;
}

.pp-buy-addons-head p {
  margin: 0;
  color: #94a3b8;
  font-size: 0.85rem;
}

.pp-buy-addon-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr));
  gap: 0.75rem;
}

.pp-buy-addon {
  display: flex;
  gap: 0.65rem;
  align-items: flex-start;
  padding: 0.85rem 0.9rem;
  border: 1px solid #334155;
  border-radius: 0.55rem;
  background: rgba(15, 23, 42, 0.65);
  cursor: pointer;
}

.pp-buy-addon.is-on {
  border-color: #14b8a6;
  background: rgba(13, 148, 136, 0.1);
}

.pp-buy-addon input {
  margin-top: 0.2rem;
  accent-color: #14b8a6;
}

.pp-buy-addon .body {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  min-width: 0;
}

.pp-buy-addon .name {
  font-weight: 800;
  color: #e2e8f0;
  font-size: 0.9rem;
}

.pp-buy-addon .meta {
  font-size: 0.78rem;
  font-weight: 700;
  color: #5eead4;
}

.pp-buy-addon .desc {
  font-size: 0.78rem;
  color: #94a3b8;
  line-height: 1.4;
}

.pp-buy-empty {
  margin: 0;
  color: #64748b;
  font-size: 0.88rem;
}

.pp-buy-spacer {
  height: 1rem;
}

/* Sticky cart / payment plugin — always visible while browsing layers */
.pp-purchase-cart-host {
  position: sticky;
  top: 0;
  align-self: start;
  height: 100vh;
  max-height: 100vh;
  border-left: 1px solid #1e293b;
  background: #0f172a;
}

.pp-cart {
  height: 100%;
  display: flex;
  flex-direction: column;
}

.pp-cart-inner {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  height: 100%;
  padding: 1rem 1rem 1.15rem;
  overflow: auto;
}

.pp-cart-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.5rem;
}

.pp-cart-head h2 {
  margin: 0;
  font-size: 1rem;
  font-weight: 800;
  color: #5eead4;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.pp-cart-tag {
  font-size: 0.68rem;
  color: #64748b;
  font-weight: 600;
}

.pp-cart-lines {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  flex: 1;
  min-height: 4rem;
}

.pp-cart-empty {
  margin: 0;
  color: #64748b;
  font-size: 0.85rem;
}

.pp-cart-line {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  padding-bottom: 0.55rem;
  border-bottom: 1px solid #1e293b;
}

.pp-cart-line .name {
  font-size: 0.88rem;
  font-weight: 700;
  color: #e2e8f0;
}

.pp-cart-line .meta {
  font-size: 0.7rem;
  color: #64748b;
}

.pp-cart-line .amt {
  font-size: 0.82rem;
  font-weight: 700;
  color: #cbd5e1;
  white-space: nowrap;
}

.pp-cart-totals {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  padding-top: 0.25rem;
}

.pp-cart-totals .row {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  font-size: 0.85rem;
  color: #94a3b8;
}

.pp-cart-totals strong {
  color: #f8fafc;
  font-variant-numeric: tabular-nums;
}

.pp-cart-pay {
  margin-top: auto;
  padding-top: 0.75rem;
  border-top: 1px solid #1e293b;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}

.pp-cart-pay-note {
  margin: 0;
  font-size: 0.72rem;
  line-height: 1.4;
  color: #64748b;
}

.pp-cart-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  padding: 0.7rem 0.85rem;
  border-radius: 0.45rem;
  border: 1px solid #0f766e;
  background: #0d9488;
  color: #ecfdf5;
  font: inherit;
  font-weight: 800;
  font-size: 0.9rem;
  text-decoration: none;
  cursor: pointer;
}

.pp-cart-cta:hover:not(:disabled) {
  background: #14b8a6;
}

.pp-cart-cta:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.pp-cart-cta.secondary {
  background: #1e293b;
  border-color: #475569;
  color: #e2e8f0;
}

.pp-cart-pay-status {
  margin: 0;
  font-size: 0.75rem;
  line-height: 1.4;
  color: #fde68a;
}

@media (max-width: 960px) {
  .pp-purchase-layout {
    grid-template-columns: 1fr;
  }

  .pp-purchase-shop {
    padding-bottom: 12rem;
  }

  .pp-purchase-cart-host {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    top: auto;
    height: auto;
    max-height: min(48vh, 22rem);
    border-left: 0;
    border-top: 1px solid #334155;
    z-index: 40;
    box-shadow: 0 -12px 30px rgba(0, 0, 0, 0.35);
  }

  .pp-cart-inner {
    padding: 0.75rem 1rem calc(0.75rem + env(safe-area-inset-bottom, 0px));
  }

  .pp-cart-lines {
    max-height: 6.5rem;
    overflow: auto;
    flex: 0 1 auto;
  }
}
