/* forums/assets/forum.css */
.forum-wrap{ max-width: 90%; margin: 0 auto; }

.banner{ width:100%; display:block; border-radius:10px; margin: 14px auto 16px; box-shadow:0 6px 14px rgba(0,0,0,0.5); }

.forum-card{
  background: rgba(30, 30, 30, 0.9);
  border: 1px solid rgba(255, 140, 0, 0.5);
  border-radius: 10px;
  padding: 16px;
  box-shadow: 0 4px 8px rgba(255, 140, 0, 0.25);
  margin: 16px 0;
}

.forum-row{ display:flex; gap:12px; align-items:center; justify-content:space-between; flex-wrap:wrap; }

.forum-btn{
  background: rgba(255, 140, 0, 0.9);
  border: none;
  padding: 10px 14px;
  color: #fff;
  font-weight: bold;
  cursor: pointer;
  border-radius: 8px;
  text-decoration:none;
  display:inline-block;
}
.forum-btn:hover{ background: rgba(255, 100, 0, 0.9); }

.forum-input, .forum-select, .forum-textarea{
  width: 100%;
  padding: 10px;
  border-radius: 8px;
  border: 1px solid rgba(255,255,255,0.2);
  background: rgba(10,10,10,0.6);
  color: #e0e0e0;
  box-sizing:border-box;
}

.forum-textarea{ min-height: 220px; }

.post{ border-top: 1px solid rgba(255,255,255,0.15); padding-top: 14px; margin-top: 14px; }

.post-meta{
  display:flex; justify-content:space-between; gap:12px; flex-wrap:wrap;
  font-size: 0.9em; color:#bdbdbd;
}

.post a.permalink{ color:#ff8c00; text-decoration:none; }
.post a.permalink:hover{ text-decoration:underline; }

code{ color:#ffb74d; }

.editor-toolbar{
  display:flex; flex-wrap:wrap; gap:6px;
  padding: 10px; border-radius:10px;
  background: rgba(0,0,0,0.35);
  border: 1px solid rgba(255,140,0,0.35);
  margin-bottom: 10px;
}
.editor-toolbar button{
  background: rgba(50,50,50,0.9);
  color:#e0e0e0;
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: 8px;
  padding: 8px 10px;
  cursor:pointer;
}
.editor-toolbar button:hover{ background: rgba(255,140,0,0.85); color:#fff; }

.notice{
  color:#bdbdbd;
  font-size:0.95em;
}

/* Threads list (category cards on index) */
/* Keeps each category to ~5 visible items, with a nice scroll for more */
.thread-list{
  max-height: 22rem; /* tuned to roughly 5 items */
  overflow-y: auto;
  padding-right: 6px;
  overscroll-behavior: auto; /* allow scroll to propagate to page when reaching ends */
}

.thread-list-ul{ list-style:none; padding:0; margin:10px 0 0; }

.thread-list-item{
  padding: 10px;
  border-top: 1px solid rgba(255,255,255,0.12);
}

.thread-link{
  color:#e0e0e0;
  text-decoration:none;
  font-weight:bold;
}
.thread-link:hover{ text-decoration: underline; }

.thread-meta{
  color:#bdbdbd;
  font-size:0.9em;
  margin-top: 2px;
}

/* Subtle scrollbar styling */
.thread-list::-webkit-scrollbar{ width: 10px; }
.thread-list::-webkit-scrollbar-track{ background: rgba(255,255,255,0.06); border-radius: 999px; }
.thread-list::-webkit-scrollbar-thumb{ background: rgba(255,140,0,0.35); border-radius: 999px; }
.thread-list::-webkit-scrollbar-thumb:hover{ background: rgba(255,140,0,0.55); }

/* News list scrolling + pagination */
.news-list{
  max-height: 65vh;
  overflow-y: auto;
  padding-right: 6px;
}

.news-pagination{
  display:flex;
  gap:8px;
  justify-content:center;
  align-items:center;
  flex-wrap:wrap;
  margin: 14px 0 24px;
}

.page-pill{
  display:inline-block;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(50,50,50,0.9);
  border: 1px solid rgba(255,255,255,0.15);
  color:#e0e0e0;
  text-decoration:none;
  font-weight:bold;
}
.page-pill:hover{ background: rgba(255,140,0,0.85); color:#fff; }
.page-pill.active{
  background: rgba(255,140,0,0.95);
  color:#fff;
  border-color: rgba(255,140,0,0.6);
}

.readmore-btn{
  display:inline-block;
  margin-top: 10px;
  padding: 9px 12px;
  border-radius: 10px;
  background: rgba(255,140,0,0.9);
  color:#fff;
  text-decoration:none;
  font-weight:bold;
}
.readmore-btn:hover{ background: rgba(255,100,0,0.9); }

/* --- Global search (threads + posts) --- */
.forum-wrap .forum-searchbar{
  position: relative !important;
  margin: 12px auto 18px !important;
  max-width: 820px;
  padding: 0 10px;
  box-sizing: border-box;
}

.forum-wrap .forum-searchbar input{
  width: 100%;
  border-radius: 999px;
  padding: 12px 14px;
  border: 1px solid rgba(255,255,255,0.18);
  background: rgba(0,0,0,0.35);
  color: #e0e0e0;
}

.forum-wrap .forum-search-results{
  position: absolute;
  top: calc(100% + 8px);
  left: 10px;
  right: 10px;
  z-index: 999;
  border-radius: 12px;
  overflow: hidden;
  background: rgba(0,0,0,0.92);
  border: 1px solid rgba(255,140,0,0.45);
  box-shadow: 0 10px 22px rgba(0,0,0,0.55);
  display: none;
}

.forum-wrap .forum-search-results.open{ display:block; }

.fs-empty{
  padding: 12px 14px;
  color: #bdbdbd;
}

.fs-item{
  display:block;
  padding: 12px 14px;
  text-decoration:none;
  color:#e0e0e0;
  border-top: 1px solid rgba(255,255,255,0.08);
}
.fs-item:first-child{ border-top: none; }
.fs-item:hover, .fs-item.active{
  background: rgba(255,140,0,0.18);
}

.fs-top{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap: 10px;
}

.fs-title{
  font-weight:bold;
  overflow:hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.fs-tag{
  flex: 0 0 auto;
  font-size: 0.82em;
  color:#ffb74d;
  background: rgba(255,140,0,0.16);
  border: 1px solid rgba(255,140,0,0.25);
  padding: 2px 8px;
  border-radius: 999px;
}

.fs-snippet{
  margin-top: 6px;
  font-size: 0.92em;
  color:#bdbdbd;
  line-height: 1.25em;
  max-height: 2.5em;
  overflow:hidden;
}

@media (max-width: 720px){
  .forum-wrap{ max-width: 96%; }
  .thread-list{ max-height: 18rem; }
  .fs-title{ max-width: 70%; }
}


/* Visibility fixes */
.forum-wrap{
  color: #e6e6e6;
}

.forum-card{
  color: #e6e6e6;
  background: rgba(24, 24, 24, 0.94);
}

.forum-card,
.forum-card p,
.forum-card div,
.forum-card li,
.forum-card span,
.forum-card label,
.forum-card strong,
.forum-card em{
  color: inherit;
}

.forum-card h1,
.forum-card h2,
.forum-card h3,
.forum-card h4{
  color: #f1f1f1;
}

.forum-card a{
  color: #ffd08a;
}

.forum-card a.thread-link,
.forum-card a.readmore-btn,
.forum-card a.forum-btn,
.forum-card a.page-pill,
.forum-card h3 a,
.forum-card .permalink{
  color: inherit;
}

.notice,
.thread-meta,
.post-meta,
.fs-empty,
.fs-snippet{
  color: #d0d0d0;
}

.forum-wrap .forum-searchbar input{
  background: rgba(20,20,20,0.72);
  color: #f0f0f0;
  border-color: rgba(255,255,255,0.24);
  box-shadow: 0 4px 14px rgba(0,0,0,0.22);
}

.forum-wrap .forum-searchbar input::placeholder{
  color: rgba(255,255,255,0.72);
}

.forum-wrap .forum-searchbar input::-webkit-input-placeholder{
  color: rgba(255,255,255,0.72);
}

.forum-wrap .forum-searchbar input::-moz-placeholder{
  color: rgba(255,255,255,0.72);
  opacity: 1;
}

.forum-wrap .forum-searchbar input:-ms-input-placeholder{
  color: rgba(255,255,255,0.72);
}

.forum-wrap .forum-searchbar input:focus{
  outline: none;
  border-color: rgba(255,140,0,0.65);
  background: rgba(24,24,24,0.84);
}
