/*
 * styles.css
 *
 * Copyright (C) 2022 by Posit Software, PBC
 *
 * Unless you have received this program directly from Posit Software pursuant
 * to the terms of a commercial license agreement with Posit Software, then
 * this program is licensed to you under the terms of version 3 of the
 * GNU Affero General Public License. This program is distributed WITHOUT
 * ANY EXPRESS OR IMPLIED WARRANTY, INCLUDING THOSE OF NON-INFRINGEMENT,
 * MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. Please refer to the
 * AGPL (http://www.gnu.org/licenses/agpl-3.0.txt) for more details.
 *
 */

.pm-editing-root-node {
  padding: 0 10px;
}

.pm-content {
  position: relative;
  padding-bottom: 100px;
}

.pm-content p {
  margin-top: 0;
  margin-bottom: 1em;
  line-height: 1.5;
}

.pm-content > p:first-child,
.pm-content > p:nth-child(2), 
.pm-content > .pm-div:nth-child(1),
.pm-content > .pm-div:nth-child(2) {
  margin-top: 1em;
}

.pm-content .pm-heading {
  line-height: 1.2;
}

h3.pm-heading {
  font-size: 1.25em !important;
}

h4.pm-heading {
  font-size: 1.10em !important;
}

.pm-heading .pm-fixedwidth-font {
  font-size: inherit !important;
}

.pm-link {
  text-decoration: underline;
}

.pm-code-block {
  white-space: pre-wrap;
  margin-block-end: 1em;
}

.pm-blockquote {
  background-color: transparent;
  padding-left: 0.75em;
  border-left: 0.25em solid;
  margin-left: 0; 
  margin-right: 0;
}

.pm-figure {
  margin: 0;
  margin-block-end: 1em;
}

.pm-img {
  max-width: 100%;
}

.pm-image-preview img {
  max-width: 100%;
}

.pm-code, 
.pm-span {
  padding: 0 1px;
}

.pm-code {
  border: 1px solid;
}

.pm-div {
  padding: 1em;
  margin-block-end: 1em;
}

.pm-div > *:last-child {
  margin-bottom: 0.2em;
}

.pm-div > ul:last-child {
  margin-bottom: 0.4em;
}

.pm-div .pm-div {
  border: 1px solid;
}

.pm-list {
  padding-inline-start: 25px;
}

.pm-list li:last-child *:last-child {
  margin-bottom: 0.1em;
}

.pm-figcaption {
  margin-top: 3px;
}

.pm-table-container {
  margin-block-end: 1.5em;
}

.pm-table-container th {
  font-weight: bold;
  text-align: left;
}

.pm-table-cell {
  border: 1px solid;
  padding: 0 5px;
  padding-top: 7px;
  padding-bottom: 0;
}

.pm-table-cell > p:last-of-type {
  margin-bottom: 0.5rem;
} 

.pm-code-editor {
  border: 1px solid;
  margin-block-end: 1.5em;
  margin-top: 10px;
  clear: both;
}

.pm-definition-list {
  margin-block-end: 1.5em;
}

.pm-definition-term {
  font-weight: 600;
  margin-bottom: 0.5rem;
  padding: 0.2rem;
  display: block;
}

.pm-definition-description {
  margin-left: 0.7rem;
}

.pm-line-block {
  margin-block-end: 1em;
}

.pm-line-block > p {
  margin-top: 0;
  margin-bottom: 2px;
}

.pm-yaml-metadata-block {
  border-radius: 4px;
}

.pm-footnote {
  font-size: 75%;
  top: -0.45em;
}

.pm-footnote-body {
  font-size: 0.9rem;
}

.pm-footnote-body p {
  margin-bottom: 0.5em;
  margin-top: 0.5em;
}

.pm-node-caption {
  text-align: left;
  font-size: 0.85rem;
  cursor: text;
  min-height: 1.28581em;
}

.pm-margin-bordered {
  border-left: 0.1em solid;
  padding-left: 0.9em;
}

.pm-raw-block-border {
  border-style: dotted;
}

.pm-image-preview {
  border: 1px dotted;
  padding: 15px;
  margin-block-end: 1em;
}
.pm-popup {
  border-radius: 4px;
  border-style: solid;
  border-width: 1px;
  padding: 10px;
}

p.ProseMirror-selectednode {
  outline: none;
}


.pm-annotations {
  position: absolute;
  top: 0;
  right: 24px;
  bottom: 0;
  width: 232px;
  overflow: hidden;
}

a.pm-insert-user-comment-button, a.pm-insert-user-comment-button:hover {
  display: inline-block;
  position: absolute;
  right: 12px;
  user-select: none;
  text-decoration: none;
  cursor: pointer;
  font-size: 1.3rem;
  font-style: normal;
  font-weight: normal;
}

.pm-user-comment-view, .pm-annotations {
  /* The speed at which the comments pane adjusts to match the selection */
  transition-property: transform, margin-left;
  transition-duration: 750ms;
}

.pm-user-comment-view {
  width: 220px;
  margin-left: 12px;
}
/* When the current doc selection head is within a comment's extent, this class
 * is added to its satellite element */
.pm-user-comment-view.pm-user-comment-active {
  margin-left: 0;
}

.pm-user-comment-thread {
  width: 100%;
  font-size: 0.75rem;
  color: rgb(57, 75, 89);
}

.pm-user-comment-item {
  width: 100%;
  background-color: white;
  box-shadow: rgba(60, 64, 67, 0.15) 0px 1px 3px 1px;
  margin-bottom: 8px;
}

.pm-user-comment-header {
  padding: .3rem .6rem;
  background-color: rgba(167, 182, 194, 0.3);
  display: flex;
  align-items: baseline;
}
.pm-user-comment-item:focus-within .pm-user-comment-header {
  padding: .3rem .6rem;
  background-color: rgba(167, 182, 194, 0.6);
  display: flex;
  align-items: baseline;
}
    
.pm-user-comment-meta {
  flex: 1;
}

.pm-user-comment-author {
  font-weight: 500;
}
.pm-user-comment-created {
  flex: 1;
  opacity: 0.58;
}
.pm-user-comment-actions {
  padding: 0;
  text-align: center;
  float: right;
  margin-right: -3px;
}
.pm-user-comment-actions > button {
  padding: 1px 3px;
}
.pm-user-comment-delete {
  margin-left: 3px;
}
.pm-user-comment-delete:before {
  content: '\2715';
}
.pm-user-comment-edit:before {
  content: '\270E';
}
.pm-user-comment-edit.active {
  color: #777;
  cursor: default;
}

.pm-user-comment-content {
  display: block;
  padding: .6rem;
  max-height: 200px;
  white-space: pre-wrap;
  overflow-x: hidden;
  overflow-y: hidden;
  resize: none;
  width: 100%;
  outline-width: 0px !important;
  border: none;
  margin: 0px;
  background-color: inherit;
}
.pm-user-comment-footer {
  padding: .3rem .6rem;
}
.pm-user-comment-footer button {
  margin-right: 6px;
}
.pm-user-comment-add {
  float: right;
}
.pm-user-comment-add:before {
  content: 'Reply\2026';
}

.pm-user-comment-content:not([disabled]) {
  background-color: #FFFFDD;
  border-bottom: 1px solid #DDD;
}
.pm-user-comment-content:not([disabled]):empty:not(:focus):before {
  content: "(Empty)";
}
.pm-user-comment-content:not([disabled]):empty {
  font-style: italic;
  color: #888;
}

.pm-user-comment-content[disabled]:empty:not(:focus):before {
  content: "(Empty comment)";
}
.pm-user-comment-content[disabled]:empty {
  color: #888;
}

.pm-input-text {
  border: 1px;
  border-style: solid;
  border-radius: 3px;
}

.pm-placeholder-icon {
  height: 12px;
  width: 12px;
  padding-left: 4px;
  padding-right: 3px;
  display: inline-block;
  vertical-align: middle;
}

.pm-placeholder-text {
  padding-right: 4px;
  font-size: 9pt;
}

.pm-spelling-error {
  border-bottom: 1px dotted #e51400;
}

.pm-solarized-mode .pm-spelling-error {
  border-color: #d27600;
}

.pm-dark-mode .pm-spelling-error {
  border-color: #f48771;
}


.pm-nbsp::before {
  content: '·';
  position: relative;
  left: 2px;
}