/* Shared styles for every thread page (/threads/<slug>).
   Extracted from the four near-identical thread pages during the
   dreamingtogether.net migration. Edit here, not per page. */

html, body {
  background: #232a35 !important;
  min-height: 100vh;
  height: 100%;
  margin: 0;
  padding: 0;
}
.comments-section {
  max-width: 700px;
  width: 100%;
  min-width: 700px;
  margin: 2rem auto;
  padding: 1.5rem;
  background: #232a35;
  border-radius: 12px;
  box-shadow: 0 2px 16px rgba(34,45,58,0.13);
  box-sizing: border-box;
  overflow-x: auto;
  display: block;
}
.comment-form, .reply-form {
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
  margin-bottom: 2rem;
  width: 100%;
}
.comment-textarea, .reply-textarea {
  resize: vertical;
  min-height: 50px;
  font-size: 1em;
  border-radius: 8px;
  border: 1px solid #353c48;
  padding: 0.7em;
  background: #181818;
  color: #f8f8f8;
  font-family: inherit;
  width: 100%;
  box-sizing: border-box;
}
.comment-btn, .reply-btn, .delete-btn {
  align-self: flex-end;
  background: #353c48;
  color: #bcd2e8;
  border: none;
  border-radius: 8px;
  padding: 0.5rem 1.2rem;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.2s, color 0.18s;
  margin-left: 0.5em;
}
.comment-btn:hover, .reply-btn:hover, .delete-btn:hover {
  background: #bcd2e8;
  color: #232a35;
}
.delete-btn {
  background: #a83232;
  color: #fff;
  font-size: 0.95em;
  padding: 0.3em 0.8em;
  margin: 0.2em;
}
.delete-btn:hover {
  background: #e54d4d;
  color: #fff;
}
.comment-list {
  list-style: none;
  padding: 0;
  margin: 0;
  width: 100%;
  display: block;
  min-width: 100%;
  box-sizing: border-box;
}
.comment {
  margin-bottom: 1.6rem;
  padding-bottom: 0.9rem;
  border-bottom: 1px solid #353c48;
  position: relative;
  width: 100%;
  box-sizing: border-box;
  display: block;
  min-width: 100%;
}
.comment-meta {
  font-size: 0.93em;
  color: #bcd2e8;
  margin-bottom: 0.2em;
  font-style: italic;
}
.comment-body {
  margin-bottom: 0.5em;
  white-space: pre-line;
  color: #f8f8f8;
  width: 100%;
}
.reply-btn {
  font-size: 0.95em;
  padding: 0.3em 1em;
  margin-top: 0.3em;
  margin-bottom: 0.3em;
}
.reply-list {
  list-style: none;
  padding: 0 0 0 1.5em;
  margin: 0.5em 0 0 0;
  width: 100%;
  box-sizing: border-box;
  display: block;
  font-size: 0.95em;
  border-left: 2px solid #353c48;
}
.reply-list .reply-list {
  font-size: 0.95em;
  padding-left: 1.2em;
  border-left: 2px solid #2a3340;
}
.reply-list .reply-list .reply-list {
  font-size: 0.95em;
  padding-left: 1em;
  border-left: 2px solid #222930;
}
.reply-list .reply-list .reply-list .reply-list {
  font-size: 1em;
  padding-left: 0.8em;
  border-left: 1px solid #1d2229;
}
.reply-list .reply-list .reply-list .reply-list .reply-list {
  font-size: 1em;
  padding-left: 0.8em;
  border-left: 1px solid #1d2229;
}
.reply-form {
  margin-top: 0.6em;
  margin-bottom: 0.6em;
  width: 100%;
  box-sizing: border-box;
}
.spoiler {
  background: #bcd2e8;
  color: #bcd2e8;
  border-radius: 4px;
  padding: 0.1em 0.3em;
  cursor: pointer;
  transition: color 0.2s, background 0.2s;
  font-weight: bold;
}
.spoiler.revealed {
  color: #232a35;
  background: #f8f8f8;
}
.pagination {
  display: flex;
  gap: 1em;
  justify-content: center;
  margin: 2em 0 0 0;
  width: 100%;
}
.pagination-btn {
  background: #353c48;
  color: #bcd2e8;
  border: none;
  border-radius: 8px;
  padding: 0.3em 1.2em;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.2s, color 0.18s;
}
.pagination-btn:disabled {
  background: #222d3a;
  color: #888;
  cursor: not-allowed;
}
.pagination-btn:hover:not(:disabled) {
  background: #bcd2e8;
  color: #232a35;
}
.captcha-error {
  color: #e54d4d;
  font-size: 0.98em;
  margin-top: 0.3em;
  width: 100%;
}
.admin-lock {
  position: fixed;
  bottom: 20px;
  right: 20px;
  background: #353c48;
  border: none;
  border-radius: 50%;
  width: 48px;
  height: 48px;
  font-size: 24px;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(0,0,0,0.3);
  transition: background 0.2s, transform 0.15s;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
}
.admin-lock:hover {
  background: #bcd2e8;
  transform: scale(1.1);
}
.admin-lock.logged-in {
  background: #4d9;
}
.admin-modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0,0,0,0.7);
  z-index: 2000;
  align-items: center;
  justify-content: center;
}
.admin-modal.show {
  display: flex;
}
.admin-modal-content {
  background: #232a35;
  padding: 2em;
  border-radius: 12px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.5);
  max-width: 400px;
  width: 90%;
  border: 2px solid #353c48;
}
.admin-modal-content h3 {
  margin-top: 0;
  color: #bcd2e8;
}
.admin-input {
  width: 100%;
  padding: 0.7em;
  border-radius: 6px;
  border: 1px solid #353c48;
  background: #181818;
  color: #f8f8f8;
  font-family: inherit;
  font-size: 1em;
  margin-bottom: 1em;
  box-sizing: border-box;
}
.admin-modal-buttons {
  display: flex;
  gap: 0.5em;
  justify-content: flex-end;
}
.admin-modal-btn {
  padding: 0.6em 1.2em;
  border: none;
  border-radius: 8px;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.2s;
}
.admin-modal-btn.login {
  background: #353c48;
  color: #bcd2e8;
}
.admin-modal-btn.login:hover {
  background: #bcd2e8;
  color: #232a35;
}
.admin-modal-btn.cancel {
  background: #222d3a;
  color: #888;
}
.admin-modal-btn.cancel:hover {
  background: #353c48;
  color: #f8f8f8;
}
.admin-modal-btn.logout {
  background: #a83232;
  color: #fff;
}
.admin-modal-btn.logout:hover {
  background: #e54d4d;
}
@media (max-width: 900px) {
  .comments-section {
    max-width: 95vw;
    width: 95vw;
    min-width: unset;
    margin: 5vw auto;
    padding: 1vw;
  }
  .reply-list {
    padding-left: 1em;
  }
  .reply-list .reply-list {
    padding-left: 0.8em;
  }
  .reply-list .reply-list .reply-list {
    padding-left: 0.6em;
  }
  .reply-list .reply-list .reply-list .reply-list {
    padding-left: 0.5em;
  }
  .admin-lock {
    bottom: 15px;
    right: 15px;
    width: 44px;
    height: 44px;
    font-size: 22px;
  }
}

/* The main compose box gets more room than the inline reply boxes.
   Unifies the drift where one thread's textarea was larger than the other
   three; reply boxes keep the compact 50px minimum. */
.comment-textarea {
  min-height: 120px;
}
