/*
 * Font Style Generator (public_html/font-style-generator.php). The shared
 * layout is pt-ui.css and pt-theme.css; this is the list of styles and the
 * text box. The text box stays in view while the list scrolls on a computer;
 * on a phone it comes first. Sizes in px: the theme's rem is 20px.
 */
.fs-editor [hidden] { display: none !important; }
.fs-ic { width: 17px; height: 17px; flex: 0 0 auto; }

/* The list is long: the panel, not the list, stays in view. */
@media (min-width: 768px) {
  .pt-tool.fs-editor .pt-tool-stage { position: static; }
  .pt-tool.fs-editor .pt-tool-panel { position: sticky; top: calc(var(--pt-head, 78px) + 10px); }
}
/* Tablet portrait and phones: the text box first, the styles under it. */
@media (min-width: 768px) and (max-width: 991.98px) and (orientation: portrait) {
  .pt-tool.fs-editor .pt-tool-panel { order: 0 !important; position: static; margin-top: 0; }
  .pt-tool.fs-editor .pt-tool-stage { order: 1 !important; }
}
@media (max-width: 767.98px) {
  .pt-tool.fs-editor .pt-tool-stage { margin-top: 16px; }
}

.fs-in { font-size: 16px; line-height: 1.45; resize: vertical; min-height: 88px; }
.fs-in-tools { display: flex; flex-wrap: wrap; gap: 6px; }
.fs-in-tools:not(:has(> :not([hidden]))) { display: none; }
.fs-note { font-size: 13px; line-height: 1.5; color: var(--cb-text, #3d434b); }
.fs-privacy { font-size: 12.5px; }

/* ── The styles ────────────────────────────────────────────────────────── */
.fs-list {
  background: #fff;
  border-radius: 22px;
  box-shadow: var(--cb-shadow, 0 24px 50px -30px rgba(22, 24, 29, 0.4));
  padding: 6px 18px 10px;
}
.fs-group {
  margin: 18px 0 2px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--cb-muted, #626973);
}
.fs-group:first-child { margin-top: 12px; }
.fs-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 0;
  border-bottom: 1px solid var(--cb-line, #e4e1dc);
}
.fs-row:last-child { border-bottom: 0; }
.fs-group + .fs-row { border-top: 0; }
.fs-main { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.fs-name { font-size: 12.5px; font-weight: 600; color: var(--cb-muted, #626973); }
.fs-out {
  font-size: 22px;
  line-height: 1.4;
  color: var(--cb-ink, #16181d);
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  word-break: break-word;
  min-height: 1.4em;
}
/* Nothing typed yet: the sample, greyed. */
.fs-is-sample .fs-out { color: #8a9099; }

.fs-row .btn { flex: 0 0 auto; display: inline-flex; align-items: center; justify-content: center; gap: 6px; }
.fs-copy {
  min-height: 34px;
  padding: 0 14px;
  border-radius: 999px;
  border: 1px solid #d6d2cc;
  background: #fff;
  color: var(--cb-ink, #16181d);
  font-size: 13px;
  font-weight: 700;
}
.fs-photo {
  width: 34px;
  height: 34px;
  padding: 0;
  border-radius: 50%;
  border: 1px solid #d6d2cc;
  background: #fff;
  color: var(--cb-text, #3d434b);
}
.fs-copy:hover, .fs-photo:hover { border-color: var(--pt-accent, #0f70e6); color: var(--pt-accent, #0f70e6); background: #fff; }
.fs-copy:focus-visible, .fs-photo:focus-visible { outline: 3px solid var(--pt-accent, #0f70e6); outline-offset: 2px; }
.fs-ic-done { display: none; }
/* The one copied last: a tick. */
.fs-done .fs-copy { border-color: #1e9e5a; color: #147a43; background: #ecf7f0; }
.fs-done .fs-ic-copy { display: none; }
.fs-done .fs-ic-done { display: inline; }

@media (max-width: 767.98px) {
  .fs-list { padding: 4px 14px 8px; border-radius: 18px; }
  .fs-out { font-size: 20px; }
  /* Fingers: 44px targets. */
  .fs-copy { min-height: 44px; padding: 0 14px; }
  .fs-photo { width: 44px; height: 44px; }
}
