/* Forum index and board pages, using the public catalog theme. */
.forum-page {
  padding-top: 16px;
  padding-bottom: 42px;
}

.forum-breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 3px 7px;
  margin-bottom: 12px;
  color: #888;
  font-size: 13px;
}

.forum-breadcrumb a,
.forum-breadcrumb span[aria-hidden] {
  flex: 0 0 auto;
  white-space: nowrap;
}

.forum-breadcrumb > span:last-child {
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.forum-breadcrumb a {
  color: #555;
}

.forum-breadcrumb a:hover {
  color: var(--accent);
}

.forum-breadcrumb span[aria-hidden] {
  color: #bbb;
}

.forum-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  align-items: start;
  gap: 18px;
}

.forum-main {
  min-width: 0;
}

.forum-side {
  display: flex;
  flex-direction: column;
  gap: 18px;
  min-width: 0;
}

.forum-panel {
  overflow: hidden;
  border: 1px solid #ddd;
  border-radius: 2px;
  background: #fafafa;
}

.forum-panel + .forum-panel {
  margin-top: 18px;
}

.forum-panel-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 15px 18px;
  border-bottom: 1px solid #ddd;
  background: #fff;
}

.forum-panel-heading h1,
.forum-panel-heading h2 {
  margin: 0;
  color: #333;
  font-size: 19px;
  font-weight: 700;
  line-height: 1.4;
}

.forum-panel-heading span {
  flex: none;
  color: #999;
  font-size: 12px;
}

.forum-board-list {
  background: #fafafa;
}

.forum-board {
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr) 110px 290px;
  align-items: center;
  gap: 16px;
  padding: 18px;
  border-bottom: 1px solid #e6e6e3;
  transition: background-color .12s;
}

.forum-board:last-child {
  border-bottom: 0;
}

.forum-board:hover {
  background: #f1f1ee;
}

.forum-icon {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  color: #fff;
  font-size: 20px;
  font-weight: 700;
  line-height: 1;
}

.forum-icon-small {
  width: 30px;
  height: 30px;
  flex: 0 0 auto;
  font-size: 13px;
}

.tone-0 { background: #c84b4b; }
.tone-1 { background: #4f7fa8; }
.tone-2 { background: #c98a3a; }
.tone-3 { background: #4d8a6a; }
.tone-4 { background: #7b6ca8; }
.tone-5 { background: #8b6a57; }

.forum-board-copy {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 4px;
}

.forum-board-copy strong {
  overflow: hidden;
  color: #333;
  font-size: 18px;
  font-weight: 700;
  line-height: 1.5;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.forum-board:hover .forum-board-copy strong {
  color: var(--accent);
}

.forum-board-copy small {
  overflow: hidden;
  color: #888;
  font-size: 13px;
  line-height: 1.6;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.forum-board-stats {
  display: flex;
  align-items: baseline;
  justify-content: center;
  flex-wrap: wrap;
  gap: 4px;
  color: #555;
  font-size: 14px;
  white-space: nowrap;
}

.forum-board-stats em {
  color: #aaa;
  font-style: normal;
}

.forum-board-stats small {
  flex-basis: 100%;
  color: #aaa;
  font-size: 11px;
  text-align: center;
}

.forum-board-latest {
  display: flex;
  grid-column: 4;
  min-width: 0;
  flex-direction: column;
  gap: 4px;
  padding-left: 16px;
  border-left: 1px solid #e6e6e3;
}

.forum-board-latest strong {
  overflow: hidden;
  color: #555;
  font-size: 13px;
  font-weight: 400;
  line-height: 1.5;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.forum-board-latest small {
  overflow: hidden;
  color: #999;
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.forum-side-panel .forum-panel-heading {
  padding: 13px 16px;
}

.forum-side-panel .forum-panel-heading h2 {
  font-size: 17px;
}

.forum-hot-list {
  padding: 6px 0;
}

.forum-hot-list a {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 11px 14px;
  border-bottom: 1px solid #ededeb;
}

.forum-hot-list a:last-child {
  border-bottom: 0;
}

.forum-hot-list a:hover strong {
  color: var(--accent);
}

.forum-hot-list a > span:last-child {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 3px;
}

.forum-hot-list strong {
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  color: #444;
  font-size: 13px;
  font-weight: 500;
  line-height: 1.5;
}

.forum-hot-list small {
  overflow: hidden;
  color: #999;
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.forum-note {
  margin: 0;
  padding: 16px;
  color: #888;
  font-size: 13px;
  line-height: 1.8;
}

.forum-empty {
  margin: 0;
  padding: 34px 18px;
  color: #999;
  font-size: 13px;
  text-align: center;
}

/* Board detail */
.forum-board-page {
  margin-top: 4px;
}

.forum-board-intro {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 18px;
  border-bottom: 1px solid #e6e6e3;
}

.forum-board-intro p {
  margin: 0;
  color: #777;
  font-size: 14px;
  line-height: 1.7;
}

.forum-topic-empty {
  padding: 64px 20px;
  text-align: center;
}

.forum-topic-empty h2 {
  margin: 0 0 8px;
  color: #444;
  font-size: 20px;
}

.forum-topic-empty p {
  margin: 0 0 20px;
  color: #999;
  font-size: 13px;
}

@media (max-width: 1200px) {
  .forum-layout {
    grid-template-columns: minmax(0, 1fr) 260px;
  }

  .forum-board {
    grid-template-columns: 48px minmax(0, 1fr) 250px;
  }

  .forum-board-stats {
    display: none;
  }

  .forum-board-latest {
    grid-column: 3;
  }
}

@media (max-width: 900px) {
  .forum-layout {
    grid-template-columns: 1fr;
  }

  .forum-side {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .forum-side .forum-panel + .forum-panel {
    margin-top: 0;
  }
}

@media (max-width: 700px) {
  .forum-page {
    padding-top: 10px;
    padding-bottom: 28px;
  }

  .forum-panel-heading {
    padding: 12px 13px;
  }

  .forum-panel-heading h1,
  .forum-panel-heading h2 {
    font-size: 17px;
  }

  .forum-board {
    grid-template-columns: 40px minmax(0, 1fr);
    gap: 10px 12px;
    padding: 14px 13px;
  }

  .forum-icon {
    width: 40px;
    height: 40px;
    font-size: 17px;
  }

  .forum-board-copy strong {
    font-size: 16px;
  }

  .forum-board-copy small {
    font-size: 12px;
    white-space: normal;
  }

  .forum-board-latest {
    grid-column: 1 / -1;
    padding: 8px 0 0 52px;
    border-top: 1px solid #ececea;
    border-left: 0;
  }

  .forum-side {
    grid-template-columns: 1fr;
  }

  .forum-side .forum-panel + .forum-panel {
    margin-top: 18px;
  }

  .forum-topic-empty {
    padding: 46px 16px;
  }
}

/* Board thread list */
.forum-board-hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 20px;
}

.forum-board-hero-main {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
}

.forum-board-hero-copy {
  min-width: 0;
}

.forum-board-hero-copy h1 {
  margin: 0 0 3px;
  color: #333;
  font-size: 24px;
  font-weight: 700;
  line-height: 1.4;
}

.forum-board-hero-copy p {
  margin: 0;
  color: #888;
  font-size: 13px;
  line-height: 1.7;
}

.forum-board-meta {
  display: inline-block;
  margin-top: 4px;
  color: #aaa;
  font-size: 12px;
}

.forum-post-button {
  flex: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  padding: 8px 20px;
  border: 0;
  border-radius: 2px;
  background: var(--accent);
  color: #fff;
  font-size: 14px;
  white-space: nowrap;
}

.forum-post-button:hover {
  background: var(--accent-dark);
  color: #fff;
}

.forum-list-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin: 18px 0 10px;
}

.forum-list-heading h2 {
  margin: 0;
  color: #333;
  font-size: 18px;
}

.forum-list-heading span {
  color: #999;
  font-size: 12px;
}

.forum-thread-list {
  background: #fafafa;
}

.forum-thread-row {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 15px 18px;
  border-bottom: 1px solid #e6e6e3;
  transition: background-color .12s;
}

.forum-thread-row:last-child {
  border-bottom: 0;
}

.forum-thread-row:hover {
  background: #f1f1ee;
}

.forum-thread-avatar-link {
  flex: 0 0 auto;
  display: block;
  line-height: 0;
}

.forum-thread-avatar {
  display: grid;
  flex: 0 0 auto;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: #7092b0;
  color: #fff;
  font-size: 16px;
  font-weight: 700;
  overflow: hidden;
}

.forum-thread-avatar img,
.forum-avatar img {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
}

.forum-thread-row:nth-child(3n+2) .forum-thread-avatar {
  background: #c98a3a;
}

.forum-thread-row:nth-child(3n) .forum-thread-avatar {
  background: #4d8a6a;
}

.forum-thread-main {
  flex: 1;
  min-width: 0;
}

.forum-thread-title {
  display: block;
  overflow: hidden;
  color: #333;
  font-size: 17px;
  font-weight: 600;
  line-height: 1.6;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.forum-thread-row:hover .forum-thread-title {
  color: var(--accent);
}

.forum-thread-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 4px 14px;
  margin-top: 3px;
  color: #999;
  font-size: 12px;
}

.forum-thread-meta span:first-child {
  color: #777;
}

.forum-thread-thumbs {
  display: flex;
  gap: 6px;
  margin-top: 9px;
}

.forum-thread-thumbs a {
  display: block;
  overflow: hidden;
  width: 104px;
  height: 68px;
  border: 1px solid #ddd;
  background: #eee;
}

.forum-thread-thumbs img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.forum-empty-large {
  padding: 58px 20px;
}

.forum-empty-large h2 {
  margin: 0 0 8px;
  color: #444;
  font-size: 20px;
}

.forum-empty-large p {
  margin: 0 0 18px;
  color: #999;
  font-size: 13px;
}

.forum-board-info {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
  padding: 16px;
}

.forum-board-info strong {
  color: #333;
  font-size: 16px;
}

.forum-board-info p {
  margin: 0;
  color: #888;
  font-size: 12px;
  line-height: 1.7;
}

.forum-board-info > div {
  display: flex;
  gap: 14px;
  margin-top: 3px;
  color: #999;
  font-size: 12px;
}

.forum-side-link {
  color: var(--accent);
  font-size: 12px;
}

.forum-side-link:hover {
  color: var(--accent-dark);
  text-decoration: underline;
}

.forum-thread-mini-list {
  padding: 4px 0;
}

.forum-thread-mini-list a {
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding: 10px 14px;
  border-bottom: 1px solid #ededeb;
}

.forum-thread-mini-list a:last-child {
  border-bottom: 0;
}

.forum-thread-mini-list strong {
  overflow: hidden;
  color: #444;
  font-size: 13px;
  font-weight: 500;
  line-height: 1.5;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.forum-thread-mini-list a:hover strong {
  color: var(--accent);
}

.forum-thread-mini-list small {
  overflow: hidden;
  color: #999;
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.forum-pagination {
  margin-top: 20px;
}

/* Thread detail */
.forum-post {
  padding: 22px 24px 0;
}

.forum-post-head h1 {
  margin: 0 0 14px;
  color: #222;
  font-size: 24px;
  font-weight: 700;
  line-height: 1.5;
  overflow-wrap: anywhere;
}

.forum-post-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  padding-bottom: 15px;
  border-bottom: 1px solid #e6e6e3;
}

.forum-avatar {
  display: grid;
  flex: 0 0 auto;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: #7092b0;
  color: #fff;
  font-size: 15px;
  font-weight: 700;
  overflow: hidden;
}

.forum-avatar-small {
  width: 30px;
  height: 30px;
  font-size: 13px;
}

.forum-post-author {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.forum-post-author strong {
  color: #555;
  font-size: 13px;
  font-weight: 600;
}

.forum-post-author small {
  color: #999;
  font-size: 11px;
}

.forum-board-chip {
  margin-left: auto;
  padding: 3px 8px;
  border-radius: 3px;
  background: #ececea;
  color: #666;
  font-size: 12px;
}

.forum-board-chip:hover {
  background: var(--accent);
  color: #fff;
}

.forum-post-body {
  padding: 20px 0;
  color: #444;
  font-size: 15px;
  line-height: 1.9;
  white-space: pre-line;
  overflow-wrap: anywhere;
}

.forum-post-gallery {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  padding-bottom: 20px;
}

.forum-post-gallery a {
  display: block;
  overflow: hidden;
  border: 1px solid #ddd;
  background: #eee;
}

.forum-post-gallery img {
  display: block;
  width: 100%;
  height: 240px;
  object-fit: cover;
  transition: transform .18s;
}

.forum-post-gallery a:hover img {
  transform: scale(1.02);
}

.forum-post-footer {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 12px 0;
  border-top: 1px solid #e6e6e3;
  color: #999;
  font-size: 12px;
}

.forum-post-footer a {
  margin-left: auto;
  color: var(--accent);
}

.forum-post-footer a:hover {
  text-decoration: underline;
}

.forum-reply-list {
  background: #fafafa;
}

.forum-reply {
  padding: 16px 20px;
  border-bottom: 1px solid #e6e6e3;
}

.forum-reply:last-child {
  border-bottom: 0;
}

.forum-reply-author {
  display: flex;
  align-items: center;
  gap: 9px;
}

.forum-reply-author > span:nth-child(2) {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.forum-reply-author strong {
  color: #555;
  font-size: 13px;
  font-weight: 600;
}

.forum-reply-author small {
  color: #999;
  font-size: 11px;
}

.forum-floor {
  margin-left: auto;
  color: #bbb;
  font-size: 11px;
}

.forum-reply-quote {
  display: block;
  margin: 10px 0 0 39px;
  padding: 7px 11px;
  border-left: 3px solid #d8d8d4;
  border-radius: 2px;
  background: #f2f2ef;
  color: #777;
  font-size: 12px;
  line-height: 1.7;
  text-decoration: none;
  overflow-wrap: anywhere;
}

.forum-reply-quote-label {
  display: block;
  color: #888;
  font-weight: 600;
}

.forum-reply-quote-floor {
  color: #aaa;
  font-weight: 400;
}

.forum-reply-quote-text {
  display: -webkit-box;
  margin-top: 2px;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

a.forum-reply-quote:hover {
  border-left-color: var(--accent);
  background: #f7f2f2;
}

a.forum-reply-quote:hover .forum-reply-quote-label {
  color: var(--accent);
}

.forum-reply-quote.is-unavailable {
  color: #aaa;
}

.forum-reply-actions {
  margin: 6px 0 0 39px;
}

.forum-reply-action {
  padding: 0;
  border: 0;
  background: none;
  color: #999;
  font: inherit;
  font-size: 12px;
  line-height: 1.6;
  cursor: pointer;
}

.forum-reply-action:hover {
  color: var(--accent);
}

.forum-reply-target {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
  padding: 8px 12px;
  border-left: 3px solid var(--accent);
  border-radius: 2px;
  background: #f7f2f2;
  color: #666;
  font-size: 13px;
}

.forum-reply-target[hidden] {
  display: none;
}

.forum-reply-target strong {
  color: var(--accent);
  font-weight: 600;
}

.forum-reply-target button {
  flex: none;
  padding: 0;
  border: 0;
  background: none;
  color: #888;
  font: inherit;
  font-size: 12px;
  cursor: pointer;
}

.forum-reply-target button:hover {
  color: var(--accent);
}

.forum-reply-body {
  margin: 9px 0 0 39px;
  color: #444;
  font-size: 14px;
  line-height: 1.8;
  white-space: pre-line;
  overflow-wrap: anywhere;
}

.forum-reply-form form {
  padding: 16px 20px 20px;
}

.forum-reply-form textarea {
  width: 100%;
  padding: 11px 12px;
  border: 1px solid #ccc;
  border-radius: 2px;
  background: #fff;
  color: #333;
  font: inherit;
  font-size: 14px;
  line-height: 1.7;
  outline: 0;
  resize: vertical;
}

.forum-reply-form textarea:focus,
.forum-editor input:focus,
.forum-editor textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 2px rgb(204 0 0 / 8%);
}

.forum-form-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-top: 12px;
}

.forum-form-actions > span {
  color: #999;
  font-size: 11px;
}

.forum-form-error {
  margin: 0 0 12px;
  padding: 8px 11px;
  border: 1px solid #ebccd1;
  border-radius: 2px;
  background: #f2dede;
  color: #a94442;
  font-size: 13px;
}

.forum-login-prompt {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 20px;
}

.forum-login-prompt p {
  margin: 0;
  color: #888;
  font-size: 13px;
}

/* New thread editor */
.forum-editor-panel .forum-panel-heading h1 {
  font-size: 20px;
}

.forum-editor {
  display: flex;
  flex-direction: column;
  padding: 18px 20px 20px;
}

.forum-editor label {
  margin: 13px 0 5px;
  color: #555;
  font-size: 13px;
}

.forum-editor label:first-of-type {
  margin-top: 0;
}

.forum-editor input,
.forum-editor textarea {
  width: 100%;
  padding: 10px 11px;
  border: 1px solid #ccc;
  border-radius: 2px;
  background: #fff;
  color: #333;
  font: inherit;
  font-size: 14px;
  outline: 0;
}

.forum-editor input {
  height: 40px;
}

.forum-editor textarea {
  line-height: 1.7;
  resize: vertical;
}

.forum-editor input[type="file"] {
  height: auto;
  padding: 12px;
  border-style: dashed;
  background: #fafafa;
  cursor: pointer;
}

.forum-editor input[type="file"]::file-selector-button {
  margin-right: 12px;
  padding: 6px 12px;
  border: 1px solid var(--accent);
  border-radius: 2px;
  background: #fff;
  color: var(--accent);
  font: inherit;
  cursor: pointer;
}

.forum-form-hint {
  display: block;
  margin-top: 6px;
  color: #888;
  font-size: 12px;
}

.forum-cancel-link {
  color: #888;
  font-size: 13px;
}

.forum-cancel-link:hover {
  color: var(--accent);
}

@media (max-width: 900px) {
  .forum-post-gallery img {
    height: 190px;
  }
}

@media (max-width: 700px) {
  .forum-board-hero {
    align-items: flex-start;
    flex-direction: column;
    gap: 13px;
    padding: 15px 14px;
  }

  .forum-board-hero-copy h1 {
    font-size: 20px;
  }

  .forum-post-button {
    width: 100%;
  }

  .forum-thread-row {
    gap: 10px;
    padding: 13px 12px;
  }

  .forum-thread-avatar {
    width: 32px;
    height: 32px;
    font-size: 14px;
  }

  .forum-thread-title {
    font-size: 15px;
    white-space: normal;
  }

  .forum-thread-meta {
    gap: 3px 9px;
    font-size: 11px;
  }

  .forum-thread-thumbs a {
    width: 76px;
    height: 54px;
  }

  .forum-post {
    padding: 15px 14px 0;
  }

  .forum-post-head h1 {
    font-size: 19px;
  }

  .forum-post-body {
    font-size: 14px;
    line-height: 1.85;
  }

  .forum-post-gallery {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .forum-post-gallery img {
    height: 150px;
  }

  .forum-reply {
    padding: 13px 13px;
  }

  .forum-reply-body,
  .forum-reply-quote,
  .forum-reply-actions {
    margin-left: 0;
  }

  .forum-reply-form form {
    padding: 13px;
  }

  .forum-form-actions {
    align-items: flex-start;
    flex-direction: column;
  }

  .forum-login-prompt {
    align-items: flex-start;
    flex-direction: column;
  }

  .forum-editor {
    padding: 14px;
  }
}


/* Rich text posts published from the admin editor */
.forum-post-body.forum-rich-text {
  white-space: normal;
}

.forum-rich-text > :first-child {
  margin-top: 0;
}

.forum-rich-text > :last-child {
  margin-bottom: 0;
}

.forum-rich-text p {
  margin: 0 0 12px;
}

.forum-rich-text h2 {
  margin: 24px 0 10px;
  color: #222;
  font-size: 22px;
  font-weight: 700;
  line-height: 1.45;
}

.forum-rich-text h3 {
  margin: 20px 0 9px;
  color: #333;
  font-size: 18px;
  font-weight: 700;
  line-height: 1.45;
}

.forum-rich-text h4 {
  margin: 17px 0 8px;
  font-size: 16px;
}

.forum-rich-text ul,
.forum-rich-text ol {
  margin: 10px 0;
  padding-left: 26px;
}

.forum-rich-text li {
  margin: 3px 0;
}

.forum-rich-text blockquote {
  margin: 14px 0;
  padding: 9px 15px;
  border-left: 3px solid #d9ddd9;
  background: #f5f5f2;
  color: #666;
}

.forum-rich-text a {
  color: var(--accent);
  text-decoration: underline;
}

.forum-rich-text a:hover {
  color: var(--accent-dark);
}

.forum-rich-text img {
  display: block;
  max-width: 100%;
  height: auto;
  margin: 12px 0;
  border: 1px solid #ddd;
}

.forum-rich-text pre,
.forum-rich-text code {
  padding: 2px 5px;
  background: #f1f1ee;
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size: 13px;
}

.forum-rich-text pre {
  overflow-x: auto;
  padding: 11px 13px;
}

.forum-rich-text hr {
  margin: 20px 0;
  border: 0;
  border-top: 1px solid #ddd;
}


.forum-points-notice {
  margin: 0 0 14px;
  padding: 9px 12px;
  border: 1px solid #d9e6ee;
  border-radius: 2px;
  background: #f1f7fb;
  color: #4d6a7c;
  font-size: 12px;
  line-height: 1.7;
}

.forum-points-notice.insufficient {
  border-color: #ebccd1;
  background: #fdf0f1;
  color: #a94442;
}

.forum-points-notice a,
.forum-form-error a {
  color: #a94442;
  text-decoration: underline;
  white-space: nowrap;
}


/* User-facing rich-text editor (threads and replies) */
.forum-rich-field {
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.forum-rich-field[hidden] {
  display: none;
}

.forum-rich-editor {
  overflow: hidden;
  border: 1px solid #ccc;
  border-radius: 4px;
  background: #fff;
}

.forum-rich-toolbar {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 2px;
  padding: 6px;
  border-bottom: 1px solid #e2e2df;
  background: #f7f7f5;
}

.forum-rich-toolbar button {
  display: inline-grid;
  place-items: center;
  min-width: 30px;
  height: 30px;
  padding: 0 6px;
  border: 1px solid transparent;
  border-radius: 3px;
  background: transparent;
  color: #4f5751;
  font: inherit;
  font-size: 13px;
  line-height: 1;
  cursor: pointer;
}

.forum-rich-toolbar button:hover {
  border-color: #c6c6c6;
  background: #fff;
  color: var(--accent);
}

.forum-rich-divider {
  width: 1px;
  height: 20px;
  margin: 0 4px;
  background: #ddd;
}

.forum-rich-surface {
  min-height: 240px;
  max-height: 620px;
  overflow-y: auto;
  padding: 12px 13px;
  color: #333;
  font-size: 14px;
  line-height: 1.8;
  outline: 0;
  overflow-wrap: anywhere;
  white-space: normal;
}

.forum-rich-surface:focus {
  box-shadow: inset 0 0 0 2px rgb(204 0 0 / 8%);
}

.forum-rich-surface:empty::before {
  color: #aaa;
  content: attr(data-placeholder);
  pointer-events: none;
}

.forum-rich-surface p {
  margin: 0 0 10px;
}

.forum-rich-surface h2 {
  margin: 20px 0 9px;
  color: #222;
  font-size: 21px;
  line-height: 1.45;
}

.forum-rich-surface h3 {
  margin: 17px 0 8px;
  color: #333;
  font-size: 17px;
  line-height: 1.45;
}

.forum-rich-surface h4 {
  margin: 15px 0 7px;
  font-size: 15px;
}

.forum-rich-surface ul,
.forum-rich-surface ol {
  margin: 8px 0;
  padding-left: 26px;
}

.forum-rich-surface blockquote {
  margin: 12px 0;
  padding: 8px 14px;
  border-left: 3px solid #d9ddd9;
  background: #f5f5f2;
  color: #666;
}

.forum-rich-surface a {
  color: var(--accent);
  text-decoration: underline;
}

.forum-rich-surface img {
  display: block;
  max-width: 100%;
  height: auto;
  margin: 10px 0;
  border: 1px solid #ddd;
}

.forum-rich-surface pre,
.forum-rich-surface code {
  padding: 2px 5px;
  background: #f1f1ee;
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size: 13px;
}

.forum-rich-surface pre {
  overflow-x: auto;
  padding: 10px 12px;
}

.forum-rich-surface hr {
  margin: 18px 0;
  border: 0;
  border-top: 1px solid #ddd;
}

.forum-rich-uploading {
  display: inline-flex;
  align-items: center;
  max-width: 100%;
  padding: 6px 10px;
  border: 1px dashed #c6c6c6;
  border-radius: 3px;
  background: #f7f7f5;
  color: #888;
  font-size: 12px;
  overflow-wrap: anywhere;
}

.forum-rich-hint,
.forum-rich-status {
  margin: 0;
  color: #888;
  font-size: 12px;
  line-height: 1.6;
}

.forum-rich-status {
  min-height: 1.2em;
}

.forum-rich-status.is-error {
  color: #a94442;
}

.forum-rich-status.is-success {
  color: #3c763d;
}

.forum-reply-form .forum-rich-field {
  margin-top: 0;
}

.forum-reply-body.forum-rich-text {
  white-space: normal;
}

@media (max-width: 700px) {
  .forum-rich-surface {
    min-height: 200px;
  }

  .forum-rich-toolbar button {
    min-width: 32px;
    height: 32px;
  }
}
