/* RFSX-themed Paper page overrides
   Loaded in addition to rfsx.css.
*/

.rfsx-paper-layout .rfsx-papercol{
  min-width: 0;
}

/* Keep the center column black like the feed.
   Some site themes tint elements with stance-* backgrounds; on the RFSX paper
   page we want the clean black canvas and let badges communicate stance. */
.rfsx-paper .rfsx-paper-article{
  background: transparent;
}

.rfsx-paper .rfsx-paper-article[class*="stance-"]{
  background: transparent !important;
  background-image: none !important;
}

/* Make the paper content feel like "one big post" in the feed column */
.rfsx-paper-article{
  padding: 14px 16px 40px;
}

.rfsx-paper-article h1{
  margin: 10px 0 10px;
  font-size: clamp(1.35rem, 2.2vw, 2.05rem);
  line-height: 1.15;
  letter-spacing: .2px;
}

.rfsx-paper-meta{
  color: var(--muted);
  font-size: 0.95rem;
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
  margin: 8px 0 14px;
}

.rfsx-paper-actions{
  margin: 10px 0 16px;
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
}

.rfsx-paper-pre{
  white-space: pre-wrap;
  line-height: 1.55;
  color: var(--text);
  margin: 8px 0 0;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.rfsx-domain-link{
  color: var(--link);
  text-decoration: none;
  font-weight: 700;
}
.rfsx-domain-link:hover{ text-decoration: underline; }

.rfsx-paper-card strong{
  display:block;
  margin-bottom: 10px;
}

.rfsx-paper-grid{
  margin-top: 10px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.rfsx-paper-label{
  color: var(--muted);
  font-size: .85rem;
  margin-bottom: 3px;
}

.rfsx-paper-sub{
  color: var(--muted);
  font-size: .85rem;
  margin-top: 4px;
}

.rfsx-paper-raw{
  overflow:auto;
  font-size: 12px;
  background: rgba(0,0,0,.25);
  padding: 10px;
  border-radius: 12px;
  border: 1px solid var(--border);
  margin-top: 10px;
}

.rfsx-og{
  width:100%;
  border-radius: 12px;
  border: 1px solid var(--border);
}

/* Share block styles */
.rfsx-share{
  margin-top: 10px;
  display:flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
}

.rfsx-share a{
  color: var(--link);
  text-decoration: none;
  font-weight: 600;
}

.rfsx-share a:hover{
  text-decoration: underline;
}

.rfsx-share-copy{
  background: rgba(255,255,255,0.06);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 8px 10px;
  border-radius: 999px;
  cursor: pointer;
}

.rfsx-share-copy:hover{
  background: rgba(255,255,255,0.09);
}

/* Keywords chips layout in sidebar */
.rfsx-kws, .rfsx-adminlinks{
  margin-top: 10px;
  display:flex;
  gap: 8px;
  flex-wrap: wrap;
}

.rfsx-related{
  margin: 10px 0 0;
  padding-left: 18px;
}

.rfsx-related li{
  margin: 8px 0;
}

/* Mobile share card placement: show above heading on small screens */
.rfsx-paper-share-mobile{
  display:none;
}

@media (max-width: 980px){
  .rfsx-paper-share-mobile{
    display:block;
    margin: 6px 0 12px;
  }
  .rfsx-paper-share-desktop{
    display:none;
  }
  .rfsx-paper-article{
    padding: 12px 16px 40px;
  }
  .rfsx-paper-grid{
    grid-template-columns: 1fr;
  }
}

/* Desktop: hide the mobile share card */
@media (min-width: 981px){
  .rfsx-paper-share-mobile{
    display:none;
  }
}

/* Hide side scrollbars for nav + sidebar (X-like) */
.rfsx-paper .rfsx-nav,
.rfsx-paper .rfsx-side{
  -ms-overflow-style: none;
  scrollbar-width: none;
}
.rfsx-paper .rfsx-nav::-webkit-scrollbar,
.rfsx-paper .rfsx-side::-webkit-scrollbar{
  width:0;
  height:0;
}


html.rfsx-modal-open, body.rfsx-modal-open{ overflow:hidden; }

.rfsx-paper .rfsx-modal-body{
  padding: 16px;
  -webkit-overflow-scrolling: touch;
}
