/* WYSIWYG plugin */

/* The editor sits where the textarea was and looks just like the post will, as the preview does: no box around it, and
   its lines spaced like the post's paragraphs. */
.p .body .wysiwyg {margin-bottom:3px; outline:none; cursor:text; word-wrap:break-word}
.p .body .wysiwyg.loading {opacity:0.5}
.wysiwyg div {line-height:1.4; text-align:justify}

/* A blank line is a paragraph break, so it's as tall as the space between paragraphs (less in a quote.)  The line with
   a quote's attribution is a paragraph of its own. */
.wysiwyg div:has(> br:only-child) {height:1em}
.wysiwyg blockquote div:has(> br:only-child) {height:.75em}
.wysiwyg blockquote > div:first-child:has(> cite) {margin-bottom:.75em}

/* An image on the line after another line of its paragraph is spaced from it, as it is in a post. */
.wysiwyg div:not(:has(> br:only-child)) + div > .frame:first-child {margin-top:.5em}

/* Formatting buttons whose formatting applies to the selection. */
.p .controls .formattingButtons a.active, .p .controls .formattingButtons a.active:hover {background-color:rgba(0,0,0,0.35)}

/* The dropdown menus of the link, image and video buttons, for entering a URL.  (The row of buttons doesn't clip them,
   so they hang off the bottom of the whole header, like other dropdowns in a row of controls.  Spans in a post's header
   are otherwise inline and spaced out.) */
.p .controls .formattingButtons:has(> .wysiwygDropdown) {overflow:visible}
.dropdown > .wysiwygMenu {padding:8px; width:260px; white-space:normal}
.wysiwygMenu label {display:block; margin-bottom:4px; font-weight:bold}
.wysiwygMenu input.text {display:block; width:100%; box-sizing:border-box}
.dropdown > .wysiwygMenu .wysiwygMenuButtons {display:block; margin:6px 0 0; font-size:100%; text-align:right}
.dropdown > .wysiwygMenu .button {display:inline-block; margin:0 0 0 4px; font-size:100%}
