/*
 * Extra styles for the migration guides (tools/site/pages/migrate_a.py): small labels between the visuals of a step,
 * sections without a number and the spacing of the guide body. Flat: 1px lines, no shadows.
 */

.ma-toc .ly-toc {
  padding-top: 40px;
}

.ma-plain .ly-step-body {
  padding-left: 0;
}

.ma-label {
  margin: 10px 0 -6px;
  color: var(--muted);
  font-family: "DM Mono", ui-monospace, monospace;
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.ma-label:first-child {
  margin-top: 0;
}

.ma-sub {
  margin: 8px 0 -6px;
  font-size: 1.25rem;
  font-weight: 400;
  letter-spacing: -0.02em;
}

.ly-step-body .ma-note {
  max-width: 44rem;
  font-size: 0.92rem;
}

.ma-plain .mk-checks {
  max-width: 44rem;
}

.ly-step-body .mk-app,
.ly-step-body .mk-steps {
  max-width: 100%;
}

.ly-step-body code {
  font-family: "DM Mono", ui-monospace, monospace;
  font-size: 0.85em;
}

.ly-step-body p code,
.ly-step-body li code,
.mk-faq-a code {
  padding: 1px 6px;
  border-radius: 6px;
  background: var(--soft);
}

.ma-plain .mk-faq {
  max-width: none;
  margin: 0;
}

.ma-plain .mk-faq p {
  max-width: 62ch;
}

.ly-table .mk-tag {
  white-space: nowrap;
}

.ly-table td:has(> .mk-tag:only-child) {
  white-space: nowrap;
}

.ly-step-body p code,
.ly-step-body li code,
.mk-faq-a code {
  padding: 1px 4px;
}

.ma-toc .ly-step,
.ma-toc .ly-step-body > * {
  min-width: 0;
  max-width: 100%;
}

.ma-toc .ly-step-body {
  grid-template-columns: minmax(0, 1fr);
}

.ma-toc .mk-code pre {
  overflow-x: auto;
}

.ma-toc p code,
.ma-toc li code,
.ma-toc td code,
.ma-toc th code {
  overflow-wrap: anywhere;
}

.ma-toc .mk-checks li > span,
.ma-toc .ly-checklist li > span {
  min-width: 0;
  overflow-wrap: anywhere;
}

.ma-toc .mk-checks,
.ma-toc .ly-checklist ul {
  grid-template-columns: minmax(0, 1fr);
}

.ma-toc :not(pre) > code {
  white-space: normal;
  overflow-wrap: anywhere;
}

/* diff_window() puts a line break after each block-level line, which doubles the spacing: keep the lines inline. */
.ma-toc .ly-del,
.ma-toc .ly-add {
  display: inline;
}

.ma-toc .ly-table :not(pre) > code {
  overflow-wrap: break-word;
}

@media (max-width: 760px) {
  .ma-toc .ly-table {
    min-width: 640px;
  }
}
