/* ================================
   THREAD VIEW
================================ */

.thread-view {
  width: min(760px, 100%);
  margin: 0 auto;
  padding: 28px 24px 40px;
  min-height: 100%;
  color: var(--text);
  background: transparent;
}

.thread-view .location-title {
  margin-bottom: 18px;
  text-align: center;
}

.thread-view .location-path {
  margin: 0 0 6px;
  font-size: 0.62rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #8c78ba;
}

.thread-view .location-path .path-dim {
  color: rgba(140, 120, 186, 0.58);
}

.thread-view .location-name {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.55rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: rgba(243, 238, 248, 0.94);
}

.thread-view .thread-separator {
  border: 0;
  height: 1px;
  background: rgba(197, 167, 255, 0.08);
  margin: 0 0 20px;
}

.thread-view .btn-row {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  margin-bottom: 24px;
}

.thread-view .btn-row .sidebar-button {
  display: inline-flex;
  width: auto;
  min-width: 0;
  align-items: center;
  justify-content: center;
  padding: 10px 22px;
  background: var(--accent-soft);
  border: 1px solid rgba(197, 167, 255, 0.12);
  border-radius: 999px;
  color: var(--muted);
  text-align: center;
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background 160ms ease, border-color 160ms ease, box-shadow 160ms ease, color 160ms ease;
}

.thread-view .btn-row .sidebar-button:hover {
  background: rgba(197, 167, 255, 0.12);
  border-color: rgba(197, 167, 255, 0.16);
  box-shadow: 0 0 14px rgba(197, 167, 255, 0.06);
  color: var(--text);
  text-shadow: none;
}

.thread-view .btn-row .sidebar-button.primary {
  padding-inline: 20px;
}

.thread-view .posts-container {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.thread-view .forum-post {
  display: grid;
  grid-template-columns: 160px minmax(0, 1fr);
  gap: 16px;
  padding: 16px 18px;
  border-radius: 16px;
  background: rgba(18, 16, 24, 0.72);
  border: 1px solid rgba(197, 167, 255, 0.08);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.02);
}

.thread-view .post-side {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.thread-view .post-author {
  color: var(--accent);
  font-size: 0.82rem;
  margin-bottom: 8px;
}

.thread-view .post-avatar {
  width: 80px;
  height: 80px;
  border-radius: 10px;
  margin-bottom: 8px;
  background: rgba(197, 167, 255, 0.08);
  border: 1px solid rgba(197, 167, 255, 0.12);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.02);
}

.thread-view .post-role {
  color: rgba(243, 238, 248, 0.52);
  font-size: 0.64rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.thread-view .post-main {
  min-width: 0;
}

.thread-view .post-topbar {
  margin-bottom: 10px;
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(197, 167, 255, 0.08);
}

.thread-view .post-date {
  display: inline-block;
  text-align: right;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.68rem;
  line-height: 1.2;
  color: rgba(243, 238, 248, 0.58);
  white-space: nowrap;
}

.thread-view .date-separator {
  display: inline-block;
  margin: 0 2px;
  font-size: 0.48rem;
  color: rgba(243, 238, 248, 0.28);
  vertical-align: middle;
}

.thread-view .post-content {
  color: rgba(243, 238, 248, 0.78);
  font-size: 0.78rem;
  line-height: 1.55;
}

.thread-view .post-content p {
  margin: 0 0 10px;
}

.thread-view .post-content p:last-child {
  margin-bottom: 0;
}

.thread-view .post-content strong {
  color: rgba(243, 238, 248, 0.90);
  font-weight: 600;
}

@media (max-width: 820px) {
  .thread-view {
    padding: 24px 10px 30px;
  }

  .thread-view .forum-post {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .thread-view .post-side {
    text-align: left;
    align-items: flex-start;
  }
}

/* ================================
   REPLY BOX
================================ */

.thread-view .reply-box {
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.25s ease, transform 0.25s ease;
  display: none;
  margin-top: 20px;
}

.thread-view .reply-box.active {
  display: block;
  opacity: 1;
  transform: translateY(0);
}

.thread-view .reply-inner {
  width: 80%;
  margin: 0 auto;
}

.thread-view .reply-header {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 0.95rem;
  font-weight: 400;
  text-transform: uppercase;
  color: rgba(243, 238, 248, 0.72);
  margin-bottom: 5px;
  margin-left: 10px;
}

.thread-view .reply-textarea {
  width: 100%;
  min-height: 90px;
  resize: vertical;

  display: block;

  padding: 12px;
  border-radius: 10px;

  background: rgba(18, 16, 24, 0.72);
  border: 1px solid rgba(197, 167, 255, 0.08);

  color: rgba(243, 238, 248, 0.85);
  font-size: 0.75rem;
  line-height: 1.5;

  outline: none;
  -webkit-appearance: none;
  appearance: none;
}

.thread-view .reply-textarea:focus,
.thread-view .reply-textarea:focus-visible {
  border-color: rgba(197, 167, 255, 0.18);
  box-shadow: 0 0 10px rgba(197, 167, 255, 0.08);
}

.thread-view .reply-actions {
  margin-top: 10px;
  display: flex;
  justify-content: flex-end;
}

.thread-view .reply-actions .sidebar-button {
  width: auto;
  padding: 8px 16px;

  background: rgba(30, 26, 38, 0.7);
  border: 1px solid rgba(197, 167, 255, 0.18);
  border-radius: 999px;

  font-size: 0.72rem;
  letter-spacing: 0.08em;

  color: var(--muted);

  transition: all 0.15s ease;
}

.thread-view .reply-actions .sidebar-button:hover {
  background: rgba(197, 167, 255, 0.12);
  border-color: rgba(197, 167, 255, 0.28);
  color: var(--text);
}
