/**
 * PhotoXED Billing — package cards in message sheet
 */

.px-adm-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 18px;
  border-radius: 12px;
  border: 1px solid var(--glass-border);
  background: rgba(255,255,255,0.08);
  color: var(--tx);
  font: inherit;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.px-adm-btn-primary {
  background: linear-gradient(135deg, var(--accent), var(--sky));
  border-color: transparent;
  color: #fff;
}

.px-adm-btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.px-bill-sheet {
  padding: 4px 0 8px;
}

.px-bill-reason {
  margin: 0 0 16px;
  padding: 12px 14px;
  border-radius: 12px;
  background: rgba(255, 149, 0, 0.1);
  border: 1px solid rgba(255, 149, 0, 0.25);
  color: var(--tx);
  font-size: 14px;
  line-height: 1.45;
}

.px-bill-hint {
  color: var(--tx2);
  font-size: 14px;
  margin: 0;
}

.px-pack-grid {
  display: grid;
  gap: 14px;
}

.px-pack-card {
  position: relative;
  padding: 18px 18px 16px;
  border-radius: 18px;
  background: linear-gradient(145deg, rgba(255,255,255,0.07), rgba(255,255,255,0.02));
  border: 1px solid var(--glass-border);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.22);
}

.px-pack-card.is-featured {
  border-color: rgba(167, 139, 250, 0.45);
  background: linear-gradient(145deg, rgba(167, 139, 250, 0.14), rgba(77, 150, 255, 0.06));
}

.px-pack-badge {
  position: absolute;
  top: 12px;
  right: 12px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.4px;
  text-transform: uppercase;
  color: #fff;
  background: linear-gradient(90deg, var(--accent), var(--sky));
  padding: 4px 8px;
  border-radius: 999px;
}

.px-pack-head {
  margin-bottom: 10px;
}

.px-pack-name {
  margin: 0;
  font-size: 22px;
  letter-spacing: -0.4px;
}

.px-pack-price {
  margin: 4px 0 0;
  font-size: 28px;
  font-weight: 700;
  letter-spacing: -0.6px;
}

.px-pack-per {
  margin: 2px 0 0;
  font-size: 12px;
  color: var(--tx2);
}

.px-pack-desc {
  margin: 0 0 12px;
  font-size: 13px;
  color: var(--tx2);
  line-height: 1.4;
}

.px-pack-features {
  margin: 0 0 16px;
  padding: 0;
  list-style: none;
  font-size: 13px;
  color: var(--tx);
}

.px-pack-features li {
  position: relative;
  padding-left: 18px;
  margin-bottom: 6px;
}

.px-pack-features li::before {
  content: '✓';
  position: absolute;
  left: 0;
  color: var(--emerald);
  font-weight: 700;
}

.px-pack-pay {
  width: 100%;
  margin: 0;
}

.px-bill-status {
  margin: 14px 0 0;
  font-size: 13px;
  color: var(--tx2);
  text-align: center;
}

.px-bill-success {
  text-align: center;
}

.px-bill-success .px-adm-btn {
  width: 100%;
  margin-top: 16px;
}

.px-tier-banner.paywall {
  border-color: rgba(255, 149, 0, 0.35);
  background: rgba(255, 149, 0, 0.08);
}

.px-upload-paywall {
  text-align: center;
  padding: 20px 8px;
}

.px-upload-paywall .px-adm-btn {
  width: 100%;
  margin-top: 12px;
}

.px-upload-paywall-link {
  display: inline-block;
  margin-top: 10px;
  font-size: 13px;
  color: var(--tx2);
  background: none;
  border: none;
  cursor: pointer;
  text-decoration: underline;
}

/* Buy credits picker */
.px-buy-credits {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.px-buy-hero {
  text-align: center;
  padding: 16px 12px;
  border-radius: 16px;
  background: linear-gradient(145deg, rgba(167, 139, 250, 0.12), rgba(77, 150, 255, 0.06));
  border: 1px solid rgba(167, 139, 250, 0.25);
}

.px-buy-hero-amt {
  margin: 0;
  font-size: 36px;
  font-weight: 700;
  letter-spacing: -0.8px;
  line-height: 1.1;
}

.px-buy-hero-cr {
  margin: 6px 0 0;
  font-size: 17px;
  font-weight: 600;
  color: var(--accent);
}

.px-buy-hero-sub {
  margin: 8px 0 0;
  font-size: 12px;
  color: var(--tx2);
}

.px-buy-presets {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.px-buy-preset {
  padding: 11px 8px;
  border-radius: 12px;
  border: 1px solid var(--glass-border);
  background: rgba(255,255,255,0.04);
  color: var(--tx);
  font: inherit;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
}

.px-buy-preset.is-active {
  border-color: var(--accent);
  background: rgba(167, 139, 250, 0.15);
  color: #fff;
}

.px-buy-stepper {
  display: flex;
  align-items: center;
  gap: 10px;
}

.px-buy-step {
  width: 44px;
  height: 44px;
  flex-shrink: 0;
  border-radius: 12px;
  border: 1px solid var(--glass-border);
  background: rgba(255,255,255,0.06);
  color: var(--tx);
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
}

.px-buy-input-wrap {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 0 14px;
  height: 44px;
  border-radius: 12px;
  border: 1px solid var(--glass-border);
  background: rgba(255,255,255,0.04);
}

.px-buy-input-prefix {
  font-size: 18px;
  font-weight: 600;
  color: var(--tx2);
}

.px-buy-input {
  flex: 1;
  min-width: 0;
  border: none;
  background: transparent;
  color: var(--tx);
  font: inherit;
  font-size: 20px;
  font-weight: 700;
  text-align: center;
  -moz-appearance: textfield;
}

.px-buy-input::-webkit-outer-spin-button,
.px-buy-input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.px-buy-now {
  width: 100%;
  margin: 0;
}

/* Purchase history cards (dashboard) */
.px-dash-actions {
  margin-top: 4px;
}

.px-dash-buy {
  width: 100%;
}

.px-dash-section-title {
  margin: 20px 0 10px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--tx3);
}

.px-dash-history-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.px-dash-history-empty {
  margin: 0;
  font-size: 13px;
  color: var(--tx2);
  line-height: 1.45;
}

.px-purchase-card {
  padding: 14px;
  border-radius: 14px;
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--glass-border);
}

.px-purchase-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 12px;
}

.px-purchase-date {
  font-size: 13px;
  color: var(--tx2);
}

.px-purchase-paid {
  font-size: 16px;
  font-weight: 700;
  color: var(--tx);
}

.px-purchase-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.px-purchase-stat {
  text-align: center;
  padding: 10px 6px;
  border-radius: 10px;
  background: rgba(0,0,0,0.18);
}

.px-purchase-stat-val {
  display: block;
  font-size: 18px;
  font-weight: 700;
  line-height: 1.2;
}

.px-purchase-stat-lbl {
  display: block;
  margin-top: 4px;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--tx3);
}

.px-purchase-used {
  color: #ff9f0a;
}

.px-purchase-left {
  color: var(--emerald);
}

.px-purchase-bar {
  margin-top: 10px;
  height: 4px;
  border-radius: 999px;
  background: rgba(255,255,255,0.08);
  overflow: hidden;
}

.px-purchase-bar span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #ff9f0a, var(--accent));
  transition: width 0.3s var(--ease);
}
