/* wgf-related-rail.css — Module M05: Related-pages / internal-link rail.
   Three variants: footer rail (full-width grouped columns), sidebar rail
   (narrow single column), and inline strip (horizontal row of tiles).
   All variants share the .rr-row link primitive and .entity-tag type labels.
   Colours/type from _tokens.css. */

/* ── entity type tag ── */
.entity-tag{
  display:inline-flex;
  align-items:center;
  gap:var(--space-1);
  font-family:var(--font-mono);
  font-size:.65rem;
  text-transform:uppercase;
  letter-spacing:.07em;
  padding:1px var(--space-2);
  border-radius:var(--radius-pill);
  border:1px solid var(--wgf-border-neutral);
  color:var(--wgf-muted);
  background:var(--wgf-panel-3);
  flex-shrink:0;
}
/* Owner ruling 2026-07-03: off-palette entity-tag accents KILLED — gold is the only brand
   accent; tags differentiate by their text. */
.entity-tag--item   { color:var(--wgf-gold-muted); border-color:rgba(var(--wgf-gold-rgb),.18); }
.entity-tag--guide,
.entity-tag--realm,
.entity-tag--prof   { color:var(--wgf-muted); border-color:var(--wgf-border-neutral); }

/* ── entity icon placeholder (20px, neutral for missing) ── */
.entity-icon{
  width:20px;
  height:20px;
  border-radius:var(--radius-control);
  background:var(--wgf-panel-3);
  border:1px solid var(--wgf-border-neutral);
  flex-shrink:0;
  display:flex;
  align-items:center;
  justify-content:center;
  font-size:.6rem;
  color:var(--wgf-muted);
  font-family:var(--font-mono);
  overflow:hidden;
}
.entity-icon[data-icon]::before{
  content:'';
  display:block;
  width:100%;
  height:100%;
  background-image:var(--icon-src);
  background-size:cover;
}

/* ── group title ── */
.rr-group__title{
  font-family:var(--font-display);
  font-size:var(--text-xs);
  text-transform:uppercase;
  letter-spacing:.1em;
  color:var(--wgf-muted);
  margin:0 0 var(--space-2);
  padding-bottom:var(--space-2);
  border-bottom:1px solid var(--wgf-border-neutral-soft);
}

/* ── link row (shared by all rail layouts) ── */
.rr-row{
  display:flex;
  align-items:center;
  gap:var(--space-2);
  padding:var(--space-2) var(--space-2);
  border-radius:0;
  text-decoration:none;
  color:var(--wgf-text);
  background:var(--wgf-panel-1);
  border:1px solid var(--wgf-metal);
  box-shadow:inset 0 0 0 1px rgba(0,0,0,.45);
  transition:
    background var(--motion-fast) var(--ease-standard),
    border-color var(--motion-fast) var(--ease-standard),
    color var(--motion-fast) var(--ease-standard);
  min-height:44px;
  width:100%;
  position:relative;
}
@media(prefers-reduced-motion:reduce){
  .rr-row{ transition:none; }
}
.rr-row:hover,
.rr-row:focus-visible{
  background:#2a2216;
  border-color:rgba(var(--wgf-gold-rgb),.55);
}
/* de-plain chrome 2026-07-30 (owner ruling) */
.rr-row::before,
.rr-row::after{
  content:'';
  position:absolute;
  width:8px;
  height:8px;
  border:1px solid var(--wgf-metal);
}
.rr-row::before{
  top:0;
  left:0;
  border-right:none;
  border-bottom:none;
  background:linear-gradient(135deg, #e8c56e 0%, transparent 70%);
}
.rr-row::after{
  bottom:0;
  right:0;
  border-left:none;
  border-top:none;
  background:linear-gradient(135deg, transparent 30%, #e8c56e 100%);
}
.rr-row:focus-visible{
  outline:none;
  box-shadow:var(--focus-ring);
}
.rr-row__body{
  display:flex;
  flex-direction:column;
  gap:1px;
  flex:1 1 auto;
  min-width:0;
}
.rr-row__name{
  font-family:var(--font-ui);
  font-size:var(--text-sm);
  color:var(--wgf-link);
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
  line-height:1.3;
  transition:color var(--motion-fast) var(--ease-standard);
}
@media(prefers-reduced-motion:reduce){
  .rr-row__name{ transition:none; }
}
.rr-row:hover .rr-row__name,
.rr-row:focus-visible .rr-row__name{
  color:var(--wgf-gold-bright);
}
.rr-row__note{
  font-family:var(--font-ui);
  font-size:var(--text-xs);
  color:var(--wgf-muted);
  line-height:1.4;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}
.rr-row__arrow{
  font-size:var(--text-xs);
  color:var(--wgf-muted);
  flex-shrink:0;
  opacity:0;
  transition:opacity var(--motion-fast) var(--ease-standard);
}
@media(prefers-reduced-motion:reduce){
  .rr-row__arrow{ transition:none; }
}
.rr-row:hover .rr-row__arrow,
.rr-row:focus-visible .rr-row__arrow{
  opacity:1;
}

/* ── list reset ── */
.rr-list{
  list-style:none;
  margin:0;
  padding:0;
  display:flex;
  flex-direction:column;
  gap:0;
}

/* ─────────────────────────────────────
   VARIANT A — FOOTER RAIL
   Full-width, 2–4 grouped columns
───────────────────────────────────── */
/* de-plain chrome 2026-07-30 (owner ruling) */
.rr-footer{
  background:var(--wgf-panel-1);
  border:1px solid var(--wgf-metal);
  border-radius:0;
  padding:var(--space-4);
  box-shadow:inset 0 0 0 1px rgba(0,0,0,.45);
  position:relative;
}
.rr-footer__head{
  display:flex;
  align-items:baseline;
  gap:var(--space-2);
  margin-bottom:var(--space-4);
}
/* de-plain chrome 2026-07-30 (owner ruling) */
.rr-footer__heading{
  font-family:var(--font-display);
  font-size:var(--text-sm);
  text-transform:uppercase;
  letter-spacing:.08em;
  color:var(--wgf-gold-primary);
  margin:0;
}
.rr-footer__grid{
  display:grid;
  grid-template-columns:repeat(auto-fit,minmax(180px,1fr));
  gap:var(--space-4) var(--space-5);
}
.rr-footer__group{
  display:flex;
  flex-direction:column;
}
/* single-group sub-variant */
.rr-footer--single .rr-footer__grid{
  grid-template-columns:minmax(180px,360px);
}

/* ─────────────────────────────────────
   VARIANT B — SIDEBAR RAIL
   Narrow single column (240px)
───────────────────────────────────── */
/* de-plain chrome 2026-07-30 (owner ruling) */
.rr-sidebar{
  width:240px;
  background:var(--wgf-panel-1);
  border:1px solid var(--wgf-metal);
  border-radius:0;
  padding:var(--space-3);
  box-shadow:inset 0 0 0 1px rgba(0,0,0,.45);
  position:relative;
}
/* de-plain chrome 2026-07-30 (owner ruling) */
.rr-sidebar__heading{
  font-family:var(--font-display);
  font-size:var(--text-xs);
  text-transform:uppercase;
  letter-spacing:.1em;
  color:var(--wgf-gold-primary);
  margin:0 0 var(--space-3);
  padding-bottom:var(--space-2);
  border-bottom:1px solid var(--wgf-border-neutral-soft);
}
.rr-sidebar__groups{
  display:flex;
  flex-direction:column;
  gap:var(--space-3);
}

/* ─────────────────────────────────────
   VARIANT C — INLINE STRIP
   Horizontal row of 3–6 tiles
───────────────────────────────────── */
.rr-strip{
  display:flex;
  flex-direction:column;
  gap:var(--space-3);
}
.rr-strip__heading{
  font-family:var(--font-display);
  font-size:var(--text-xs);
  text-transform:uppercase;
  letter-spacing:.1em;
  color:var(--wgf-muted);
  margin:0;
}
.rr-strip__row{
  display:flex;
  gap:var(--space-2);
  flex-wrap:wrap;
}
.rr-tile{
  display:flex;
  align-items:center;
  gap:var(--space-2);
  padding:var(--space-2) var(--space-3);
  background:var(--wgf-panel-1);
  border:1px solid var(--wgf-metal);
  border-radius:0;
  text-decoration:none;
  color:var(--wgf-text);
  flex:0 0 auto;
  box-shadow:inset 0 0 0 1px rgba(0,0,0,.45);
  transition:
    background var(--motion-fast) var(--ease-standard),
    border-color var(--motion-fast) var(--ease-standard);
  min-height:40px;
  position:relative;
}
@media(prefers-reduced-motion:reduce){
  .rr-tile{ transition:none; }
}
.rr-tile:hover,
.rr-tile:focus-visible{
  background:#2a2216;
  border-color:rgba(var(--wgf-gold-rgb),.55);
}
/* de-plain chrome 2026-07-30 (owner ruling) */
.rr-tile::before,
.rr-tile::after{
  content:'';
  position:absolute;
  width:6px;
  height:6px;
  border:1px solid var(--wgf-metal);
}
.rr-tile::before{
  top:0;
  left:0;
  border-right:none;
  border-bottom:none;
  background:linear-gradient(135deg, #e8c56e 0%, transparent 70%);
}
.rr-tile::after{
  bottom:0;
  right:0;
  border-left:none;
  border-top:none;
  background:linear-gradient(135deg, transparent 30%, #e8c56e 100%);
}
.rr-tile:focus-visible{
  outline:none;
  box-shadow:var(--focus-ring);
}
.rr-tile__name{
  font-family:var(--font-ui);
  font-size:var(--text-sm);
  color:var(--wgf-link);
  white-space:nowrap;
  line-height:1.3;
  transition:color var(--motion-fast) var(--ease-standard);
}
@media(prefers-reduced-motion:reduce){
  .rr-tile__name{ transition:none; }
}
.rr-tile:hover .rr-tile__name,
.rr-tile:focus-visible .rr-tile__name{
  color:var(--wgf-gold-bright);
}
.rr-tile__note{
  font-family:var(--font-ui);
  font-size:var(--text-xs);
  color:var(--wgf-muted);
  white-space:nowrap;
}

/* ── empty state ── */
/* de-plain chrome 2026-07-30 (owner ruling) */
.rr-empty{
  background:var(--wgf-panel-1);
  border:1px solid var(--wgf-metal);
  border-radius:0;
  padding:var(--space-4) var(--space-5);
  display:flex;
  align-items:center;
  gap:var(--space-3);
  max-width:560px;
  box-shadow:inset 0 0 0 1px rgba(0,0,0,.45);
  position:relative;
}
.rr-empty__icon{
  font-size:1.5rem;
  opacity:.25;
  flex-shrink:0;
  line-height:1;
}
.rr-empty__body{
  display:flex;
  flex-direction:column;
  gap:var(--space-1);
}
/* de-plain chrome 2026-07-30 (owner ruling) */
.rr-empty__title{
  font-family:var(--font-display);
  font-size:var(--text-sm);
  text-transform:uppercase;
  letter-spacing:.06em;
  color:var(--wgf-gold-primary);
  margin:0;
}
.rr-empty__note{
  font-family:var(--font-ui);
  font-size:var(--text-sm);
  color:var(--wgf-muted);
  margin:0;
}
