/* Drafts kept on the server: the /drafts page, one draft's words (/drafts/{id}) and the
   delete confirmation (Pages/Drafts). The line in the editor that asks which copy to keep
   is the editor's own (editor/src/editor.css).

   Mobile first: the rules outside a media query lay things out for a phone; the min-width
   blocks add room on wider screens. Everything tapped is at least 44 px tall. Every color
   is a custom property from site.css. A draft that can no longer be used is said in words
   with a sign beside them, never by color alone. */

.draft-row {
  display: flex; flex-direction: column; gap: 12px;
  padding: 14px 16px; border-top: 1px solid var(--line);
}
.draft-row:first-child { border-top: 0; }

.draft-main { min-width: 0; display: flex; flex-direction: column; gap: 4px; }

.draft-where { margin: 0; font-family: var(--font); font-size: 16px; font-weight: 600; line-height: 1.4; color: var(--ink); overflow-wrap: anywhere; }
.draft-what { color: var(--muted); font-weight: 500; }
.draft-where a { color: var(--accent); }
.draft-name { color: var(--ink); }

.draft-title { margin: 0; color: var(--ink); font-weight: 600; overflow-wrap: anywhere; }

.draft-excerpt {
  margin: 0; color: var(--ink); font-size: 15px; line-height: 1.5; overflow-wrap: anywhere;
  display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 3; line-clamp: 3; overflow: hidden;
}

.draft-meta { margin: 0; color: var(--muted); font-size: 13px; display: flex; flex-wrap: wrap; gap: 0 6px; }

.draft-problem {
  margin: 4px 0 0; padding: 8px 10px; display: flex; align-items: flex-start; gap: 8px;
  border-left: 4px solid var(--danger); border-radius: var(--radius-small);
  background: var(--surface-alt); color: var(--ink); font-size: 14px; line-height: 1.45;
}
.draft-stuck-icon { flex: none; margin-top: 1px; color: var(--danger); }

.draft-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.draft-actions .forum-button { min-height: 44px; }
.draft-delete { color: var(--muted); }
.draft-delete:hover { color: var(--danger); }

.drafts-foot { margin: 12px 4px 0; font-size: 13px; }

/* One draft's words, to read or copy. */
.draft-show { padding: 18px 16px; display: flex; flex-direction: column; gap: 12px; }
.draft-show .page-title { margin: 0; overflow-wrap: anywhere; }
.draft-words { padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--radius-small); background: var(--surface-alt); max-width: 100%; overflow-x: auto; }
.draft-copied { margin: 0; color: var(--muted); font-size: 14px; min-height: 1.4em; }

@media (min-width: 768px) {
  /* The actions sit beside the words, at the right. */
  .draft-row { flex-direction: row; align-items: flex-start; justify-content: space-between; gap: 20px; padding: 16px 20px; }
  .draft-main { flex: 1 1 auto; }
  .draft-row .draft-actions { flex: none; flex-wrap: nowrap; }
  .draft-show { padding: 24px; }
}
