/* Comparison pages (slack-alternative.html): the side-by-side table, the two "pick" cards and the FAQ.
   The rest is the feature pages' layout */

/* Only for screen readers (the table's empty first header), as on pricing.html */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

/* The page's title section ends with the table, so it keeps a section's padding below it,
   as calls.html does with its recording */
.cmp-head.page-head { padding-bottom: var(--section-pad); }

/* The table, under the title as far below the description as calls.html's recording.
   Zigzag's column is tinted blue. On phones each row stacks (see the end of the file) */
.cmp-table-wrap {
  max-width: 62.5rem;
  margin: 4.5rem auto 0;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface);
}

.cmp-table {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--fs-body);
  text-align: left;
}

.cmp-table th,
.cmp-table td {
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
}

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

.cmp-table thead th {
  font-size: var(--fs-lead);
  font-weight: 700;
  color: var(--text);
}

.cmp-table tbody th {
  width: 26%;
  font-weight: 600;
  color: var(--text);
}

.cmp-table td { width: 37%; }

.cmp-table .cmp-us {
  background: rgb(37 99 235 / 0.08);
  color: var(--text);
}

.cmp-table thead .cmp-us { color: var(--accent-text); }

/* Which one: a card for each app with three reasons to pick it, Zigzag's outlined in blue */
.cmp-pick {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  max-width: 50rem;
  margin-inline: auto;
}

.cmp-pick-card {
  padding: 2rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface);
}

.cmp-pick-us {
  border-color: var(--accent);
  box-shadow: 0 0 0 1px var(--accent);
}

.cmp-pick-card h3 { margin-bottom: 1.25rem; }
.cmp-pick-us h3 { color: var(--accent-text); }

.cmp-pick-card ul {
  display: grid;
  gap: 0.875rem;
  list-style: none;
}

.cmp-pick-card li {
  display: flex;
  gap: 0.75rem;
  font-size: var(--fs-body);
  color: var(--text);
}

/* A small check before each reason */
.cmp-pick-card li::before {
  content: '';
  flex: none;
  width: 1.125rem;
  height: 1.125rem;
  margin-top: 0.25rem;
  background: var(--text-muted);
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12l5 5 9-10'/%3E%3C/svg%3E") center / contain no-repeat;
}

.cmp-pick-us li::before { background: var(--accent-text); }

/* FAQ: every question and answer shows, as on Macro's pages and in the page's FAQ data */
.cmp-faq {
  display: grid;
  max-width: 47.5rem;
  margin-inline: auto;
}

.cmp-faq-item {
  padding-block: 1.75rem;
  border-top: 1px solid var(--border);
}

.cmp-faq-item:last-child { border-bottom: 1px solid var(--border); }

.cmp-faq-item h3 { margin-bottom: 0.75rem; }
.cmp-faq-item p { font-size: var(--fs-body); }

@media (max-width: 760px) {
  .cmp-table-wrap { margin-top: 2.5rem; }
  .cmp-pick { grid-template-columns: 1fr; }
  .cmp-pick-card { padding: 1.5rem; }

  /* Each row: the feature on its own line, then Zigzag and Slack side by side under it, so both
     columns stay on screen. The table's roles are kept for screen readers (slack-alternative.html) */
  .cmp-table thead tr,
  .cmp-table tbody tr {
    display: grid;
    grid-template-columns: 1fr 1fr;
    border-bottom: 1px solid var(--border);
  }

  .cmp-table tbody tr:last-child { border-bottom: 0; }
  .cmp-table thead th:first-child { display: none; }

  .cmp-table th,
  .cmp-table td {
    width: auto;
    padding: 0.875rem 1rem;
    border-bottom: 0;
  }

  .cmp-table tbody th {
    grid-column: 1 / -1;
    width: auto;
    padding-bottom: 0.5rem;
  }

  .cmp-table tbody td { padding-top: 0.5rem; }
}
