/* ==========================================================================
   Comparison Page Shared Styles
   Used by all landing/compare/*.html pages (except index.html)
   ========================================================================== */

:root {
  --success: hsl(142, 71%, 45%);
}

/* Section Header (shared across all sections) */
.section-header { text-align: center; margin-bottom: 2rem; }
.section-header h2 { font-size: 1.5rem; font-weight: 700; }
.section-header p { font-size: 1rem; color: var(--muted-foreground); margin-top: 0.5rem; max-width: 42rem; margin-left: auto; margin-right: auto; }

/* ==========================================================================
   Pricing Section
   ========================================================================== */

.pricing-section { padding: 0 0 4rem; }
@media (min-width: 768px) { .pricing-section { padding: 0 0 5rem; } }

/* Pricing Cards (Benchling, Genemod, Quartzy) */
.pricing-cards { display: grid; gap: 1.5rem; max-width: 52rem; margin: 0 auto; }
@media (min-width: 768px) { .pricing-cards { grid-template-columns: 1fr 1fr; } }
.pricing-card { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 2rem; }
.pricing-card.highlighted { border-color: var(--primary); box-shadow: 0 0 0 1px var(--primary); position: relative; }
.pricing-card.highlighted::before { content: "Recommended"; position: absolute; top: -0.75rem; left: 50%; transform: translateX(-50%); background: var(--primary); color: var(--primary-foreground); font-size: 0.75rem; font-weight: 600; padding: 0.25rem 0.75rem; border-radius: 1rem; white-space: nowrap; }
.pricing-card-header { margin-bottom: 1.5rem; }
.pricing-card-name { font-size: 1.25rem; font-weight: 600; margin-bottom: 0.25rem; }
.pricing-card-desc { font-size: 0.875rem; color: var(--muted-foreground); }
.pricing-card-price { margin-bottom: 1.5rem; }
.pricing-card-price .amount { font-size: 2.5rem; font-weight: 700; }
.pricing-card-price .period { font-size: 0.875rem; color: var(--muted-foreground); }
.pricing-card-price .note { display: block; font-size: 0.8125rem; color: var(--muted-foreground); margin-top: 0.25rem; }
.pricing-card-features { list-style: none; display: flex; flex-direction: column; gap: 0.5rem; }
.pricing-card-features li { display: flex; align-items: flex-start; gap: 0.5rem; font-size: 0.875rem; }
.pricing-card-features li svg { flex-shrink: 0; width: 1rem; height: 1rem; margin-top: 0.2rem; }
.pricing-card-features li svg.check { color: var(--success); }
.pricing-card-features li svg.dash { color: var(--muted-foreground); }

/* Pricing Table */
.pricing-table-wrapper { max-width: 52rem; margin: 0 auto; overflow-x: auto; -webkit-overflow-scrolling: touch; }
.pricing-table { width: 100%; border-collapse: collapse; background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; font-size: 0.9375rem; min-width: 600px; }
.pricing-table th, .pricing-table td { padding: 0.75rem 1rem; text-align: left; border-bottom: 1px solid var(--border); }
.pricing-table thead th { font-weight: 600; background: var(--card); }
.pricing-table .brand-header { background: hsl(258, 89%, 97%); color: var(--primary); font-weight: 700; text-align: center; }
.pricing-table .tier-header { font-size: 0.8125rem; text-transform: uppercase; letter-spacing: 0.05em; color: var(--muted-foreground); font-weight: 600; }
.pricing-table .highlight { background: rgba(139, 92, 246, 0.04); }
.pricing-table .price-row td { font-size: 1.25rem; font-weight: 700; }
.pricing-table .price-row .highlight { color: var(--primary); }
.pricing-table .footnote { font-size: 0.8125rem; color: var(--muted-foreground); text-align: center; padding: 1rem; }
.pricing-table td[colspan] { text-align: center; }
.pricing-table td[colspan]:first-child { text-align: left; }

/* Extended pricing table styles (for pages with multi-brand headers) */
.pricing-table td:first-child,
.pricing-table th:first-child { text-align: left; font-weight: 500; min-width: 120px; background-color: rgba(210, 210, 213, 0.15); }
.pricing-table .brand-header.labsistant { background-color: rgba(139, 92, 246, 0.06); color: var(--primary); }
.pricing-table .brand-header.competitor { background-color: rgba(210, 210, 213, 0.15); color: var(--foreground); }
.pricing-table .tier-header.highlight { background-color: rgba(139, 92, 246, 0.04); color: var(--primary); }
.pricing-table td.highlight { background-color: rgba(139, 92, 246, 0.02); }
.pricing-table .price-amount { font-weight: 700; font-size: 0.875rem; }
.pricing-table .pricing-footnote { font-size: 0.75rem; color: var(--muted-foreground); text-align: center; margin-top: 0.75rem; }

/* Compact variant for wide tables (7+ data columns, e.g. Quartzy) */
.pricing-table.compact { table-layout: fixed; font-size: 0.8125rem; min-width: 900px; }
.pricing-table.compact th, .pricing-table.compact td { padding: 0.625rem 0.5rem; word-wrap: break-word; overflow-wrap: break-word; }
.pricing-table.compact td:first-child, .pricing-table.compact th:first-child { min-width: 0; width: 15%; }
.pricing-table.compact .tier-header { font-size: 0.6875rem; letter-spacing: 0.03em; }
.pricing-table.compact .price-row td { font-size: 1rem; }

/* ==========================================================================
   Features Section
   ========================================================================== */

.features-section { padding: 4rem 0; }
@media (min-width: 768px) { .features-section { padding: 5rem 0; } }
.features-table-wrapper { max-width: 52rem; margin: 0 auto; overflow-x: auto; -webkit-overflow-scrolling: touch; }
.features-table { width: 100%; border-collapse: collapse; background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; font-size: 0.9375rem; min-width: 500px; }
.features-table th, .features-table td { padding: 0.625rem 1rem; text-align: left; border-bottom: 1px solid var(--border); }
.features-table thead th { font-weight: 600; background: var(--card); position: sticky; top: 3.5rem; z-index: 10; }
.features-table thead th:first-child { width: 40%; }
.features-table thead th.highlight { color: var(--primary); }
.features-table td:first-child { font-weight: 500; }
.features-table .group-header td { font-weight: 700; font-size: 0.8125rem; text-transform: uppercase; letter-spacing: 0.05em; background: hsl(240, 4%, 92%); color: var(--foreground); }
.features-table .check { color: var(--success); }
.features-table .dash { color: var(--muted); }
.features-table .partial { font-size: 0.8125rem; color: var(--muted-foreground); }

/* ==========================================================================
   When to Choose Section
   ========================================================================== */

.choose-section { padding: 4rem 0; background-color: rgba(210, 210, 213, 0.3); }
@media (min-width: 768px) { .choose-section { padding: 5rem 0; } }
.choose-grid { display: grid; gap: 1.5rem; max-width: 52rem; margin: 0 auto; }
@media (min-width: 640px) { .choose-grid { grid-template-columns: repeat(2, 1fr); } }
.choose-card { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 2rem; }
.choose-card h3 { font-size: 1.125rem; font-weight: 700; margin-bottom: 1rem; }
.choose-card ul { list-style: none; display: flex; flex-direction: column; gap: 0.75rem; }
.choose-card li { display: flex; align-items: flex-start; gap: 0.5rem; font-size: 0.875rem; color: var(--muted-foreground); }
.choose-card li svg { flex-shrink: 0; width: 1rem; height: 1rem; margin-top: 0.2rem; color: var(--primary); }

/* ==========================================================================
   FAQ Section
   ========================================================================== */

.faq-section { padding: 4rem 0; }
@media (min-width: 768px) { .faq-section { padding: 5rem 0; } }
.faq-grid { max-width: 52rem; margin: 0 auto; display: flex; flex-direction: column; gap: 0.75rem; }
.faq-item { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.faq-item summary { padding: 1rem 1.25rem; font-weight: 600; font-size: 0.9375rem; cursor: pointer; list-style: none; display: flex; align-items: center; justify-content: space-between; }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: "+"; font-size: 1.25rem; color: var(--muted-foreground); }
.faq-item[open] summary::after { content: "\2212"; }
.faq-answer { padding: 0 1.25rem 1rem; font-size: 0.875rem; color: var(--muted-foreground); line-height: 1.6; }

/* ==========================================================================
   Cross-links Section
   ========================================================================== */

.cross-links { padding: 3rem 0; background-color: rgba(210, 210, 213, 0.3); }
.cross-links-grid { display: grid; gap: 1rem; max-width: 52rem; margin: 0 auto; }
@media (min-width: 640px) { .cross-links-grid { grid-template-columns: repeat(3, 1fr); } }
.cross-link-card { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.25rem; text-decoration: none; color: var(--foreground); transition: border-color 0.2s; }
.cross-link-card:hover { border-color: var(--primary); }
.cross-link-card h3 { font-size: 0.9375rem; font-weight: 600; margin-bottom: 0.25rem; }
.cross-link-card p { font-size: 0.8125rem; color: var(--muted-foreground); }

/* ==========================================================================
   Disclaimer Section
   ========================================================================== */

.disclaimer-section { padding: 2rem 0; border-top: 1px solid var(--border); }
.disclaimer-section p { font-size: 0.75rem; color: var(--muted-foreground); line-height: 1.6; max-width: 52rem; margin: 0 auto; }

/* ==========================================================================
   Mobile: column hiding handled by compare-mobile.js
   ========================================================================== */

@media (max-width: 767px) {
  .pricing-table { min-width: 0; }
  .pricing-table.compact { min-width: 0; table-layout: auto; }
  .pricing-table.compact td:first-child,
  .pricing-table.compact th:first-child { width: auto; }
  .features-table { min-width: 0; }
  .pricing-table td:first-child,
  .pricing-table th:first-child { min-width: 0; }
  .pricing-table .tier-header { font-size: 0.6875rem; }
  .pricing-table td, .pricing-table th { padding: 0.5rem 0.5rem; font-size: 0.8125rem; }
  .features-table td, .features-table th { padding: 0.5rem 0.5rem; font-size: 0.8125rem; }
  .features-table thead th { position: static; }
}
