/* Thread page (resources/views/forum/thread.php): header, moderation bar, post cards.
   Parchment palette shared with boards.css and editor.css. */

.thread-view {
  padding: 4px 0 10px;
  color: #3b2e1a;
  font-family: Arial, Helvetica, sans-serif;
}

.thread-view a {
  color: #063677;
}

.thread-view a:hover {
  color: #0058c6;
}

/* ---------- Header ---------- */
.tv-head {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 0 0 14px;
  border-bottom: 1px solid rgba(160, 110, 40, 0.35);
}

.tv-head__icon {
  flex: none;
  align-self: flex-start;
  border: 1px solid #a57a36;
  border-radius: 4px;
  box-shadow: 0 1px 3px rgba(60, 35, 5, 0.25);
}

.tv-head__intro {
  flex: 1;
  min-width: 0;
}

.thread-view .tv-head__board {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: #8a5a14;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-decoration: none;
  text-transform: uppercase;
}

.thread-view .tv-head__board:hover {
  color: #5c3a08;
}

.thread-view .tv-head__title {
  margin: 3px 0 6px;
  padding: 0;
  background: none;
  color: #660000;
  font: 24px/1.2 Georgia, "Times New Roman", serif;
  overflow-wrap: anywhere;
}

.tv-head__title .thread-tag {
  margin: 0 6px 0 0;
  vertical-align: 4px;
}

.tv-head__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 16px;
  margin: 0;
  padding: 0;
  list-style: none;
  color: #6b5430;
  font-size: 12px;
}

.tv-head__meta li {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.tv-head__meta i {
  color: #a57a36;
}

.tv-head__actions {
  flex: none;
  align-self: center;
}

/* The reply button: replaces images/buttons/post_reply_btn_en.png */
.tv-reply-btn {
  white-space: nowrap;
}

.tv-closed-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 12px;
  border: 1px solid #b5ab98;
  border-radius: 5px;
  background: #ebe4d3;
  color: #6d6555;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

/* ---------- Moderation bar (staff) ---------- */
.tv-staff {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin-top: 12px;
  padding: 7px 10px;
  border: 1px dashed #b8893e;
  border-radius: 6px;
  background: rgba(255, 248, 225, 0.6);
}

.tv-staff__label {
  margin-right: 6px;
  color: #8a5a14;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.tv-staff form {
  margin: 0;
}

.tv-staff__btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  border: 1px solid #c8a46a;
  border-radius: 4px;
  background: #fffaf0;
  color: #4a3010;
  font: 600 12px Arial, sans-serif;
  cursor: pointer;
}

.tv-staff__btn:hover {
  border-color: #a57a36;
  background: #f3e5c2;
}

.tv-staff__btn--danger {
  color: #8f2b1e;
}

.tv-staff__btn--danger:hover {
  border-color: #a3361f;
  background: #fbe9e3;
}

.tv-notice {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 12px 0 0;
  padding: 9px 12px;
  border: 1px solid #c9bea8;
  border-radius: 6px;
  background: #eee6d4;
  color: #5d5444;
  font-size: 13px;
}

.tv-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-top: 12px;
}

.tv-bar--bottom {
  margin-top: 4px;
}

/* ---------- Posts ---------- */
.tv-posts {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-top: 16px;
}

.tpost {
  display: grid;
  grid-template-columns: 170px minmax(0, 1fr);
  overflow: hidden;
  border: 1px solid #c8913a;
  border-radius: 8px;
  background: #fbf5e2;
  box-shadow: 0 1px 3px rgba(80, 50, 10, 0.12);
  scroll-margin-top: 70px;
}

.tpost:target {
  border-color: #0058c6;
  box-shadow: 0 0 0 3px rgba(0, 88, 198, 0.2);
}

.tpost--staff {
  border-color: #8f2b1e;
}

/* author column */
.tpost__author {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 14px 10px;
  border-right: 1px solid #dcc394;
  background: linear-gradient(to bottom, #f3e5bd, #ead6a2);
  text-align: center;
}

.tpost--staff .tpost__author {
  background: linear-gradient(to bottom, #f1dcc6, #e4c3a2);
}

.tpost__outfit {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 76px;
  height: 76px;
  border: 1px solid #b8893e;
  border-radius: 50%;
  background: radial-gradient(circle at 50% 40%, #fffaf0, #e2c98f);
  box-shadow: inset 0 2px 6px rgba(80, 50, 10, 0.25);
}

.tpost__outfit img {
  width: 64px;
  height: 64px;
  image-rendering: pixelated;
}

.tpost__outfit--none {
  color: #a57a36;
  font-size: 30px;
}

.tpost__who {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 3px 5px;
}

.thread-view .tpost__name {
  color: #063677;
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
  overflow-wrap: anywhere;
}

.tpost__flag {
  border-radius: 1px;
}

.tpost__role {
  flex-basis: 100%;
  color: #6b5430;
  font-size: 11px;
  font-weight: 700;
}

.tpost__role--staff {
  flex-basis: auto;
  margin-top: 2px;
  padding: 2px 8px;
  border-radius: 99px;
  background: #8f2b1e;
  color: #fff;
  font-size: 10px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.tpost__role--admin {
  background: linear-gradient(to bottom, #b8893e, #8a5a14);
}

.tpost__stats {
  display: grid;
  gap: 2px;
  width: 100%;
  margin: 2px 0 0;
  font-size: 11px;
}

.tpost__stats div {
  display: flex;
  justify-content: space-between;
  gap: 6px;
  padding: 2px 6px;
  border-radius: 3px;
}

.tpost__stats div:nth-child(odd) {
  background: rgba(255, 255, 255, 0.35);
}

.tpost__stats dt {
  color: #6b5430;
}

.tpost__stats dd {
  margin: 0;
  color: #2b2010;
  font-weight: 700;
  text-align: right;
}

.tpost__voc dd {
  font-weight: 600;
  font-size: 10.5px;
}

.tpost__badge {
  margin-top: 2px;
}

/* message column */
.tpost__main {
  display: flex;
  flex-direction: column;
  min-width: 0;
  padding: 10px 18px 12px;
}

.tpost__head {
  display: flex;
  align-items: center;
  gap: 8px;
  padding-bottom: 8px;
  margin-bottom: 12px;
  border-bottom: 1px solid #e6d3a6;
  color: #8a7350;
  font-size: 12px;
}

.tpost__op {
  padding: 1px 6px;
  border-radius: 3px;
  background: #1b3550;
  color: #fff;
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: 0.05em;
}

.thread-view .tpost__link {
  margin-left: auto;
  color: #8a7350;
  font-weight: 700;
  text-decoration: none;
}

.thread-view .tpost__link:hover {
  color: #063677;
}

.tpost__body {
  flex: 1;
  color: #2b2010;
}

.tpost__edited {
  margin: 10px 0 0;
  color: #8a7350;
  font-size: 11px;
  font-style: italic;
}

.tpost__sig {
  margin-top: 12px;
  padding-top: 8px;
  border-top: 1px dashed #dcc394;
  color: #5c4726;
  font-size: 12px;
}

/* Quote / Edit: replace the old images/buttons/quote.png and the teal edit link */
.tpost__actions {
  display: flex;
  justify-content: flex-end;
  gap: 6px;
  margin-top: 12px;
}

.thread-view .tpost__action {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  border: 1px solid #c8a46a;
  border-radius: 5px;
  background: linear-gradient(to bottom, #fffaf0, #f3e5c2);
  color: #4a3010;
  font-size: 12px;
  font-weight: 700;
  text-decoration: none;
  transition: border-color 0.12s, background 0.12s, color 0.12s;
}

.thread-view .tpost__action:hover {
  border-color: #a57a36;
  background: #ecd49a;
  color: #2e1c08;
}

.thread-view .tpost__action:focus-visible {
  outline: 2px solid #0058c6;
  outline-offset: 1px;
}

.tpost__action i {
  color: #a57a36;
}

/* Logged-out call to action */
.tv-cta {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 16px;
  padding: 14px 16px;
  border: 1px solid #c8913a;
  border-radius: 8px;
  background: linear-gradient(to bottom, #f8f0d4, #f1e3b8);
}

.tv-cta > i {
  color: #a57a36;
  font-size: 26px;
}

.tv-cta div {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 2px;
}

.tv-cta strong {
  color: #660000;
  font: 17px Georgia, "Times New Roman", serif;
}

.tv-cta span {
  color: #5c4726;
  font-size: 12px;
}

@media (max-width: 760px) {
  .tv-head {
    flex-wrap: wrap;
  }

  .tv-head__intro {
    flex: 1 1 calc(100% - 70px);
  }

  .tv-head__actions {
    margin-left: 67px;
  }

  .thread-view .tv-head__title {
    font-size: 20px;
  }

  .tpost {
    grid-template-columns: 1fr;
  }

  .tpost__author {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 2px 12px;
    align-items: center;
    padding: 10px 12px;
    border-right: 0;
    border-bottom: 1px solid #dcc394;
    text-align: left;
  }

  .tpost__outfit {
    grid-row: span 2;
    width: 56px;
    height: 56px;
  }

  .tpost__outfit img {
    width: 48px;
    height: 48px;
  }

  .tpost__who {
    justify-content: flex-start;
  }

  .tpost__role {
    flex-basis: auto;
  }

  .tpost__stats {
    display: flex;
    flex-wrap: wrap;
    gap: 0 10px;
  }

  .tpost__stats div {
    padding: 0;
    background: none !important;
  }

  .tpost__stats .tpost__voc,
  .tpost__badge {
    display: none;
  }

  .tpost__main {
    padding: 10px 12px 12px;
  }

  .tv-cta {
    flex-wrap: wrap;
  }
}
