/* 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:3px;
  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;
}
.entity-tag--item   { color:var(--wgf-gold-muted); border-color:rgba(240,192,64,.18); }
.entity-tag--guide  { color:#7eb8f0; border-color:rgba(126,184,240,.22); }
.entity-tag--realm  { color:#a78bfa; border-color:rgba(167,139,250,.22); }
.entity-tag--prof   { color:#5eead4; border-color:rgba(94,234,212,.22); }

/* ── 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:var(--radius-control);
  text-decoration:none;
  color:var(--wgf-text);
  background:transparent;
  border:1px solid transparent;
  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%;
}
@media(prefers-reduced-motion:reduce){
  .rr-row{ transition:none; }
}
.rr-row:hover,
.rr-row:focus-visible{
  background:var(--wgf-panel-2);
  border-color:var(--wgf-border);
}
.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
───────────────────────────────────── */
.rr-footer{
  background:var(--wgf-panel-1);
  border:1px solid var(--wgf-border-neutral);
  border-radius:var(--radius-card);
  padding:var(--space-4);
  box-shadow:var(--shadow-1);
}
.rr-footer__head{
  display:flex;
  align-items:baseline;
  gap:var(--space-2);
  margin-bottom:var(--space-4);
}
.rr-footer__heading{
  font-family:var(--font-display);
  font-size:var(--text-sm);
  text-transform:uppercase;
  letter-spacing:.08em;
  color:var(--wgf-text);
  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)
───────────────────────────────────── */
.rr-sidebar{
  width:240px;
  background:var(--wgf-panel-1);
  border:1px solid var(--wgf-border-neutral);
  border-radius:var(--radius-card);
  padding:var(--space-3);
  box-shadow:var(--shadow-1);
}
.rr-sidebar__heading{
  font-family:var(--font-display);
  font-size:var(--text-xs);
  text-transform:uppercase;
  letter-spacing:.1em;
  color:var(--wgf-text);
  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-border-neutral);
  border-radius:var(--radius-control);
  text-decoration:none;
  color:var(--wgf-text);
  flex:0 0 auto;
  transition:
    background var(--motion-fast) var(--ease-standard),
    border-color var(--motion-fast) var(--ease-standard);
  min-height:40px;
}
@media(prefers-reduced-motion:reduce){
  .rr-tile{ transition:none; }
}
.rr-tile:hover,
.rr-tile:focus-visible{
  background:var(--wgf-panel-2);
  border-color:var(--wgf-border);
}
.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 ── */
.rr-empty{
  background:var(--wgf-panel-1);
  border:1px solid var(--wgf-border-neutral-soft);
  border-radius:var(--radius-card);
  padding:var(--space-4) var(--space-5);
  display:flex;
  align-items:center;
  gap:var(--space-3);
  max-width:560px;
}
.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);
}
.rr-empty__title{
  font-family:var(--font-display);
  font-size:var(--text-sm);
  text-transform:uppercase;
  letter-spacing:.06em;
  color:var(--wgf-muted);
  margin:0;
}
.rr-empty__note{
  font-family:var(--font-ui);
  font-size:var(--text-sm);
  color:var(--wgf-muted);
  margin:0;
}
