/* EichelmanLAB comments. Uses the fonts and colors from default.css. */

.cm-thread {
  margin-top: 10px;
}

.cm-count {
  margin-bottom: 10px;
  font-weight: bold;
  color: #000;
}

/* Forms */
.cm-form {
  display: block;
  margin-bottom: 20px;
}

.cm-label {
  display: block;
  margin-bottom: 10px;
  font-size: .9rem;
  font-weight: bold;
  color: #000;
}

.cm-form .cm-input,
.cm-form .cm-text {
  display: block;
  width: 100%;
  min-height: 0;
  margin-top: 4px;
  padding: 8px 10px;
  border: 1px solid #2a2a33;
  border-radius: 8px;
  background: #e4eaf2;
  color: #212529;
  font: 1rem/1.5 'Manrope', sans-serif;
  text-align: left;
  text-transform: none;
}

.cm-form .cm-text {
  min-height: 6rem;
  resize: vertical;
}

.cm-form .cm-input:focus,
.cm-form .cm-text:focus,
.cm-submit:focus-visible {
  outline: 2px solid #1E90FF;
  outline-offset: 2px;
}

.cm-buttons {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
}

.cm-submit {
  padding: 8px 18px;
  border: 0;
  border-radius: 8px;
  background: #2a2a33;
  color: #FFF;
  font: bold .95rem/1.5 'Manrope', sans-serif;
  cursor: pointer;
  transition: background .2s;
}

.cm-submit:hover {
  background: #1E90FF;
}

.cm-submit:disabled {
  opacity: .6;
  cursor: default;
}

.cm-cancel {
  font-size: .9rem;
}

.cm-note {
  font-size: .8rem;
  color: #6c757d;
}

.cm-error {
  margin-bottom: 10px;
  padding: 8px 12px;
  border-left: 3px solid #c0392b;
  border-radius: 4px;
  background: #fdecea;
  color: #7b1e14;
}

.cm-replying {
  margin-bottom: 8px;
  font-size: .9rem;
}

/* Honeypot: hidden from people, visible to bots. */
.cm-hp {
  position: absolute;
  left: -10000px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

/* Comments */
.cm-list,
.cm-replies {
  list-style: none;
  margin: 0;
  padding: 0;
}

.cm-comment {
  padding: 12px 0;
  border-top: 1px solid #e4eaf2;
}

.cm-replies {
  margin-top: 10px;
  margin-left: 24px;
  padding-left: 14px;
  border-left: 2px solid #e4eaf2;
}

.cm-replies .cm-comment {
  padding: 8px 0;
  border-top: 0;
}

.cm-reply-box {
  margin-top: 10px;
  margin-left: 24px;
  padding-left: 14px;
  border-left: 2px solid #1E90FF;
}

.cm-reply-box .cm-form {
  margin-bottom: 0;
}

.cm-name {
  color: #000;
}

.cm-date {
  margin-left: 6px;
  font-size: .8rem;
  color: #6c757d;
}

.cm-body {
  margin-top: 2px;
  overflow-wrap: anywhere;
}

.cm-body a {
  color: #1E90FF;
  font-weight: normal;
  text-decoration: underline;
}

.cm-mention {
  font-weight: bold;
  color: #1E90FF;
}

.cm-actions {
  margin-top: 4px;
  font-size: .85rem;
}

.cm-highlight > .cm-body {
  background: #f1f4f8;
}

.cm-back {
  margin-bottom: 10px;
}

/* Image on a comment (existing images only; new uploads are not accepted) */
.cm-image-wrap {
  margin-top: 8px;
}

.cm-image-link {
  display: inline-block;
  max-width: 100%;
  border-radius: 8px;
  line-height: 0;
}

.comments .cm-image {
  display: block;
  margin: 0;
  padding: 0;
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: 400px;
  border: 1px solid #e4eaf2;
  border-radius: 8px;
  background: #f1f4f8;
  cursor: zoom-in;
}

.cm-image-link:focus-visible {
  outline: 2px solid #1E90FF;
  outline-offset: 2px;
}

/* Likes on comments */
.cm-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 12px;
}

.cm-vote-form {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin: 0;
}

.cm-vote {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  min-height: 30px;
  padding: 2px 10px;
  border: 1px solid #e4eaf2;
  border-radius: 999px;
  background: #FFF;
  color: #6c757d;
  font: bold .85rem/1.4 'Manrope', sans-serif;
  cursor: pointer;
  transition: background .2s, border-color .2s, color .2s;
}

.cm-vote:hover {
  border-color: #2a2a33;
  color: #212529;
}

.cm-vote:focus-visible {
  outline: 2px solid #1E90FF;
  outline-offset: 2px;
}

.cm-vote-icon {
  font-size: 1rem;
  line-height: 1;
  filter: grayscale(1);
  opacity: .75;
}

.cm-vote.cm-on .cm-vote-icon {
  filter: none;
  opacity: 1;
}

.cm-vote-up.cm-on {
  border-color: #1E90FF;
  background: #e8f3ff;
  color: #1E90FF;
}

.cm-vote-form[data-busy="1"] .cm-vote {
  opacity: .6;
  cursor: progress;
}

.cm-vote-msg {
  font-size: .8rem;
  color: #7b1e14;
}

/* Like, comment and view bar for the post itself (moved under the post by comments.js) */
.cm-post-votes {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 12px;
  margin: 0 0 16px;
}

.cm-post-votes-moved {
  margin: 18px 0 0;
  padding-top: 12px;
  border-top: 1px solid #e4eaf2;
}

.cm-post-votes .cm-vote {
  min-height: 34px;
  padding: 2px 14px;
  font-size: .95rem;
}

.cm-post-votes .cm-vote-icon {
  font-size: 1.15rem;
}

a.cm-comments-link {
  text-decoration: none;
}

.cm-comments-icon {
  display: block;
  width: 1em;
  height: 1em;
  flex-shrink: 0;
}

.cm-post-votes .cm-comments-icon {
  width: 1.15em;
  height: 1.15em;
}

/* View count: looks like the other pills but isn't clickable */
.cm-views,
.cm-views:hover {
  border-color: #e4eaf2;
  color: #6c757d;
  cursor: default;
}

.cm-views-icon {
  display: block;
  width: 1em;
  height: 1em;
  flex-shrink: 0;
}

.cm-post-votes .cm-views-icon {
  width: 1.15em;
  height: 1.15em;
}

/* Text for screen readers only */
.cm-sr {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

@media (max-width: 650px) {
  .cm-replies,
  .cm-reply-box {
    margin-left: 8px;
    padding-left: 10px;
  }

  .comments .cm-image {
    max-height: 300px;
  }

  .cm-vote {
    min-height: 34px;
    padding: 2px 12px;
  }
}
