/* Pricing page — Project Nearby */
/* Reuses .civic-* vocabulary from civic.css; adds only pricing-specific classes. */

/* Mirror of civic.css :root tokens so this sheet is self-contained if linked alone. */
:root {
  --sky: #EBF3F5;
  --asphalt: #4A4A4A;
  --teal: #1A6B7E;
  --sand: #D4A574;
  --forest: #2D5F3F;
  --sand-accent: #e09b3d;
  --white: #ffffff;
  --radius: 8px;
}

/* Section wrapper — mirrors .learn-section in learn.css. */
.pricing-section {
  max-width: 820px;
  margin: 48px auto;
  padding: 0 24px;
}

/* ── COMPARISON TABLE ── */
.pricing-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  background: var(--white);
  border: 1px solid rgba(74,74,74,0.08);
  border-radius: var(--radius);
  box-shadow: 0 2px 8px rgba(74,74,74,0.06);
  overflow: hidden;
  table-layout: fixed;
  margin-bottom: 20px;
}

/* Column widths: feature label + 3 tier columns. */
.pricing-table col,
.pricing-table thead th:nth-child(1),
.pricing-table tbody th.pricing-feature-label {
  width: 26%;
}
.pricing-table thead th:not(:first-child),
.pricing-table tbody td:not(:first-child) {
  width: calc(74% / 3);
}

.pricing-tier-th,
.pricing-table-feature-row td,
.pricing-table-feature-row th.pricing-feature-label {
  padding: 18px 18px;
  vertical-align: top;
  text-align: left;
  font-size: 13.5px;
  color: var(--asphalt);
  line-height: 1.55;
  background: var(--white);
}

.pricing-table-feature-row th.pricing-feature-label {
  font-weight: 600;
  color: var(--asphalt);
  background: rgba(235,243,245,0.45);
}

.pricing-table-feature-row + .pricing-table-feature-row td,
.pricing-table-feature-row + .pricing-table-feature-row th.pricing-feature-label {
  border-top: 1px solid rgba(74,74,74,0.08);
}

.pricing-table-feature-row td {
  text-align: center;
}

.pricing-table-feature-row td:not(:last-child) {
  border-right: 1px solid rgba(74,74,74,0.06);
}

.pricing-table-feature-row th.pricing-feature-label:not(:last-child),
.pricing-table-feature-row td:not(:last-child) {
  border-right: 1px solid rgba(74,74,74,0.06);
}

/* ── TIER HEADER ROW ── */
.pricing-table-tier-row {
  background: rgba(235,243,245,0.55);
}

.pricing-table-tier-row th {
  padding: 24px 18px 22px;
  text-align: center;
  vertical-align: top;
  border-bottom: 1px solid rgba(74,74,74,0.08);
}

.pricing-tier-th-feature {
  background: transparent !important;
}

.pricing-table-tier-row th:not(:last-child) {
  border-right: 1px solid rgba(74,74,74,0.06);
}

.pricing-table-tier-row th.pricing-tier-th-featured {
  background: rgba(26,107,126,0.06);
}

.pricing-tier-flag {
  display: inline-block;
  font-size: 10.5px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--white);
  background: var(--teal);
  border-radius: 100px;
  padding: 3px 10px;
  margin-bottom: 10px;
  font-weight: 700;
}

.pricing-tier-name {
  font-family: 'DM Serif Display', serif;
  font-size: 24px;
  color: var(--asphalt);
  margin-bottom: 6px;
}

.pricing-tier-price {
  font-size: 22px;
  font-weight: 700;
  color: var(--teal);
  margin-bottom: 4px;
}

.pricing-tier-period {
  font-size: 14px;
  font-weight: 600;
  color: var(--asphalt);
  opacity: 0.7;
}

.pricing-tier-cadence {
  font-size: 11.5px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: rgba(74,74,74,0.55);
  font-weight: 600;
  margin-bottom: 14px;
}

.pricing-featured-cell {
  background: rgba(26,107,126,0.03);
}

/* ── CHECK / DASH ── */
.pricing-check {
  display: inline-block;
  color: var(--forest);
  font-size: 18px;
  font-weight: 700;
  line-height: 1;
}

.pricing-dash {
  display: inline-block;
  color: var(--asphalt);
  opacity: 0.45;
  font-size: 18px;
  font-weight: 700;
  line-height: 1;
}

.pricing-feature-note {
  display: block;
  margin-top: 8px;
  font-size: 12px;
  color: #666;
  line-height: 1.55;
  text-align: center;
}

.pricing-table-feature-row th.pricing-feature-label .pricing-feature-note {
  text-align: left;
}

/* ── CTA BUTTONS (tier-row + bottom row) ── */
.pricing-cta {
  display: inline-block;
  text-decoration: none;
  font-size: 13px;
  font-weight: 600;
  padding: 11px 18px;
  border-radius: 6px;
  text-align: center;
  transition: opacity 0.15s;
  margin-top: 4px;
}

.pricing-cta:hover { opacity: 0.85; }

.pricing-cta-primary {
  background: var(--teal);
  color: var(--white);
}

.pricing-cta-secondary {
  background: var(--white);
  color: var(--teal);
  border: 1px solid var(--teal);
}

/* ── PER-TIER CTA ROW (bottom of section) — mirrors .learn-cta-row ── */
.pricing-cta-row {
  display: flex;
  gap: 12px;
  margin: 16px 0 32px;
  flex-wrap: wrap;
}

.pricing-cta-row .pricing-cta {
  flex: 1;
  min-width: 180px;
}

/* ── RESPONSIVE ── */
@media (max-width: 720px) {
  /* Stack the comparison as a per-tier feature card list on narrow screens. */
  .pricing-section { padding: 0 16px; margin-top: 32px; }

  .pricing-table,
  .pricing-table thead,
  .pricing-table tbody,
  .pricing-table tr,
  .pricing-table th,
  .pricing-table td {
    display: block;
    width: 100%;
  }

  .pricing-table thead { display: none; }

  .pricing-table tbody tr.pricing-table-feature-row {
    margin-bottom: 16px;
    border: 1px solid rgba(74,74,74,0.08);
    border-radius: var(--radius);
    padding: 14px 16px;
    background: var(--white);
    box-shadow: 0 2px 8px rgba(74,74,74,0.06);
  }

  .pricing-table tbody tr.pricing-table-feature-row th.pricing-feature-label {
    background: transparent;
    border: none;
    padding: 0 0 10px;
    font-size: 14.5px;
    border-bottom: 1px solid rgba(74,74,74,0.08);
  }

  .pricing-table tbody tr.pricing-table-feature-row td {
    border: none !important;
    border-top: 1px dashed rgba(74,74,74,0.08) !important;
    padding: 10px 0;
    text-align: left;
  }

  .pricing-table tbody tr.pricing-table-feature-row td:first-child::before {
    content: 'Free · ';
    font-weight: 600;
    color: var(--teal);
  }

  .pricing-table tbody tr.pricing-table-feature-row td:nth-child(2)::before {
    content: 'Pro · ';
    font-weight: 600;
    color: var(--teal);
  }

  .pricing-table tbody tr.pricing-table-feature-row td:nth-child(3)::before {
    content: 'Team · ';
    font-weight: 600;
    color: var(--teal);
  }

  .pricing-table tbody tr.pricing-table-feature-row td {
    text-align: left;
  }

  .pricing-feature-note {
    text-align: left !important;
  }

  .pricing-cta-row { flex-direction: column; }
  .pricing-cta-row .pricing-cta { width: 100%; }
}
