﻿/* Extracted from site-new.css. Legacy rules remain in site-new.css until visual verification is complete. */

/* Pricing and account UI */
.pricing-plan-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }

.new-price-grid .pricing-plan { position: relative; display: grid; align-content: start; gap: 1rem; min-height: 22rem; padding: 1.25rem; border-radius: 14px; background: #fff; }

.new-price-grid .pricing-plan.is-recommended { border-color: rgba(11, 117, 255, .7); box-shadow: 0 14px 36px rgba(11, 117, 255, .12); }

.pricing-plan-head { display: flex; align-items: center; justify-content: space-between; gap: .6rem; min-height: 1.7rem; }

.pricing-plan-head h3 { margin: 0; color: var(--foreground); font-family: var(--font-headings); font-size: 1.05rem; }

.new-price-grid .pricing-badge { padding: .3rem .5rem; border-radius: 999px; background: var(--secondary); color: var(--primary); font-size: .68rem; font-weight: 800; line-height: 1; text-transform: none; }

.pricing-price { display: flex; align-items: baseline; gap: .35rem; }

.new-price-grid .pricing-price strong { color: var(--foreground); font-size: 2rem; letter-spacing: -.035em; }

.pricing-price small { color: var(--muted-foreground); font-size: .8rem; font-weight: 600; }

.new-price-grid .pricing-limit { color: var(--muted-foreground); font-size: .9rem; }

.pricing-limit b { color: var(--foreground); font-weight: 800; }

.new-price-grid .pricing-features { display: grid; gap: .65rem; margin: 0; padding: 1rem 0 0; border-top: 1px solid var(--border); list-style: none; color: var(--foreground); font-size: .85rem; line-height: 1.4; }

.new-price-grid .pricing-features li { display: grid; grid-template-columns: 1rem 1fr; gap: .4rem; }

.new-price-grid .pricing-features span { color: var(--accent); font-size: .85rem; font-weight: 900; text-transform: none; }

.pricing-action { align-self: end; margin-top: auto; }

.plan-checkout-panel { width: min(31rem, 100%); }

.plan-checkout-summary,
.plan-checkout-prices { display: grid; gap: .55rem; margin: 1rem 0; }

.plan-checkout-summary { grid-template-columns: repeat(3, minmax(0, 1fr)); }

.plan-checkout-summary div,
.plan-checkout-prices > div { display: flex; justify-content: space-between; gap: .75rem; }

.plan-checkout-summary div { flex-direction: column; padding: .7rem; border-radius: 9px; background: var(--secondary); }

.plan-checkout-summary span,
.plan-checkout-current,
.plan-checkout-prices dt { color: var(--muted-foreground); font-size: .8rem; }

.plan-checkout-summary strong,
.plan-checkout-prices dd { margin: 0; color: var(--foreground); font-size: .9rem; }

.plan-checkout-current { margin: 0 0 1rem; line-height: 1.4; }

.plan-checkout-promo { display: grid; gap: .4rem; margin: 0; }
.plan-checkout-promo label { color: var(--foreground); font-size: .85rem; font-weight: 700; }
.plan-checkout-promo-controls { display: flex; gap: .5rem; }
.plan-checkout-promo-input { position: relative; display: flex; min-width: 0; flex: 1; }
.plan-checkout-promo input { width: 100%; min-width: 0; padding: .6rem 2.25rem .6rem .7rem; border: 1px solid var(--border); border-radius: 8px; background: var(--background); color: var(--foreground); font: inherit; transition: border-color 160ms ease, box-shadow 160ms ease; }
.plan-checkout-promo .button { flex: none; }
.plan-checkout-promo-indicator { position: absolute; top: 50%; right: .72rem; display: grid; width: 1.15rem; height: 1.15rem; place-items: center; transform: translateY(-50%); border-radius: 50%; font-size: .76rem; font-weight: 900; line-height: 1; }
.plan-checkout-promo[data-promo-state="applied"] input { border-color: rgba(10, 159, 118, .65); box-shadow: 0 0 0 3px rgba(10, 159, 118, .1); }
.plan-checkout-promo[data-promo-state="applied"] .plan-checkout-promo-indicator { background: #e8f8f1; color: #087b5d; }
.plan-checkout-promo[data-promo-state="error"] input { border-color: rgba(182, 75, 75, .65); box-shadow: 0 0 0 3px rgba(182, 75, 75, .08); }
.plan-checkout-promo[data-promo-state="error"] .plan-checkout-promo-indicator { background: #fff0f0; color: var(--danger); }
.plan-checkout-promo-feedback { color: var(--danger); font-size: .76rem; line-height: 1.35; }
.plan-checkout-promo-feedback[hidden],
.plan-checkout-promo-indicator[hidden] { display: none; }

.plan-checkout-prices { padding-top: .9rem; border-top: 1px solid var(--border); }
.plan-checkout-total { padding-top: .55rem; border-top: 1px solid var(--border); font-weight: 800; }
.plan-checkout-panel > [data-checkout-confirm] { width: 100%; }

.plan-checkout-success {
  display: grid;
  justify-items: center;
  gap: .7rem;
  padding: 1.1rem .3rem .2rem;
  text-align: center;
}
.plan-checkout-success[hidden] { display: none; }
.plan-checkout-success-icon {
  display: grid;
  width: 3rem;
  height: 3rem;
  place-items: center;
  border-radius: 50%;
  background: #e8f8f1;
  color: #087b5d;
  font-size: 1.7rem;
  font-weight: 800;
}
.plan-checkout-success h3 { margin: .15rem 0 0; color: var(--foreground); }
.plan-checkout-success p { margin: 0; max-width: 25rem; line-height: 1.5; }
.plan-checkout-success .button { min-width: min(100%, 13rem); margin-top: .3rem; }
.plan-checkout-modal.is-success .auth-modal-note,
.plan-checkout-modal.is-success .plan-checkout-summary,
.plan-checkout-modal.is-success .plan-checkout-current,
.plan-checkout-modal.is-success .plan-checkout-promo,
.plan-checkout-modal.is-success .plan-checkout-prices,
.plan-checkout-modal.is-success [data-checkout-back],
.plan-checkout-modal.is-success [data-checkout-message],
.plan-checkout-modal.is-success [data-checkout-confirm] { display: none; }

@media (max-width: 420px) {
  .plan-checkout-summary { grid-template-columns: 1fr; }
  .plan-checkout-promo-controls { flex-direction: column; }
}

.legacy-plan-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.75rem;
}

.legacy-plan-card {
  display: flex;
  min-width: 0;
  flex-direction: column;
  padding: 1rem;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--background);
}

.legacy-plan-card-heading {
  display: flex;
  gap: 0.5rem;
  align-items: flex-start;
  justify-content: space-between;
}

.legacy-plan-card h3,
.legacy-plan-card p {
  margin: 0;
}

.legacy-plan-card h3 {
  color: var(--foreground);
  font-size: 1rem;
}

.legacy-plan-card-heading p {
  color: var(--muted-foreground);
  text-align: right;
  white-space: nowrap;
}

.legacy-plan-card-heading strong {
  display: block;
  color: var(--foreground);
  font-size: 1.05rem;
}

.legacy-plan-card-heading span {
  font-size: 0.75rem;
}

.legacy-plan-card ul {
  display: grid;
  gap: 0.45rem;
  margin: 0.9rem 0 1rem;
  padding: 0;
  color: var(--muted-foreground);
  font-size: 0.84rem;
  line-height: 1.35;
  list-style: none;
}

.legacy-plan-card li::before {
  margin-right: 0.4rem;
  color: var(--primary);
  content: "✓";
  font-weight: 800;
}

.legacy-plan-card .button {
  width: 100%;
  margin-top: auto;
}

.legacy-plan-compare {
  display: table;
  margin: 1rem auto 0;
  color: var(--primary);
  font-size: 0.86rem;
  font-weight: 700;
}

.quota-actions,
.usage-actions {
  display: flex;
  flex-wrap: wrap;
  gap: .55rem;
  margin-top: .75rem;
}

.usage-actions[hidden],
.quota-actions > [hidden] {
  display: none;
}

.usage-actions .button,
.quota-actions .button {
  flex: 1 1 10rem;
}

.usage-renewal {
  margin-top: 0;
  color: var(--muted-foreground);
  font-size: .8rem;
}

.pricing-note {
  margin: 1rem 0 0;
  color: var(--muted-foreground);
  font-size: .85rem;
}

.dev-billing-tools {
  margin-top: 1rem;
  padding: .8rem;
  border: 1px dashed #d19a24;
  border-radius: 10px;
  background: #fff9e8;
}

.dev-billing-tools[hidden] { display: none; }

.dev-billing-tools label { display: block; margin-bottom: .45rem; font-size: .8rem; font-weight: 700; }

.dev-billing-tools > div { display: flex; gap: .5rem; }

.dev-billing-tools select { min-width: 0; flex: 1; padding: .5rem; border: 1px solid var(--border); border-radius: 8px; background: #fff; }

.dev-billing-tools small { display: block; margin-top: .4rem; color: var(--muted-foreground); }
