/* ===== Mafia Scene - Topics (single forum) ===== */

#bbpress-forums{
  background: transparent;
}

.ms-topic-wrap{
  max-width: 1400px;
  margin: 0 auto;
  padding: 22px 18px 60px;
}

/* Forum header card */
.ms-forum-head{
  background: var(--ms-surface);
  border: 1px solid var(--ms-border);
  border-radius: var(--ms-radius);
  box-shadow: var(--ms-shadow);
  padding: 18px 18px 14px;
  margin-bottom: 14px;
}

.ms-forum-head__title{
  margin: 0 0 6px;
  font-size: 22px;
  color: var(--ms-maroon);
  font-weight: 700;
}

.ms-forum-head__desc{
  margin: 0;
  color: var(--ms-muted);
  font-size: 14px;
}

/* “Toolbar” row */
.ms-topic-toolbar{
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  margin: 12px 0 10px;
  flex-wrap: wrap;
}

.ms-topic-toolbar .bbp-breadcrumb{
  margin: 0;
  font-size: 13px;
  opacity: .8;
}

.ms-topic-toolbar .bbp-pagination{
  margin: 0;
}

/* Hide the default bbPress header/footer row labels */
#bbpress-forums .bbp-header,
#bbpress-forums .bbp-footer{
  display: none;
}

/* Topic list container */
.ms-topic-list{
  background: var(--ms-surface);
  border: 1px solid var(--ms-border);
  border-radius: var(--ms-radius);
  box-shadow: var(--ms-shadow);
  overflow: hidden;
}

/* Each topic row becomes a modern card-row */
.ms-topic-row{
  display: grid;
  grid-template-columns: 1fr 220px;
  gap: 14px;
  padding: 14px 16px;
  border-top: 1px solid var(--ms-border);
  align-items: center;
}

.ms-topic-row:first-child{
  border-top: 0;
}

@media (max-width: 820px){
  .ms-topic-row{
    grid-template-columns: 1fr;
  }
}

.ms-topic-main{
  min-width: 0;
}

.ms-topic-title{
  margin: 0 0 6px;
  font-size: 15px;
  font-weight: 700;
  line-height: 1.25;
}

.ms-topic-title a{
  color: var(--ms-maroon);
  text-decoration: none;
}
.ms-topic-title a:hover{
  text-decoration: underline;
}

.ms-topic-meta{
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  font-size: 12px;
  color: var(--ms-muted);
}

.ms-topic-badges{
  display: inline-flex;
  gap: 8px;
  margin-right: 8px;
}

.ms-badge{
  display: inline-flex;
  align-items: center;
  padding: 4px 8px;
  border-radius: 999px;
  font-size: 11px;
  border: 1px solid var(--ms-border);
  background: rgba(255,255,255,.4);
  color: var(--ms-maroon);
}

/* Last post block */
.ms-topic-last{
  background: rgba(255,255,255,.28);
  border: 1px solid var(--ms-border);
  border-radius: 12px;
  padding: 10px 12px;
  font-size: 12px;
  color: var(--ms-muted);
}

.ms-topic-last strong{
  display: block;
  font-size: 12px;
  color: rgba(0,0,0,.7);
  margin-bottom: 4px;
}

/* Pagination spacing */
.bbp-pagination{
  padding: 0;
}

/* Composer: make the new topic form a collapsible-looking card */
#bbpress-forums div.bbp-topic-form{
  margin-top: 16px;
  background: var(--ms-surface);
  border: 1px solid var(--ms-border);
  border-radius: var(--ms-radius);
  box-shadow: var(--ms-shadow);
  padding: 14px 14px 8px;
}

#bbpress-forums fieldset.bbp-form{
  border: 0;
  padding: 0;
}

#bbpress-forums legend{
  background: var(--ms-maroon);
  color: #fff;
  padding: 10px 12px;
  border-radius: 12px;
  font-weight: 700;
  margin-bottom: 12px;
}

/* Make submit button match */
#bbpress-forums .bbp-submit-wrapper button{
  background: var(--ms-maroon);
  border: 0;
  border-radius: 10px;
  padding: 10px 18px;
  color: #fff;
  font-weight: 700;
}
#bbpress-forums .bbp-submit-wrapper button:hover{
  opacity: .92;
}

/* Compose button */
.ms-compose-actions{
  display:flex;
  gap:10px;
  align-items:center;
  flex-wrap:wrap;
}

.ms-compose-btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  padding: 9px 14px;
  border-radius: 12px;
  font-weight: 900;
  text-decoration:none;
  background: var(--ms-maroon);
  color: #fff;
  border: 1px solid rgba(0,0,0,.08);
}
.ms-compose-btn:hover{ opacity:.92; }

/* Collapse behavior */
#bbpress-forums .bbp-topic-form.ms-form-collapsed,
#bbpress-forums .bbp-reply-form.ms-form-collapsed{
  max-height: 64px;
  overflow: hidden;
  position: relative;
}

#bbpress-forums .bbp-topic-form.ms-form-collapsed:after,
#bbpress-forums .bbp-reply-form.ms-form-collapsed:after{
  content:"";
  position:absolute;
  left:0; right:0; bottom:0;
  height: 44px;
  background: linear-gradient(to bottom, rgba(255,255,255,0), rgba(255,255,255,.9));
}

/* Cancel link in legend */
#bbpress-forums legend{
  position: relative;
}
#bbpress-forums .ms-form-cancel{
  float: right;
  font-weight: 800;
  font-size: 12px;
  color: rgba(255,255,255,.9);
  text-decoration: none;
  margin-top: 2px;
}
#bbpress-forums .ms-form-cancel:hover{
  text-decoration: underline;
}

/* Collapse topic composer by default */
#bbpress-forums .bbp-topic-form.ms-form-collapsed {
  max-height: 110px;
  overflow: hidden;
  position: relative;
}

/* Gradient fade hint */
#bbpress-forums .bbp-topic-form.ms-form-collapsed::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 60px;
  background: linear-gradient(
    to bottom,
    rgba(255,255,255,0),
    rgba(255,252,230,0.95)
  );
}

/* Inline mod actions (admin/mod tools) */
.ms-inline-actions{
  margin: 10px 0 12px;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.ms-inline-action a{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid var(--ms-border);
  background: rgba(255,255,255,.38);
  font-weight: 900;
  font-size: 12px;
  text-decoration: none;
  color: var(--ms-maroon);
}

.ms-inline-action a:hover{
  background: rgba(112,0,0,.08);
}

.ms-inline-action--danger a{
  color: #700000;
  border-color: rgba(112,0,0,.25);
  background: rgba(112,0,0,.06);
}

.ms-inline-action--danger a:hover{
  background: rgba(112,0,0,.12);
}

.ms-topic-inline-actions{
  margin-top: 6px;
  display:flex;
  gap:8px;
  flex-wrap:wrap;
}

.ms-inline-actions{
  margin: 10px 0 0;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.ms-inline-action a{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid var(--ms-border);
  background: rgba(255,255,255,.38);
  font-weight: 900;
  font-size: 12px;
  text-decoration: none;
  color: var(--ms-maroon);
}

.ms-inline-action a:hover{
  background: rgba(112,0,0,.08);
}

.ms-inline-action--danger a{
  color: #700000;
  border-color: rgba(112,0,0,.25);
  background: rgba(112,0,0,.06);
}

.ms-inline-action--danger a:hover{
  background: rgba(112,0,0,.12);
}
