/* /sales/emails/<sequence>/<email>/<variant> (Sales::EmailVariantsController#show)
 * — the sample-user picker, the headers, the html part in a sandboxed iframe
 * at 640 px or 375 px beside the text part, and the word diff. */

.sales-emails-links {
  display: flex;
  gap: var(--spacing-12);
  flex-wrap: wrap;
}

.sales-emails-picker {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: var(--spacing-12);
}

.sales-emails-headers {
  display: grid;
  grid-template-columns: max-content 1fr;
  gap: var(--spacing-4) var(--spacing-16);
  margin: 0;

  & dt { color: var(--text-tertiary); }
  & dd { margin: 0; overflow-wrap: anywhere; }
}

.sales-emails-preview {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: var(--spacing-16);
}

.sales-emails-frame-wrap {
  min-width: 0;
  max-width: 100%;
  overflow-x: auto;
}

.sales-emails-frame {
  display: block;
  height: 56rem;
  background: var(--background-base);
  border: var(--stroke-weight-1) solid var(--border-default);
}

/* The two widths of docs/plans/email-tooling.md § 4. */
.sales-emails-frame--desktop { width: 640px; }
.sales-emails-frame--phone { width: 375px; }

.sales-emails-text {
  flex: 1 1 20rem;
  min-width: 0;
  max-height: 56rem;
  margin: 0;
  padding: var(--spacing-12);
  overflow: auto;
  font-family: var(--font-family-mono);
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  border: var(--stroke-weight-1) solid var(--border-subtle);
}

.sales-emails-note { display: flex; flex-direction: column; gap: var(--spacing-4); }

.sales-emails-note-field {
  width: 100%;
  max-width: 40rem;
  padding: var(--spacing-8);
  color: var(--text-primary);
  border: var(--stroke-weight-1) solid var(--border-default);
  border-radius: var(--corner-radius-sm);
}

.sales-emails-diff-text {
  white-space: pre-wrap;
  overflow-wrap: anywhere;

  & ins { color: var(--text-protective); text-decoration: underline; }
  & del { color: var(--text-danger); text-decoration: line-through; }
}
