/*
 * MidSouthBands — Topic page styles
 *
 * Extracted from views-topic-show.php during Cleanup Phase 3.
 * This file owns topic-page-only presentation that does not belong in the
 * global app stylesheet or composer/recruitment component stylesheets.
 */

.moderated-post-placeholder {
  padding: 12px 14px;
  border: 1px solid rgba(255,255,255,.12);
  border-left: 3px solid #ff6671;
  border-radius: 5px;
  background: rgba(255,255,255,.035);
  font-size: .88rem;
  opacity: .82;
}

.topic-state-row {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-top: 7px;
}

.topic-state-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 8px;
  border-radius: 4px;
  font-size: .68rem;
  font-weight: 900;
  letter-spacing: .08em;
}

.topic-state-badge.pinned {
  border: 1px solid rgba(255,214,92,.42);
  background: rgba(255,214,92,.07);
}

.topic-state-badge.locked {
  border: 1px solid rgba(255,102,113,.46);
  background: rgba(255,102,113,.08);
}

.topic-moderator-panel {
  flex: 0 0 auto;
  min-width: 226px;
  max-width: 350px;
  padding: 8px 9px 9px;
  border: 1px solid rgba(7,26,43,.18);
  border-radius: 7px;
  background: rgba(7,26,43,.035);
}

.topic-moderator-label {
  display: block;
  margin: 0 0 6px;
  font-size: .62rem;
  font-weight: 900;
  letter-spacing: .11em;
  color: var(--muted);
}

.topic-moderator-controls {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 6px;
  flex-wrap: wrap;
}

.topic-moderator-controls .inline-form {
  margin: 0;
}

.topic-moderator-controls .inline-form .btn {
  width: 102px;
  min-height: 31px;
  padding: 6px 9px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  white-space: nowrap;
  line-height: 1;
  font-size: .74rem;
}

.topic-move-control {
  position: relative;
  margin: 0;
}

.topic-move-control>summary {
  list-style: none;
  width: 102px;
  min-height: 31px;
  padding: 6px 9px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  white-space: nowrap;
  line-height: 1;
  font-size: .74rem;
  user-select: none;
}

.topic-move-control>summary::-webkit-details-marker {
  display: none;
}

.topic-move-control[open]>summary {
  margin-bottom: 7px;
}

.topic-move-form {
  flex: 1 0 100%;
  width: 100%;
  padding-top: 7px;
  border-top: 1px solid rgba(7,26,43,.12);
}

.topic-move-form label {
  margin: 0 0 4px;
  font-size: .68rem;
}

.topic-move-form select {
  width: 100%;
  min-height: 32px;
  padding: 5px 7px;
  border: 1px solid #bdc8d0;
  border-radius: 6px;
  background: #fff;
  color: var(--ink);
  font-size: .74rem;
}

.topic-move-actions {
  display: flex;
  justify-content: flex-end;
  gap: 6px;
  margin-top: 6px;
}

.topic-move-actions .btn {
  width: auto !important;
  min-width: 72px;
}

.topic-locked-notice {
  margin-top: 5px;
  font-size: .82rem;
  opacity: .78;
}

@media (max-width:700px) {
  .topic-page-heading {
    align-items: flex-start;
  }

  .topic-moderator-panel {
    width: 100%;
    max-width: none;
    margin-top: 7px;
  }

  .topic-moderator-controls {
    justify-content: flex-start;
    width: 100%;
  }
}

/* Phase 3a — portrait moderator controls containment */
@media(max-width:700px){
  .topic-page-heading{
    display:block;
  }

  .topic-page-heading > div{
    min-width:0;
  }

  .topic-moderator-panel{
    width:100%;
    max-width:100%;
    min-width:0;
    margin-top:10px;
    box-sizing:border-box;
  }

  .topic-moderator-controls{
    width:100%;
    display:flex;
    flex-wrap:wrap;
    gap:6px;
  }

  .topic-moderator-controls .inline-form,
  .topic-move-control{
    flex:1 1 96px;
    min-width:0;
  }

  .topic-moderator-controls .inline-form .btn,
  .topic-move-control > summary{
    width:100%;
    min-width:0;
    box-sizing:border-box;
  }

  .topic-move-form{
    width:100%;
    box-sizing:border-box;
  }
}



/* Member content deletion */
.topic-author-delete-panel {
  display: flex;
  justify-content: flex-end;
  margin-left: auto;
}

.topic-contact-moderator[disabled] {
  cursor: not-allowed;
  opacity: .72;
}

.post-delete-form {
  display: inline-flex;
}

.post-delete-button {
  border: 0;
  background: transparent;
  color: #9b1c28;
  cursor: pointer;
  font: inherit;
  font-size: .74rem;
  font-weight: 800;
  padding: 3px 5px;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.post-delete-button:hover {
  text-decoration-thickness: 2px;
}

.post-delete-button:active {
  transform: translateY(1px);
}

@media(max-width:700px) {
  .topic-author-delete-panel {
    justify-content: flex-start;
    width: 100%;
    margin: 8px 0 0;
  }

  .topic-author-delete-panel .btn {
    width: 100%;
  }
}


/* Contextual navigation for topic pages. */
.topic-back-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  font-family: inherit;
  font-size: .9rem;
  line-height: 1.2;
}

.topic-back-link-top {
  margin: 0 0 14px;
}

.topic-back-link-floating {
  position: fixed;
  z-index: 1000;
  right: max(4%, calc((100vw - 1180px) / 2));
  bottom: 18px;
  box-shadow: 0 4px 14px rgba(7, 26, 43, .28);
}

.topic-back-link-floating[hidden] {
  display: none;
}

@media (max-width: 700px) {
  .topic-back-link-floating {
    right: 16px;
    bottom: 16px;
  }
}


/* Keep the conditional lower Back control in the topic flow. */
.topic-back-link-floating {
  position: static;
  margin-top: 18px;
  box-shadow: none;
}
