/* Pricing page (templates/pricing.html). Figma: "pricing – desktop" 89:971 / "pricing – mWeb" 89:1389.
   Built from the tokens in peeranha-tokens.css; loaded by pricing.html only. */

/* Wider than the reading pages: same 1296px content width as the landing */
.page--wide { max-width: calc(var(--container-max) + 2 * var(--gutter)); gap: var(--space-20); }
.pricing-page__intro { max-width: none; }
.pricing-page__actions { display: flex; }
.pricing-page .button--xl { font-size: var(--font-size-md); }

/* ---------- Fee table ---------- */
.fee-table { display: flex; flex-direction: column; }
.fee-table__hint { display: none; }
.fee-table__scroll { overflow-x: auto; overscroll-behavior-x: contain; }

.fee-table__grid {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  table-layout: fixed;
}
.fee-table__grid th,
.fee-table__grid td {
  padding: var(--space-4);
  border-bottom: 1px solid var(--color-border);
  background: var(--color-bg);
  color: var(--color-text);
  font-size: var(--font-size-md);
  font-weight: var(--font-weight-regular);
  line-height: var(--line-height-body);
  text-align: left;
  vertical-align: top;
}
/* Label column: 296px (Figma) */
.fee-table__label-col { width: 18.5rem; }

/* No line above a group band (the band itself separates) */
.fee-table__grid tr:has(+ .fee-table__group) > * { border-bottom: 0; }

/* Header row */
.fee-table__grid thead th {
  position: relative;
  z-index: 2;
  padding-top: 0;
  padding-bottom: var(--space-6);
  border-bottom: 0;
  /* Paints a white band above the header so the gap under the nav bar stays clean */
  box-shadow: 0 calc(-1 * var(--space-4)) 0 var(--color-bg);
}
.fee-table__grid.is-head-stuck thead th { box-shadow: 0 calc(-1 * var(--space-4)) 0 var(--color-bg), inset 0 -1px 0 var(--color-border); }
/* Desktop: nothing scrolls sideways, so the header row is plain CSS sticky */
@media (min-width: 768px) {
  .fee-table__scroll { overflow: visible; }
  .fee-table__grid--types thead th { position: sticky; top: var(--fee-head-top, 6.75rem); }
}
.fee-table__corner { color: var(--color-text-tertiary) !important; font-weight: var(--font-weight-semibold) !important; }
.fee-table__type { display: block; font-size: var(--font-size-xl); font-weight: var(--font-weight-semibold); line-height: 1.35; }
.fee-table__type-desc { display: block; margin-top: var(--space-1); color: var(--color-text-tertiary); font-size: var(--font-size-sm); }

/* Group bands: "Reviewer fees", "Journal editor fees"... */
.fee-table__group > th,
.fee-table__group > td {
  padding-top: var(--space-3);
  padding-bottom: var(--space-3);
  border-bottom: 0;
  background: var(--color-bg-subtle);
}
.fee-table__group > th { font-size: var(--font-size-lg); font-weight: var(--font-weight-semibold); }

/* Cells */
.fee-table__note { display: block; margin-top: var(--space-1); color: var(--color-text-tertiary); font-size: var(--font-size-sm); }
.fee-table__price { display: block; font-size: var(--font-size-2xl); font-weight: var(--font-weight-semibold); line-height: 1.3; }
.fee-table__price--accent { color: var(--brand-deep-indigo); }
.fee-table__unit { display: block; margin-top: var(--space-1); color: var(--color-text-tertiary); }
.fee-table__none { color: var(--color-text-tertiary); }

.fee-table__more { display: flex; margin-top: var(--space-10); }

/* ---------- Mobile (Figma mWeb) ---------- */
@media (max-width: 767px) {
  .page--wide { gap: var(--space-6); padding-top: var(--space-10); }
  .pricing-page__actions .button { width: 100%; }
  .fee-table__hint { display: block; margin-bottom: var(--space-6); color: var(--color-text-tertiary); font-size: var(--font-size-xs); }

  .fee-table__grid th,
  .fee-table__grid td { padding: var(--space-3); font-size: var(--font-size-sm); }
  /* 120px label column, fixed while the rest scrolls */
  .fee-table__grid th:first-child {
    position: sticky;
    left: 0;
    z-index: 1;
    padding-left: 0;
    border-right: 1px solid var(--color-border);
  }
  .fee-table__label-col { width: 7.5rem; }
  .fee-table__grid thead th:first-child { z-index: 3; }
  .fee-table__group > th:first-child { padding-left: var(--space-3); }
  /* Four 168px type columns */
  .fee-table__grid--types { width: calc(7.5rem + 4 * 10.5rem); }

  .fee-table__grid thead th { padding-top: var(--space-3); padding-bottom: var(--space-3); border-bottom: 1px solid var(--color-border); }
  .fee-table__corner { font-size: var(--font-size-xs) !important; }
  .fee-table__type { font-size: var(--font-size-md); line-height: var(--line-height-body); }
  .fee-table__type-desc { font-size: var(--font-size-xs); }
  .fee-table__group > th { font-size: var(--font-size-sm); }
  .fee-table__price { font-size: var(--font-size-xl); line-height: 1.35; }
  .fee-table__unit, .fee-table__note { font-size: var(--font-size-xs); }
  .fee-table__more { margin-top: var(--space-8); }
  .fee-table__more .button { width: 100%; }
}

