/* Post composer: one predictable vertical rhythm, regardless of post type. */
.post-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-height: min(720px, calc(100vh - 32px));
  overflow-y: auto;
}

.post-form .dialog-head,
.post-form .tabs,
.post-form .form-error,
.post-form .dialog-actions {
  margin: 0;
}

.post-form textarea {
  display: block;
  min-height: 120px;
  flex: none;
}

.post-form .attach-post {
  align-self: flex-start;
  margin: 0;
}

.post-form .pending-files {
  width: 100%;
  max-width: none;
  margin: 0;
}

.post-form #pollFields {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 0;
  padding: 12px;
  border: 1px solid var(--soft);
  border-radius: 9px;
  background: #000000;
}

.post-form #pollFields.hidden { display: none; }
.post-form #pollFields > label { margin: 0; }
.post-form .option-row { margin: 0 0 7px; }
.post-form .option-row:last-child { margin-bottom: 0; }
.post-form .add-option { align-self: flex-start; }
.post-form .form-error:empty { display: none; }
.post-form .dialog-actions { padding-top: 2px; }

/* Published posts: separate each content block without making cards bulky. */
.post {
  display: flow-root;
}

.post .post-head { margin-bottom: 11px; }
.post > p { margin: 0; }
.post > p:not(:empty) + .attachments,
.post > p:not(:empty) + .poll-option { margin-top: 12px; }
.post > p:empty { display: none; }
.post .attachments { margin-top: 12px; margin-bottom: 12px; }
.post .attachments + .poll-option { margin-top: 4px; }
.post .poll-option + .poll-option { margin-top: 6px; }
.post .poll-total { margin-top: 9px !important; }

@media (max-width: 680px) {
  .post-form { gap: 10px; max-height: calc(100vh - 20px); }
  .post-form #pollFields { padding: 10px; }
}
