/* ══════════════════════════════════════════════════
   IronLabs Tech — community.css  v4.0
   Full redesign: hub cards, thread list, post view
══════════════════════════════════════════════════ */

/* ── GLOBAL RESET ─────────────────────────────── */
#bbpress-forums, #bbpress-forums * { box-sizing: border-box; }

/* Kill site-wide red dot bullet on ALL bbPress li */
#bbpress-forums li::before,
#bbpress-forums li::after { display: none !important; content: none !important; }

/* Kill white backgrounds from bbpress.min.css */
#bbpress-forums .hentry,
#bbpress-forums ul.odd, #bbpress-forums ul.even,
#bbpress-forums div.odd, #bbpress-forums div.even,
#bbpress-forums li.bbp-footer, #bbpress-forums li.bbp-header,
#bbpress-forums div.bbp-forum-header,
#bbpress-forums div.bbp-reply-header,
#bbpress-forums div.bbp-topic-header {
  background: transparent !important;
  background-color: transparent !important;
}

/* Hide bbPress breadcrumb (we have the WP one above) */
#bbpress-forums .bbp-breadcrumb { display: none; }

/* ══════════════════════════════════════════════
   1. FORUM INDEX — card grid (JS rewrites HTML)
══════════════════════════════════════════════ */

.il-ch-hero {
  padding: 56px 0 44px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 44px;
}
.il-ch-label {
  font-family: 'Orbitron', monospace;
  font-size: 9px;
  letter-spacing: .22em;
  color: var(--red);
  text-transform: uppercase;
  display: block;
  margin-bottom: 14px;
}
.il-ch-title {
  font-family: 'Orbitron', monospace;
  font-size: clamp(26px, 5vw, 50px);
  font-weight: 700;
  color: #fff;
  letter-spacing: .08em;
  margin: 0 0 14px;
  line-height: 1;
}
.il-ch-cursor { color: var(--amber); animation: il-blink .9s step-end infinite; }
@keyframes il-blink { 50% { opacity: 0; } }
.il-ch-sub {
  font-size: 14px;
  color: rgba(255,255,255,.5);
  max-width: 520px;
  line-height: 1.65;
  margin: 0;
}

.il-fc-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(270px, 1fr));
  gap: 14px;
  margin-bottom: 48px;
}
.il-fc {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 26px 26px 20px;
  border: 1px solid var(--border);
  background: rgba(255,34,0,.02);
  text-decoration: none;
  position: relative;
  overflow: hidden;
  transition: border-color .25s, background .25s, transform .2s;
}
.il-fc::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(to right, var(--red), var(--amber));
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .3s;
}
.il-fc:hover { border-color: rgba(255,179,0,.28); background: rgba(255,34,0,.05); transform: translateY(-2px); }
.il-fc:hover::before { transform: scaleX(1); }
.il-fc-tag {
  font-family: 'Orbitron', monospace;
  font-size: 8px;
  letter-spacing: .25em;
  color: var(--red);
  border: 1px solid var(--red);
  padding: 2px 8px;
  align-self: flex-start;
}
.il-fc-name {
  font-family: 'Orbitron', monospace;
  font-size: 13px;
  font-weight: 700;
  color: #fff;
  letter-spacing: .05em;
}
.il-fc-desc {
  font-size: 12px;
  color: rgba(255,255,255,.42);
  line-height: 1.55;
  flex: 1;
}
.il-fc-stats {
  display: flex;
  gap: 16px;
  font-family: 'Orbitron', monospace;
  font-size: 9px;
  letter-spacing: .12em;
  color: rgba(255,179,0,.55);
  padding-top: 10px;
  border-top: 1px solid var(--border);
}

/* ══════════════════════════════════════════════
   2. FORUM TOPIC LIST — thread rows (JS rewrites)
══════════════════════════════════════════════ */

.il-tl-wrap { margin-bottom: 32px; }

.il-tl-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 0 14px;
  margin-bottom: 4px;
  border-bottom: 1px solid var(--border);
}
.il-tl-header-title {
  font-family: 'Orbitron', monospace;
  font-size: 9px;
  letter-spacing: .2em;
  color: rgba(255,255,255,.35);
}
.il-tl-header-count {
  font-family: 'Orbitron', monospace;
  font-size: 9px;
  letter-spacing: .15em;
  color: var(--red);
}
.il-tl-row {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 15px 20px;
  border: 1px solid var(--border);
  border-top: none;
  text-decoration: none;
  transition: background .2s, border-color .2s;
  position: relative;
}
.il-tl-row:first-of-type { border-top: 1px solid var(--border); }
.il-tl-row::before {
  content: '';
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 2px;
  background: var(--red);
  transform: scaleY(0);
  transform-origin: center;
  transition: transform .25s;
}
.il-tl-row:hover { background: rgba(255,34,0,.04); border-color: rgba(255,179,0,.18); }
.il-tl-row:hover::before { transform: scaleY(1); }
.il-tl-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.il-tl-title {
  font-size: 14px;
  font-weight: 600;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  letter-spacing: .01em;
  transition: color .2s;
}
.il-tl-row:hover .il-tl-title { color: rgba(255,255,255,.85); }
.il-tl-meta { font-size: 11px; color: rgba(255,255,255,.3); }
.il-tl-meta strong { color: rgba(255,179,0,.65); font-weight: 500; }
.il-tl-stats { flex: 0 0 auto; display: flex; gap: 10px; }
.il-tl-stat {
  display: flex;
  align-items: center;
  gap: 5px;
  font-family: 'Orbitron', monospace;
  font-size: 9px;
  letter-spacing: .08em;
  color: rgba(255,255,255,.25);
  padding: 4px 10px;
  border: 1px solid var(--border);
}

/* ── BBPRESS INFO/NOTICE BOX ─────────────────── */
#bbpress-forums .bbp-template-notice {
  border: 1px solid rgba(255,255,255,.07) !important;
  background: rgba(255,255,255,.02) !important;
  padding: 14px 18px !important;
  margin-bottom: 20px !important;
  border-radius: 0 !important;
  list-style: none !important;
}
#bbpress-forums .bbp-template-notice li {
  color: rgba(255,255,255,.4) !important;
  font-size: 12px !important;
}
#bbpress-forums .bbp-template-notice li a { color: var(--amber) !important; }
#bbpress-forums .bbp-template-notice.info {
  border-color: rgba(255,179,0,.15) !important;
  background: rgba(255,179,0,.03) !important;
}
#bbpress-forums .bbp-template-notice.info li {
  color: rgba(255,179,0,.55) !important;
}

/* Subscribe toggle */
#bbpress-forums #subscription-toggle { float: right; margin-bottom: 10px; }
#bbpress-forums #favorite-toggle { float: right; margin-bottom: 10px; margin-right: 4px; }
#bbpress-forums .subscription-toggle,
#bbpress-forums .favorite-toggle {
  font-family: 'Orbitron', monospace;
  font-size: 8px;
  letter-spacing: .2em;
  color: rgba(255,255,255,.28) !important;
  border: 1px solid var(--border);
  padding: 4px 10px;
  text-decoration: none !important;
  transition: color .2s, border-color .2s;
  display: inline-block;
}
#bbpress-forums .subscription-toggle:hover,
#bbpress-forums .favorite-toggle:hover {
  color: var(--amber) !important;
  border-color: rgba(255,179,0,.3);
}

/* Pagination count text */
#bbpress-forums .bbp-pagination { display: flex; align-items: center; justify-content: space-between; padding: 14px 0; border-top: 1px solid var(--border); margin-top: 20px; }
#bbpress-forums .bbp-pagination-count {
  font-family: 'Orbitron', monospace;
  font-size: 9px;
  letter-spacing: .12em;
  color: rgba(255,255,255,.28);
}
#bbpress-forums .bbp-pagination-links a,
#bbpress-forums .bbp-pagination-links span {
  font-family: 'Orbitron', monospace;
  font-size: 9px;
  padding: 4px 10px;
  border: 1px solid var(--border);
  color: rgba(255,255,255,.35);
  text-decoration: none;
  margin: 0 2px;
  transition: color .2s, border-color .2s;
  display: inline-block;
}
#bbpress-forums .bbp-pagination-links a:hover { color: var(--amber); border-color: rgba(255,179,0,.3); }
#bbpress-forums .bbp-pagination-links .current { background: rgba(255,34,0,.08); border-color: rgba(255,34,0,.3); color: var(--red); }

/* ══════════════════════════════════════════════
   3. SINGLE TOPIC VIEW — post cards
══════════════════════════════════════════════ */

/* Hide column header row (Author | Posts) */
#bbpress-forums ul.bbp-replies > li.bbp-header { display: none !important; }
#bbpress-forums ul.bbp-replies > li.bbp-footer { display: none !important; }

#bbpress-forums ul.bbp-replies,
#bbpress-forums ul.bbp-replies > li.bbp-body,
#bbpress-forums ul.bbp-replies .bbp-replies-list {
  list-style: none !important;
  padding: 0 !important;
  margin: 0 !important;
}
#bbpress-forums ul.bbp-replies .bbp-replies-list {
  display: flex !important;
  flex-direction: column !important;
  gap: 14px !important;
}

/* Each post card — li is flex column, .hentry inside is the grid */
#bbpress-forums ul.bbp-replies .bbp-replies-list > li {
  display: flex !important;
  flex-direction: column !important;
  border: 1px solid var(--border) !important;
  background: rgba(255,255,255,.015) !important;
  position: relative !important;
  overflow: hidden !important;
}
/* Top accent line */
#bbpress-forums ul.bbp-replies .bbp-replies-list > li::before {
  content: '' !important;
  display: block !important;
  position: absolute !important;
  top: 0; left: 0; right: 0 !important;
  height: 1px !important;
  background: linear-gradient(to right, var(--red), transparent 60%) !important;
}
/* .hentry wrapper inside each li: author left | content right */
#bbpress-forums ul.bbp-replies .bbp-replies-list > li > .hentry {
  display: grid !important;
  grid-template-columns: 130px 1fr !important;
  flex: 1 !important;
}

/* Post header (date + admin links) — full width row */
#bbpress-forums .bbp-reply-header {
  grid-column: 1 / -1 !important;
  display: flex !important;
  align-items: center !important;
  padding: 9px 18px !important;
  border-bottom: 1px solid var(--border) !important;
  background: rgba(255,255,255,.02) !important;
  gap: 10px !important;
}
#bbpress-forums .bbp-meta {
  display: flex !important;
  align-items: center !important;
  gap: 10px !important;
  width: 100% !important;
}
#bbpress-forums .bbp-reply-post-date {
  font-family: 'Orbitron', monospace !important;
  font-size: 9px !important;
  letter-spacing: .1em !important;
  color: rgba(255,255,255,.28) !important;
}
#bbpress-forums .bbp-reply-permalink {
  font-family: 'Orbitron', monospace !important;
  font-size: 9px !important;
  letter-spacing: .1em !important;
  color: rgba(255,34,0,.4) !important;
  text-decoration: none !important;
}
#bbpress-forums .bbp-admin-links {
  margin-left: auto !important;
  display: flex !important;
  align-items: center !important;
  flex-wrap: wrap !important;
  gap: 2px !important;
}
#bbpress-forums .bbp-admin-links a {
  font-size: 9px !important;
  color: rgba(255,255,255,.2) !important;
  text-decoration: none !important;
  padding: 2px 6px !important;
  letter-spacing: .06em !important;
  border: 1px solid rgba(255,255,255,.06) !important;
  transition: color .2s, border-color .2s !important;
}
#bbpress-forums .bbp-admin-links a:hover { color: var(--amber) !important; border-color: rgba(255,179,0,.3) !important; }

/* Author sidebar */
#bbpress-forums .bbp-reply-author {
  padding: 22px 14px !important;
  border-right: 1px solid var(--border) !important;
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  text-align: center !important;
  gap: 8px !important;
  background: rgba(255,255,255,.01) !important;
}
#bbpress-forums .bbp-reply-author .bbp-author-avatar img {
  width: 52px !important;
  height: 52px !important;
  border-radius: 50% !important;
  border: 2px solid var(--border) !important;
  display: block !important;
}
#bbpress-forums .bbp-reply-author .bbp-author-link { text-decoration: none !important; }
#bbpress-forums .bbp-reply-author .bbp-author-name {
  font-size: 10px !important;
  color: #fff !important;
  font-weight: 600 !important;
  display: block !important;
  margin-top: 6px !important;
  word-break: break-all !important;
  letter-spacing: .02em !important;
}
#bbpress-forums .bbp-author-role {
  font-family: 'Orbitron', monospace !important;
  font-size: 7px !important;
  letter-spacing: .14em !important;
  color: var(--amber) !important;
  border: 1px solid rgba(255,179,0,.25) !important;
  padding: 2px 6px !important;
  text-transform: uppercase !important;
}
#bbpress-forums .bbp-reply-ip { display: none !important; }

/* Post content */
#bbpress-forums .bbp-reply-content {
  padding: 22px 26px !important;
  font-size: 13px !important;
  line-height: 1.75 !important;
  color: rgba(255,255,255,.72) !important;
}
#bbpress-forums .bbp-reply-content p { margin: 0 0 10px !important; }
#bbpress-forums .bbp-reply-content p:last-child { margin-bottom: 0 !important; }
#bbpress-forums .bbp-reply-content a { color: var(--amber) !important; }
#bbpress-forums .bbp-reply-content code {
  background: rgba(255,255,255,.07) !important;
  padding: 1px 6px !important;
  font-size: 12px !important;
  color: var(--red) !important;
}

/* ══════════════════════════════════════════════
   4. FORMS — new topic / reply
══════════════════════════════════════════════ */

#bbpress-forums .bbp-topic-form,
#bbpress-forums .bbp-reply-form {
  margin-top: 36px;
  padding-top: 0;
}
#bbpress-forums fieldset.bbp-form {
  border: 1px solid var(--border) !important;
  padding: 0 !important;
  background: rgba(255,255,255,.015) !important;
  position: relative !important;
  overflow: visible !important;
}
#bbpress-forums fieldset.bbp-form::before {
  content: '' !important;
  display: block !important;
  height: 2px !important;
  background: linear-gradient(to right, var(--red), var(--amber)) !important;
}
#bbpress-forums fieldset.bbp-form > div {
  padding: 24px 24px 20px !important;
}
#bbpress-forums fieldset.bbp-form legend {
  font-family: 'Orbitron', monospace !important;
  font-size: 8px !important;
  letter-spacing: .22em !important;
  color: rgba(255,255,255,.35) !important;
  background: #000 !important;
  padding: 0 10px !important;
  margin-left: 16px !important;
  text-transform: uppercase !important;
}

/* Labels */
#bbpress-forums .bbp-form label,
#bbpress-forums .bbp-topic-form label,
#bbpress-forums .bbp-reply-form label {
  font-family: 'Orbitron', monospace !important;
  font-size: 8px !important;
  letter-spacing: .18em !important;
  color: rgba(255,255,255,.35) !important;
  display: block !important;
  margin-bottom: 7px !important;
  text-transform: uppercase !important;
}

/* Text inputs */
#bbpress-forums input#bbp_topic_title,
#bbpress-forums input#bbp_reply_title,
#bbpress-forums input#bbp_topic_tags,
#bbpress-forums input[type="text"] {
  width: 100% !important;
  background: rgba(255,255,255,.03) !important;
  border: 1px solid var(--border) !important;
  color: #fff !important;
  padding: 10px 14px !important;
  font-family: 'Space Grotesk', sans-serif !important;
  font-size: 13px !important;
  outline: none !important;
  transition: border-color .2s !important;
  margin-bottom: 18px !important;
  display: block !important;
}
#bbpress-forums input[type="text"]:focus { border-color: rgba(255,34,0,.45) !important; }

/* ── RICH TEXT EDITOR TOOLBAR ─────────────── */
#bbpress-forums .wp-editor-tabs { display: none !important; }
#bbpress-forums .wp-editor-wrap,
#bbpress-forums #wp-bbp_topic_content-wrap,
#bbpress-forums #wp-bbp_reply_content-wrap {
  border: 1px solid var(--border) !important;
  background: #000 !important;
  margin-bottom: 18px !important;
}
#bbpress-forums .quicktags-toolbar,
#bbpress-forums div[id^="qt_bbp_"][id$="_toolbar"],
#bbpress-forums #qt_bbp_topic_content_toolbar,
#bbpress-forums #qt_bbp_reply_content_toolbar {
  background: rgba(255,255,255,.03) !important;
  border-bottom: 1px solid var(--border) !important;
  padding: 7px 8px !important;
  display: flex !important;
  flex-wrap: wrap !important;
  gap: 3px !important;
}
#bbpress-forums .quicktags-toolbar input[type="button"],
#bbpress-forums div[id^="qt_bbp_"] input[type="button"] {
  background: transparent !important;
  border: 1px solid rgba(255,255,255,.1) !important;
  color: rgba(255,255,255,.45) !important;
  font-size: 9px !important;
  padding: 3px 8px !important;
  cursor: pointer !important;
  font-family: 'Orbitron', monospace !important;
  letter-spacing: .05em !important;
  transition: color .2s, border-color .2s !important;
}
#bbpress-forums .quicktags-toolbar input[type="button"]:hover,
#bbpress-forums div[id^="qt_bbp_"] input[type="button"]:hover {
  color: var(--amber) !important;
  border-color: rgba(255,179,0,.35) !important;
}
#bbpress-forums textarea,
#bbpress-forums #bbp_topic_content,
#bbpress-forums #bbp_reply_content {
  width: 100% !important;
  background: #000 !important;
  border: none !important;
  color: rgba(255,255,255,.78) !important;
  padding: 14px !important;
  font-family: 'Space Grotesk', sans-serif !important;
  font-size: 13px !important;
  line-height: 1.7 !important;
  resize: vertical !important;
  outline: none !important;
  min-height: 150px !important;
  display: block !important;
}

/* ── DROPDOWNS ────────────────────────────── */
#bbpress-forums select,
#bbpress-forums .bbp_dropdown {
  appearance: none !important;
  -webkit-appearance: none !important;
  background: rgba(255,255,255,.03) !important;
  border: 1px solid var(--border) !important;
  color: rgba(255,255,255,.65) !important;
  padding: 9px 32px 9px 12px !important;
  font-family: 'Space Grotesk', sans-serif !important;
  font-size: 12px !important;
  outline: none !important;
  cursor: pointer !important;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M0 0l5 6 5-6z' fill='rgba(255,255,255,0.25)'/%3E%3C/svg%3E") !important;
  background-repeat: no-repeat !important;
  background-position: right 11px center !important;
  min-width: 190px !important;
  margin-bottom: 16px !important;
  display: block !important;
  transition: border-color .2s !important;
}
#bbpress-forums select:focus,
#bbpress-forums select:hover { border-color: rgba(255,34,0,.4) !important; }
#bbpress-forums select option { background: #0d0d0d !important; color: #fff !important; }

/* ── CHECKBOX ─────────────────────────────── */
#bbpress-forums input[type="checkbox"] {
  appearance: none !important;
  -webkit-appearance: none !important;
  width: 15px !important;
  height: 15px !important;
  min-width: 15px !important;
  border: 1px solid rgba(255,255,255,.2) !important;
  background: transparent !important;
  cursor: pointer !important;
  vertical-align: middle !important;
  position: relative !important;
  transition: border-color .2s, background .2s !important;
}
#bbpress-forums input[type="checkbox"]:checked {
  background: var(--red) !important;
  border-color: var(--red) !important;
}
#bbpress-forums input[type="checkbox"]:checked::after {
  content: '' !important;
  position: absolute !important;
  left: 3px !important;
  top: 1px !important;
  width: 5px !important;
  height: 8px !important;
  border: 1.5px solid #fff !important;
  border-top: none !important;
  border-left: none !important;
  transform: rotate(45deg) !important;
  display: block !important;
}
/* Subscription row */
#bbpress-forums p:has(#bbp_topic_subscription),
#bbpress-forums p:has(#bbp_reply_subscription) {
  display: flex !important;
  align-items: center !important;
  gap: 9px !important;
  margin-bottom: 0 !important;
}
#bbpress-forums p:has(#bbp_topic_subscription) label,
#bbpress-forums p:has(#bbp_reply_subscription) label {
  font-size: 10px !important;
  display: inline !important;
  cursor: pointer !important;
  margin-bottom: 0 !important;
}

/* Submit button */
#bbpress-forums .bbp-submit-wrapper { margin-top: 18px !important; text-align: right; }
#bbpress-forums button#bbp_topic_submit,
#bbpress-forums button#bbp_reply_submit,
#bbpress-forums input[type="submit"] {
  background: var(--red) !important;
  color: #fff !important;
  border: none !important;
  padding: 11px 30px !important;
  font-family: 'Orbitron', monospace !important;
  font-size: 9px !important;
  letter-spacing: .22em !important;
  text-transform: uppercase !important;
  cursor: pointer !important;
  transition: background .2s, transform .15s !important;
}
#bbpress-forums button#bbp_topic_submit:hover,
#bbpress-forums button#bbp_reply_submit:hover,
#bbpress-forums input[type="submit"]:hover {
  background: #cc1a00 !important;
  transform: translateY(-1px) !important;
}

/* ══════════════════════════════════════════════
   5. RESPONSIVE
══════════════════════════════════════════════ */
@media (max-width: 640px) {
  .il-fc-grid { grid-template-columns: 1fr; }

  #bbpress-forums ul.bbp-replies .bbp-replies-list > li {
    grid-template-columns: 1fr !important;
  }
  #bbpress-forums .bbp-reply-author {
    border-right: none !important;
    border-bottom: 1px solid var(--border) !important;
    flex-direction: row !important;
    align-items: center !important;
    text-align: left !important;
    padding: 14px !important;
    gap: 12px !important;
  }
  .il-tl-stat { display: none; }
}