/* Pro builds only: served as /pro.css (src/pro/integration.mjs) and linked from every page by Layout.astro when PRO_LIVE. Kept out of global.css so builds without PUBLIC_PRO are unchanged. Rules here must not change pages that exist without Pro (terms, privacy, guides): scope them to Pro-only markup. */
.price-card {
  display: grid;
  align-content: start;
  gap: 12px;
}

.price-card h2 {
  margin: 0;
  font-size: 1.3rem;
}

.price-card .price-note,
.pro-small {
  margin: 0;
  color: var(--muted);
  font-size: 0.92rem;
}

.price-card ul {
  margin: 0;
  padding-left: 1.2em;
}

.price-card li + li {
  margin-top: 6px;
}

.price-card .button-primary,
.price-card .button-secondary {
  justify-self: start;
}

.pro-msg {
  margin: 0;
  font-weight: 700;
}

.pro-msg[data-state="error"] {
  color: var(--clay);
}

.pro-msg[data-state="success"] {
  color: var(--green-deep);
}

.pro-panel {
  display: grid;
  gap: 10px;
  border: 1px solid #b8dcc6;
  border-radius: var(--radius-field);
  background: var(--mint);
  padding: 16px;
}

.pro-panel[hidden],
.pro-msg[hidden] {
  display: none;
}

.pro-panel p {
  margin: 0;
}

.pro-panel a {
  color: var(--green-deep);
  font-weight: 800;
}

.pro-restore-form {
  display: grid;
  gap: 10px;
  max-width: 560px;
}

.pro-restore-form label {
  font-weight: 800;
}

.pro-restore-form .waitlist-row input[type="email"] {
  flex: 1 1 220px;
  width: auto;
}

.pro-billing a,
.pro-small a {
  color: var(--green-deep);
  font-weight: 800;
}

/* global .price-card strong is the big price figure; keep the status line at body size */
.price-card .pro-panel strong {
  font-size: 1rem;
  line-height: 1.4;
  letter-spacing: normal;
}

/* the [hidden] attribute must win over the button / form display rules */
[data-pro-buy][hidden],
[data-pro-actions][hidden],
[data-pro-help][hidden],
[data-pro-logout][hidden],
[data-pro-recover][hidden] {
  display: none;
}

/* Header: the Pricing link (Pro builds) makes four items; let them wrap on narrow screens. */
.top-nav {
  flex-wrap: wrap;
  row-gap: 6px;
}

/* Plan line under the homepage start button (src/scripts/plan.js) */
.plan-line {
  margin: 0;
  text-align: center;
  color: var(--muted);
  font-size: 0.92rem;
}

.plan-line[hidden] {
  display: none;
}

.plan-line a {
  color: var(--green-deep);
  font-weight: 800;
  white-space: nowrap;
  text-underline-offset: 3px;
}

/* "See Pro" under "Free sessions used" in the AI partner panel (dark session overlay) */
.partner-pro-link {
  display: inline-block;
  margin-top: 6px;
  color: var(--overlay-accent);
  font-weight: 800;
  text-underline-offset: 3px;
}

/* Free vs Pro table (src/pro/PlanCompare.astro), homepage and /pricing/ */
.plan-compare {
  display: grid;
  gap: 14px;
}

.plan-compare h2,
.plan-compare p {
  margin: 0;
}

.plan-table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius-field);
}

.plan-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95rem;
}

.plan-table th,
.plan-table td {
  padding: 10px 14px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

.plan-table tbody tr:last-child th,
.plan-table tbody tr:last-child td {
  border-bottom: 0;
}

.plan-table thead th {
  background: var(--mint);
  font-weight: 800;
}

.plan-table tbody th {
  width: 34%;
  color: var(--muted);
  font-weight: 700;
}

.plan-table td:last-child {
  background: color-mix(in srgb, var(--mint) 40%, transparent);
}

/* Narrow screens: each feature label gets its own line, Free and Pro side by side under it. */
@media (max-width: 520px) {
  .plan-table thead tr,
  .plan-table tbody tr {
    display: grid;
    grid-template-columns: 1fr 1fr;
    border-bottom: 1px solid var(--line);
  }

  .plan-table tbody tr:last-child {
    border-bottom: 0;
  }

  .plan-table thead th:first-child {
    display: none;
  }

  .plan-table th,
  .plan-table td {
    border-bottom: 0;
    padding: 8px 12px;
  }

  .plan-table tbody th {
    grid-column: 1 / -1;
    width: auto;
    padding-bottom: 0;
  }
}

/* Launch round (d): TEST MODE notice on the Pro pages when the server reports Waffo test mode (previews). */
.pro-test-mode {
  margin: 0;
  padding: 12px 16px;
  border: 2px solid var(--clay);
  border-radius: var(--radius-field);
  background: var(--amber);
  color: var(--ink);
  font-weight: 700;
  text-align: center;
}

.pro-test-mode[hidden] {
  display: none;
}

/* "Coming soon" in place of "Get Pro" while checkout is closed (no PUBLIC_PRO_CHECKOUT=live): the secondary
   button, flat and dashed in the muted colour, so it doesn't read as clickable. */
.price-card .button-secondary:disabled {
  border-style: dashed;
  background: transparent;
  color: var(--muted);
  cursor: not-allowed;
}
