/* ==========================================================================
   ROTATECH FORUM PREMIUM — MODULAR SCOPED STYLESHEET (v1.0.0 · ETAPA 6B)
   Scoped strictly to .rotatech-forum-bbp-active & .rotatech-forum-*
   Zero global overrides on ROTATECH theme header, footer, or articles.
   ========================================================================== */

.rotatech-forum-bbp-active #bbpress-forums,
.rotatech-forum-wrap-block {
  font-family: var(--rf-font-sans);
  color: var(--rf-text-primary);
  font-size: 15px;
  line-height: 1.65;
  max-width: var(--rf-max-width);
  margin: 0 auto;
  box-sizing: border-box;
}

.rotatech-forum-bbp-active #bbpress-forums *,
.rotatech-forum-wrap-block * {
  box-sizing: border-box;
}

/* Header Card */
.rotatech-forum-header {
  background: var(--rf-header-grad);
  border: 1px solid var(--rf-border-accent);
  border-radius: var(--rf-radius-lg);
  padding: 1.35rem 1.5rem;
  box-shadow: var(--rf-shadow-glow);
  margin-bottom: 1.25rem;
}

.rotatech-forum-header-top {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.85rem;
  margin-bottom: 0.85rem;
}

.rotatech-forum-brand {
  display: flex;
  align-items: center;
  gap: 0.85rem;
}

.rotatech-forum-logo {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--rf-primary), var(--rf-cyan-deep));
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: #FFFFFF;
}

.rotatech-forum-title {
  margin: 0;
  font-size: clamp(1.3rem, 2.4vw, 1.75rem);
  font-weight: 800;
  color: var(--rf-text-primary);
  line-height: 1.2;
}

.rotatech-forum-title span {
  color: var(--rf-cyan);
}

.rotatech-forum-subtitle {
  margin: 0.3rem 0 0;
  font-size: 0.94rem;
  color: var(--rf-text-secondary);
}

.rotatech-forum-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  padding-top: 0.8rem;
  border-top: 1px solid var(--rf-border-subtle);
}

.rotatech-forum-nav-link {
  display: inline-flex;
  align-items: center;
  padding: 0.42rem 0.85rem;
  border-radius: 999px;
  background: var(--rf-bg-surface);
  border: 1px solid var(--rf-border-subtle);
  color: var(--rf-text-secondary) !important;
  font-size: 0.86rem;
  font-weight: 600;
  text-decoration: none !important;
}

.rotatech-forum-nav-link:hover,
.rotatech-forum-nav-link:focus-visible {
  background: var(--rf-primary-soft);
  border-color: var(--rf-border-accent);
  color: var(--rf-text-primary) !important;
}

.rotatech-forum-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.22rem 0.65rem;
  border-radius: 999px;
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  white-space: nowrap;
}

.rotatech-forum-badge--cyan {
  background: var(--rf-cyan-glow);
  color: var(--rf-cyan);
  border: 1px solid var(--rf-border-accent);
}

/* NINO AI Preview Card (Strictly Inactive) */
.rotatech-forum-ai-card {
  background: var(--rf-ai-grad);
  border: 1px solid var(--rf-border-accent);
  border-radius: var(--rf-radius-lg);
  padding: 1.25rem 1.45rem;
  margin-bottom: 1.5rem;
  box-shadow: var(--rf-shadow-glow);
}

.rotatech-forum-ai-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.65rem;
  margin-bottom: 0.55rem;
}

.rotatech-forum-ai-title {
  margin: 0;
  font-size: 1.08rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--rf-text-primary);
}

.rotatech-forum-ai-desc {
  margin: 0;
  color: var(--rf-text-secondary);
  font-size: 0.94rem;
}

/* bbPress Core Elements */
.rotatech-forum-bbp-active #bbpress-forums .bbp-breadcrumb {
  background: var(--rf-bg-surface);
  border: 1px solid var(--rf-border-subtle);
  border-radius: var(--rf-radius-sm);
  padding: 0.55rem 0.9rem;
  margin: 0 0 1rem;
  float: none;
  font-size: 0.86rem;
  color: var(--rf-text-muted);
}

.rotatech-forum-bbp-active #bbpress-forums .bbp-breadcrumb a {
  color: var(--rf-cyan);
}

.rotatech-forum-bbp-active #bbpress-forums .bbp-search-form {
  float: none;
  margin: 0 0 1.2rem;
}

.rotatech-forum-bbp-active #bbpress-forums #bbp-search-form {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.rotatech-forum-bbp-active #bbpress-forums #bbp_search {
  flex: 1 1 220px;
  min-width: 0;
  background: var(--rf-bg-input);
  border: 1px solid var(--rf-border-accent);
  color: var(--rf-text-primary);
  border-radius: var(--rf-radius-sm);
  padding: 0.55rem 0.85rem;
  font-size: 0.94rem;
}

.rotatech-forum-bbp-active #bbpress-forums #bbp_search_submit {
  background: linear-gradient(135deg, var(--rf-primary), var(--rf-cyan-deep));
  color: #FFFFFF;
  border: none;
  border-radius: var(--rf-radius-sm);
  padding: 0.55rem 1.15rem;
  font-weight: 700;
  cursor: pointer;
}

.rotatech-forum-bbp-active #bbpress-forums ul.bbp-forums,
.rotatech-forum-bbp-active #bbpress-forums ul.bbp-topics,
.rotatech-forum-bbp-active #bbpress-forums ul.bbp-replies,
.rotatech-forum-bbp-active #bbpress-forums ul.bbp-search-results {
  background: var(--rf-bg-card);
  border: 1px solid var(--rf-border-subtle);
  border-radius: var(--rf-radius-md);
  overflow: hidden;
  box-shadow: var(--rf-shadow-card);
  margin-bottom: 1.4rem;
}

.rotatech-forum-bbp-active #bbpress-forums li.bbp-header {
  background: var(--rf-bbp-head-grad);
  border-bottom: 1px solid var(--rf-border-accent);
  color: var(--rf-cyan);
  font-weight: 700;
  padding: 0.75rem 1rem;
}

.rotatech-forum-bbp-active #bbpress-forums li.bbp-footer {
  background: var(--rf-bg-surface);
  border-top: 1px solid var(--rf-border-subtle);
  padding: 0.5rem 1rem;
  color: var(--rf-text-muted);
}

.rotatech-forum-bbp-active #bbpress-forums li.bbp-body ul.forum,
.rotatech-forum-bbp-active #bbpress-forums li.bbp-body ul.topic,
.rotatech-forum-bbp-active #bbpress-forums div.bbp-reply-header,
.rotatech-forum-bbp-active #bbpress-forums div.bbp-topic-header {
  background: var(--rf-bg-card);
  border-top: 1px solid var(--rf-border-subtle);
  color: var(--rf-text-primary);
  padding: 0.85rem 1rem;
}

.rotatech-forum-bbp-active #bbpress-forums div.odd,
.rotatech-forum-bbp-active #bbpress-forums ul.odd {
  background: var(--rf-bg-card);
}

.rotatech-forum-bbp-active #bbpress-forums div.even,
.rotatech-forum-bbp-active #bbpress-forums ul.even {
  background: var(--rf-bg-surface);
}

.rotatech-forum-bbp-active #bbpress-forums .bbp-forum-title,
.rotatech-forum-bbp-active #bbpress-forums .bbp-topic-permalink {
  color: var(--rf-text-primary);
  font-weight: 700;
  font-size: 1rem;
}

.rotatech-forum-bbp-active #bbpress-forums .bbp-forums-list {
  border-left: 2px solid var(--rf-border-accent);
  padding-left: 0.75rem;
  margin-top: 0.45rem;
}

.rotatech-forum-bbp-active #bbpress-forums .bbp-forums-list li {
  display: inline-block;
  margin: 0.2rem 0.4rem 0.2rem 0;
}

.rotatech-forum-bbp-active #bbpress-forums .bbp-forums-list a {
  display: inline-block;
  padding: 0.22rem 0.58rem;
  border-radius: 6px;
  background: var(--rf-bg-surface);
  border: 1px solid var(--rf-border-subtle);
  color: var(--rf-cyan);
  font-size: 0.84rem;
}

.rotatech-forum-bbp-active #bbpress-forums div.bbp-reply-content,
.rotatech-forum-bbp-active #bbpress-forums div.bbp-topic-content {
  color: var(--rf-text-primary);
  overflow-wrap: anywhere;
  line-height: 1.72;
}

.rotatech-forum-bbp-active #bbpress-forums div.bbp-reply-content a,
.rotatech-forum-bbp-active #bbpress-forums div.bbp-topic-content a {
  color: var(--rf-cyan);
}

.rotatech-forum-bbp-active #bbpress-forums div.bbp-reply-content table {
  width: 100%;
  border-collapse: collapse;
  margin: 1rem 0;
  font-size: 0.92rem;
}

.rotatech-forum-bbp-active #bbpress-forums div.bbp-reply-content th,
.rotatech-forum-bbp-active #bbpress-forums div.bbp-reply-content td {
  border: 1px solid var(--rf-border-subtle);
  padding: 0.55rem 0.75rem;
  text-align: left;
}

.rotatech-forum-bbp-active #bbpress-forums div.bbp-reply-content th {
  background: var(--rf-bg-surface);
  color: var(--rf-cyan);
}

.rotatech-forum-bbp-active #bbpress-forums .rotatech-warning {
  background: var(--rf-warning-bg);
  border-left: 4px solid var(--rf-warning);
  padding: 0.85rem 1rem;
  border-radius: 0 var(--rf-radius-sm) var(--rf-radius-sm) 0;
  margin: 0 0 1rem;
  color: var(--rf-text-primary);
}

.rotatech-forum-bbp-active #bbpress-forums .rotatech-provenance {
  margin-top: 1.25rem;
  padding: 0.8rem 1rem;
  background: var(--rf-bg-surface);
  border: 1px solid var(--rf-border-subtle);
  border-radius: var(--rf-radius-sm);
  font-size: 0.85rem;
  color: var(--rf-text-secondary);
}

.rotatech-forum-bbp-active #bbpress-forums .bbp-template-notice {
  background: var(--rf-info-bg);
  border: 1px solid var(--rf-border-accent);
  color: var(--rf-text-secondary);
  border-radius: var(--rf-radius-sm);
  padding: 0.65rem 0.9rem;
}

.rotatech-forum-meta-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem 1.15rem;
  padding: 0.7rem 1rem;
  margin-bottom: 1rem;
  background: var(--rf-bg-surface);
  border: 1px solid var(--rf-border-accent);
  border-radius: var(--rf-radius-sm);
  font-size: 0.86rem;
  color: var(--rf-text-secondary);
}

.rotatech-forum-meta-bar code {
  background: var(--rf-cyan-glow);
  color: var(--rf-cyan);
  padding: 0.1rem 0.35rem;
  border-radius: 4px;
}

/* GTranslate floating switcher clearance so it never overlaps theme toggle */
.rotatech-forum-bbp-active .gt_float_switcher {
  z-index: 900 !important;
  margin-top: 0.35rem;
}

/* Mobile Polish (Samsung Galaxy S23 Ultra 412x915 & 360px) */
@media (max-width: 640px) {
  .rotatech-forum-header,
  .rotatech-forum-ai-card {
    padding: 1rem;
  }

  .rotatech-forum-bbp-active #bbpress-forums .bbp-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.35rem 0.75rem;
    line-height: 1.45;
  }

  .rotatech-forum-bbp-active #bbpress-forums li.bbp-forum-topic-count,
  .rotatech-forum-bbp-active #bbpress-forums li.bbp-forum-reply-count,
  .rotatech-forum-bbp-active #bbpress-forums li.bbp-topic-voice-count,
  .rotatech-forum-bbp-active #bbpress-forums li.bbp-topic-reply-count {
    font-size: 0.78rem;
  }
}
