/* ============================================================================
   css/plans-compare.css — side-by-side plans comparison (M537)
   Loaded after css/pricing.css. Reuses shared.css tokens with fallbacks.
   ============================================================================ */

.plans-compare {
  /* pricing.html is dark in every theme (pricing.css hard-codes its palette),
     so the table must not pick up a light theme's --text. */
  --pc-accent: #f5a623;
  --pc-surface: #161b22;
  --pc-surface-2: #21262d;
  --pc-border: #30363d;
  --pc-text: #e6edf3;
  --pc-muted: #9ba3ad;
  --pc-pro: #8b5cf6;                      /* same violet as .pricing-card.featured */
  --pc-pro-soft: rgba(139, 92, 246, 0.12);
  --pc-first-col: 15.5rem;
  --pc-col: 9.6rem;

  max-width: 1240px;
  margin: 0 auto 2.75rem;
  padding: 0 1rem;
  color: var(--pc-text);
  font-family: var(--font-body, 'DM Sans', sans-serif);
}

.pc-head { text-align: center; margin-bottom: 1.25rem; }
.pc-head h2 {
  font-family: var(--font-display, 'Playfair Display', serif);
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  margin: 0 0 0.5rem;
  color: #fff;
}
.pc-sub { margin: 0 auto; max-width: 640px; color: #cbd5e1; line-height: 1.55; font-size: 0.98rem; }
.pc-hint { display: none; margin: 0.6rem 0 0; font-size: 0.8rem; color: var(--pc-muted); }

.pc-scroll {
  overflow-x: auto;
  max-width: 100%;
  border: 1px solid var(--pc-border);
  border-radius: 20px;
  background: rgba(15, 23, 42, 0.9);
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.4);
  -webkit-overflow-scrolling: touch;
}
.pc-scroll:focus-visible { outline: 2px solid var(--pc-accent); outline-offset: 2px; }

.pc-table {
  width: 100%;
  min-width: 44rem;
  border-collapse: separate;
  border-spacing: 0;
  table-layout: fixed;
  font-size: 0.88rem;
}
.pc-table col:first-child { width: var(--pc-first-col); }

.pc-table th, .pc-table td {
  padding: 0.8rem 0.7rem;
  border-bottom: 1px solid rgba(100, 116, 139, 0.22);
  vertical-align: middle;
  text-align: center;
  line-height: 1.35;
}
.pc-table tbody tr:last-child > * { border-bottom: 0; }

/* Feature labels: first column, sticky so it stays while scrolling sideways */
.pc-table tbody th[scope="row"], .pc-table thead .pc-corner {
  position: sticky;
  left: 0;
  z-index: 2;
  width: var(--pc-first-col);
  text-align: left;
  font-weight: 600;
  color: var(--pc-text);
  background: #111827;
  border-right: 1px solid rgba(100, 116, 139, 0.22);
}
.pc-table th small { display: block; margin-top: 0.15rem; font-weight: 500; font-size: 0.74rem; color: var(--pc-muted); letter-spacing: 0.02em; }
.pc-link { color: inherit; text-decoration: underline; text-decoration-color: var(--pc-accent); text-underline-offset: 3px; }
.pc-link:hover { color: var(--pc-accent); }
.pc-price-inline { display: inline !important; margin-left: 0.2rem; color: var(--pc-accent); font-weight: 700; font-size: 0.8rem; }

/* Column headers */
.pc-table thead th { padding-top: 1.35rem; padding-bottom: 1rem; vertical-align: bottom; border-bottom: 1px solid var(--pc-border); }
.pc-table thead .pc-corner { font-size: 0.76rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--pc-muted); font-weight: 700; }
.pc-tag { display: block; min-height: 1.2em; margin-bottom: 0.35rem; font-size: 0.75rem; font-weight: 800; text-transform: uppercase; letter-spacing: 0.06em; color: var(--pc-muted); }
.pc-name { display: block; font-family: var(--font-display, 'Playfair Display', serif); font-size: 1.08rem; font-weight: 700; color: #fff; margin-bottom: 0.4rem; }
.pc-price.pricing-price-box { display: block; margin: 0; }
.pc-price .price-val { font-size: 1.55rem; font-weight: 800; color: #fff; }
.pc-price .price-period { display: block; margin-top: 0.1rem; font-size: 0.74rem; color: var(--pc-muted); }

/* Group rows */
.pc-group th {
  position: static !important;
  text-align: left;
  padding: 0.55rem 0.9rem;
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  color: var(--pc-accent);
  background: rgba(245, 166, 35, 0.07);
  border-right: 0;
}

.pc-group th span { position: sticky; left: 0.9rem; display: inline-block; }

/* Cells */
.pc-yes {
  display: inline-flex; align-items: center; justify-content: center;
  width: 1.5rem; height: 1.5rem; border-radius: 50%;
  background: rgba(245, 166, 35, 0.16); color: var(--pc-accent);
  font-weight: 800; font-size: 0.9rem;
}
.pc-no { color: #6b7686; font-size: 1.1rem; }
.pc-val { color: var(--pc-text); font-size: 0.84rem; }
.pc-val strong { color: #fff; font-size: 1rem; }

/* Highlighted (Pro) column */
.pc-table .pc-pro { background: var(--pc-pro-soft); border-left: 2px solid var(--pc-pro); border-right: 2px solid var(--pc-pro); }
.pc-table thead .pc-head-pro { border-top: 2px solid var(--pc-pro); border-radius: 0; background: linear-gradient(180deg, rgba(139, 92, 246, 0.28), var(--pc-pro-soft)); }
.pc-table thead .pc-head-pro .pc-tag { color: #fbbf24; }
.pc-table .pc-cta-row .pc-pro { border-bottom: 2px solid var(--pc-pro); }

/* CTA row */
.pc-cta-row th[scope="row"] { color: var(--pc-muted); font-size: 0.76rem; text-transform: uppercase; letter-spacing: 0.08em; }
.pc-cta-row td { padding: 1rem 0.55rem; }
.pc-cta.pricing-cta-btn { box-sizing: border-box; min-height: 2.9rem; padding: 0.5rem 0.4rem; font-size: 0.8rem; line-height: 1.2; text-align: center; text-decoration: none; }

.pc-note { margin: 0.9rem auto 0; max-width: 780px; text-align: center; font-size: 0.8rem; color: var(--pc-muted); line-height: 1.5; }

@media (max-width: 760px) {
  .plans-compare { --pc-first-col: 7.3rem; --pc-col: 8rem; padding: 0 0.75rem; }
  .pc-hint { display: block; }
  .pc-table { min-width: 36rem; font-size: 0.8rem; }
  .pc-table tbody th[scope="row"] { font-size: 0.76rem; padding-left: 0.6rem; padding-right: 0.5rem; }
  .pc-table th, .pc-table td { padding: 0.65rem 0.5rem; }
  .pc-table tbody th[scope="row"], .pc-table thead .pc-corner { box-shadow: 4px 0 8px -4px rgba(0, 0, 0, 0.6); }
}
