/*
 * Migration guides C (Amazon SES and Mailchimp).
 * Flat components only: 1px lines, no shadows. Colours come from site.css and marketing.css; nothing here uses inline styles.
 */

/* The page body of the guide: the steps are the main content, so the toc keeps its own spacing. */
.mc-toc {
  margin-top: 8px;
}

.mc-toc .ly-step-body > table,
.mc-toc .ly-table-wrap,
.mc-toc .mk-code,
.mc-toc .mc-win,
.mc-toc .mk-app,
.mc-toc .ly-checklist {
  min-width: 0;
  max-width: 100%;
}

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

/* diff_window puts each line in a block span and also ends it with a newline, which doubles the spacing. */
.mc-toc .ly-del,
.mc-toc .ly-add {
  display: inline;
}

/* ---------------------------------------------------------------- Flat window */

.mc-win {
  border: 1px solid rgba(17, 17, 17, 0.15);
  border-radius: 12px;
  background: #fff;
  overflow: hidden;
  text-align: left;
}

.mc-win-body {
  display: grid;
  gap: 12px;
  padding: 18px;
}

.mc-win-title {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px 12px;
}

.mc-win-title b {
  font-family: var(--font-head);
  font-size: 1.15rem;
  font-weight: 400;
  letter-spacing: -0.02em;
}

.mc-dim,
.mc-cap {
  margin: 0;
  color: var(--muted);
  font-size: 0.82rem;
}

.mc-mono {
  font-family: var(--font-mono, ui-monospace, SFMono-Regular, Menlo, monospace);
  font-size: 0.8rem;
  overflow-wrap: anywhere;
}

/* ---------------------------------------------------------------- DNS records */

.mc-rec {
  display: grid;
  grid-template-columns: 56px minmax(0, 1.1fr) minmax(0, 2fr) 96px;
  align-items: center;
  gap: 12px;
  padding: 10px 0;
  border-top: 1px solid #ece9e0;
}

.mc-rec-head {
  padding-top: 0;
  border-top: 0;
  color: var(--muted);
  font-size: 0.75rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.mc-type {
  font-size: 0.78rem;
  font-weight: 600;
}

/* ---------------------------------------------------------------- Who looks after what (SES) */

.mc-stack {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
  margin: 40px 0 28px;
}

.mc-col {
  padding: 22px;
  border: 1px solid var(--line-strong);
  border-radius: 16px;
  background: #fff;
}

.mc-col-after {
  border-color: #111;
}

.mc-col-title {
  margin: 0 0 16px;
  font-family: var(--font-mono, ui-monospace, SFMono-Regular, Menlo, monospace);
  font-size: 0.74rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.mc-col ol {
  display: grid;
  gap: 18px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.mc-box {
  position: relative;
  display: grid;
  gap: 4px;
  padding: 12px 14px;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  background: var(--bg);
}

.mc-box + .mc-box::before {
  content: "";
  position: absolute;
  top: -19px;
  left: 28px;
  height: 18px;
  border-left: 1px solid #111;
}

.mc-box b {
  font-size: 0.95rem;
}

.mc-box span {
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.5;
}

.mc-box-on {
  border-color: #111;
  background: var(--yellow);
}

.mc-box-on span {
  color: #3d3d3a;
}

.mc-note {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  max-width: 52rem;
  margin: 24px 0 0;
  padding: 14px 18px;
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  background: #fff;
  color: var(--muted);
  font-size: 0.95rem;
  line-height: 1.55;
}

.mc-note svg {
  flex: 0 0 auto;
  width: 20px;
  height: 20px;
  margin-top: 2px;
  color: var(--ink);
}

.mc-note a {
  color: var(--ink);
}

/* ---------------------------------------------------------------- Contact statuses (Mailchimp) */

.mc-statuses {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.mc-st {
  display: grid;
  align-content: start;
  gap: 10px;
  padding: 18px;
  border: 1px solid var(--line-strong);
  border-radius: 14px;
  background: #fff;
}

.mc-st-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
}

.mc-st-top b {
  font-family: var(--font-head);
  font-size: 1.25rem;
  font-weight: 400;
  letter-spacing: -0.02em;
}

.mc-st p {
  margin: 0;
  font-size: 0.95rem;
  line-height: 1.5;
}

.mc-toc .ly-step-body .mc-st p {
  max-width: none;
  font-size: 0.95rem;
}

.mc-st-do {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding-top: 10px;
  border-top: 1px solid #ece9e0;
  color: var(--ink);
}

.mc-toc .ly-step-body .mc-st-do {
  color: var(--ink);
}

.mc-st-do svg {
  flex: 0 0 auto;
  width: 16px;
  height: 16px;
  margin-top: 3px;
}

/* ---------------------------------------------------------------- Import dialog and form mocks */

.mc-map {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 20px minmax(0, 1.3fr);
  align-items: center;
  gap: 10px;
}

.mc-arrow {
  display: inline-flex;
  color: var(--muted);
}

.mc-arrow svg {
  width: 18px;
  height: 18px;
}

.mc-sel {
  display: block;
  padding: 8px 12px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: var(--bg);
  font-size: 0.86rem;
  overflow-wrap: anywhere;
}

.mc-sel-on {
  border-color: #111;
  background: #fff;
}

.mc-opt {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-top: 12px;
  border-top: 1px solid #ece9e0;
  font-size: 0.9rem;
}

.mc-opt .mc-sel {
  flex: 0 1 180px;
}

.mc-switch {
  position: relative;
  flex: 0 0 auto;
  width: 34px;
  height: 20px;
  border-radius: 999px;
  background: #d9d5c8;
}

.mc-switch::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #fff;
}

.mc-switch.on {
  background: #111;
}

.mc-switch.on::after {
  left: 17px;
  background: var(--yellow);
}

.mc-btns {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 10px 16px;
  padding-top: 4px;
}

.mc-pill {
  padding: 9px 20px;
  border-radius: 999px;
  background: #111;
  color: #fff;
  font-size: 0.88rem;
  font-weight: 600;
}

.mc-quiet {
  color: var(--muted);
  font-size: 0.88rem;
}

.mc-field {
  display: grid;
  gap: 4px;
}

.mc-field small {
  color: var(--muted);
  font-size: 0.78rem;
}

.mc-field span {
  padding: 9px 12px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: var(--bg);
  font-size: 0.9rem;
}

.mc-check {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 0.88rem;
}

.mc-check svg {
  flex: 0 0 auto;
  width: 18px;
  height: 18px;
  padding: 2px;
  border: 1px solid #111;
  border-radius: 4px;
  background: var(--yellow);
}

/* ---------------------------------------------------------------- Other guides */

.mc-guides {
  margin-top: 56px;
  padding-top: 28px;
  border-top: 1px solid #111;
}

.mc-guides-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.mc-guides-row a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 16px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  color: var(--ink);
  font-size: 0.92rem;
  text-decoration: none;
  transition: background-color 0.2s ease, border-color 0.2s ease;
}

.mc-guides-row a:hover {
  border-color: #111;
  background: var(--soft);
}

.mc-guides-row svg {
  width: 14px;
  height: 14px;
}

.mc-guides-row .mc-guides-all {
  border-color: #111;
}

/* ---------------------------------------------------------------- Small screens */

@media (max-width: 900px) {
  .mc-stack,
  .mc-statuses {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 760px) {
  .mc-toc :not(pre) > code {
    white-space: normal;
    overflow-wrap: anywhere;
    border-radius: 6px;
  }

  /* Tables stack: each row becomes a small card, and each cell shows its column name. */
  .mc-table {
    overflow: visible;
  }

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

  .mc-table .ly-table thead {
    display: none;
  }

  .mc-table .ly-table caption {
    display: block;
    width: 100%;
    box-sizing: border-box;
    border-bottom: 1px solid var(--line);
  }

  .mc-table .ly-table tr {
    padding: 14px 0;
    border-bottom: 1px solid var(--line);
  }

  .mc-table .ly-table tr:last-child {
    border-bottom: 0;
  }

  .mc-table .ly-table th,
  .mc-table .ly-table td {
    padding: 2px 18px;
    border: 0;
  }

  .mc-table .ly-table tbody th {
    padding-bottom: 6px;
    font-size: 1rem;
  }

  .mc-table .ly-table td {
    padding-top: 6px;
  }

  .mc-table .ly-table td::before {
    content: attr(data-label);
    display: block;
    margin-bottom: 2px;
    color: var(--muted);
    font-family: var(--font-mono);
    font-size: 0.68rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
  }

  .mc-win-body {
    padding: 14px;
  }

  .mc-rec {
    grid-template-columns: 48px minmax(0, 1fr);
    gap: 4px 12px;
  }

  .mc-rec-head {
    display: none;
  }

  .mc-rec > :nth-child(3) {
    grid-column: 1 / -1;
  }

  .mc-rec > :nth-child(4) {
    grid-column: 1 / -1;
  }

  .mc-opt {
    flex-wrap: wrap;
  }

  .mc-opt .mc-sel {
    flex-basis: 100%;
  }

  .mc-col {
    padding: 16px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .mc-guides-row a {
    transition: none;
  }
}

/* The site keeps inline code on one line; in cards, tables and notes long values need to wrap on small screens. */
.mk-card :not(pre) > code,
.mc-note code {
  white-space: normal;
  overflow-wrap: anywhere;
  border-radius: 6px;
}
