/* ============================================================
   modes/socials.css -- Socials hub styling (self-contained .soc-*)
   ============================================================
   Theme-matched to NULLBYTE (green/amber/mono). Independent of .nlc-*
   so tweaking other modules never disturbs this. Uses the global theme
   vars (--fg, --bg, --amber, --border) with local fallbacks.
   alin styles.css:n jalkeen, tai oma indexointi
   ============================================================ */
.soc-module {
  --soc-bg: #0a0a0a;
  --soc-fg: #c0c0c0;
  --soc-fg-bright: #e0e0e0;
  --soc-fg-dim: #777;
  --soc-fg-faint: #555;
  --soc-accent: var(--fg, #00ff41);
  --soc-accent-dim: #00cc33;
  --soc-amber: var(--amber, #ffb000);
  --soc-border: #222;
  --soc-panel: #111;

  font-family: 'Courier New', monospace;
  font-size: 15px;
  line-height: 1.6;
  color: var(--soc-fg);
  max-width: 760px;
  margin: 0 auto;
}

/* Header */
.soc-header {
  border-bottom: 1px solid var(--soc-border);
  padding-bottom: 14px;
  margin-bottom: 18px;
}
.soc-h1 {
  color: var(--soc-accent);
  font-size: 1.4em;
  letter-spacing: 2px;
  margin: 0;
}
.soc-subtitle {
  color: var(--soc-fg-dim);
  font-size: 0.9em;
  margin-top: 4px;
}

/* List */
.soc-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* Row -- the whole thing is a tap target (opens the link) */
.soc-row {
  display: flex;
  align-items: center;
  gap: 14px;
  background: var(--soc-panel);
  border: 1px solid var(--soc-border);
  border-left: 3px solid var(--soc-accent-dim);
  border-radius: 2px;
  padding: 14px 16px;
  cursor: pointer;
  min-height: 44px;
  transition: border-color 0.15s, box-shadow 0.2s, background 0.15s;
}
.soc-row:hover,
.soc-row:focus {
  border-left-color: var(--soc-accent);
  border-color: var(--soc-accent-dim);
  box-shadow: 0 0 12px rgba(0, 255, 65, 0.08);
  outline: none;
}
.soc-row:focus-visible {
  outline: 2px solid var(--soc-accent);
  outline-offset: 2px;
}

/* Glyph badge */
.soc-glyph {
  flex: 0 0 38px;
  width: 38px;
  height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2em;
  font-weight: bold;
  color: var(--soc-accent);
  background: rgba(0, 255, 65, 0.05);
  border: 1px solid var(--soc-border);
  border-radius: 2px;
  letter-spacing: 0;
}

/* Label + sub */
.soc-meta {
  flex: 1;
  min-width: 0;
}
.soc-label {
  color: var(--soc-fg-bright);
  font-weight: bold;
  letter-spacing: 0.5px;
}
/* Sub line: a marquee track. Short text sits still; overflowing text gets
   the .soc-scrolling class (added in JS only when it actually overflows) and
   scrolls horizontally so the whole thing is readable without shrinking the
   font or wrapping. */
.soc-sub {
  color: var(--soc-fg-dim);
  font-size: 0.82em;
  margin-top: 1px;
  overflow: hidden;
  white-space: nowrap;
  position: relative;
}
.soc-sub-inner {
  display: inline-block;
  white-space: nowrap;
  will-change: transform;
}
/* Only overflowing rows get this. Scrolls just far enough to reveal the tail,
   then back -- a ping-pong, so it works with a SINGLE copy of the text (no
   duplicated content needed). JS sets --soc-shift to the exact overflow px. */
.soc-scrolling .soc-sub-inner {
  animation: soc-marquee var(--soc-dur, 8s) ease-in-out infinite alternate;
}
@keyframes soc-marquee {
  0%   { transform: translateX(0); }
  100% { transform: translateX(calc(-1 * var(--soc-shift, 0px))); }
}
/* Pause the scroll on hover/focus so a user can read it at their own pace. */
.soc-row:hover .soc-scrolling .soc-sub-inner,
.soc-row:focus .soc-scrolling .soc-sub-inner {
  animation-play-state: paused;
}

/* "open >" hint, hidden on very narrow screens */
.soc-open-hint {
  color: var(--soc-fg-faint);
  font-size: 0.8em;
  letter-spacing: 1px;
  text-transform: uppercase;
  white-space: nowrap;
}

/* Copy button -- separate action, doesn't trigger the row open */
.soc-copy {
  flex: 0 0 auto;
  background: transparent;
  color: var(--soc-amber);
  border: 1px solid var(--soc-amber);
  padding: 8px 12px;
  font-family: 'Courier New', monospace;
  font-size: 0.8em;
  letter-spacing: 1px;
  text-transform: uppercase;
  cursor: pointer;
  border-radius: 2px;
  min-height: 36px;
  transition: background 0.15s, color 0.15s;
}
.soc-copy:hover,
.soc-copy:focus {
  background: var(--soc-amber);
  color: var(--soc-bg, #0a0a0a);
  outline: none;
}

/* Footer + empty */
.soc-foot {
  color: var(--soc-fg-faint);
  font-size: 0.8em;
  text-align: center;
  margin-top: 20px;
  font-style: italic;
}
.soc-empty {
  color: var(--soc-fg-faint);
  text-align: center;
  padding: 30px 20px;
  font-style: italic;
}

/* Mobile */
@media (max-width: 768px) {
  .soc-module { font-size: 14px; }
  .soc-h1 { font-size: 1.2em; }
  .soc-row { padding: 12px 14px; gap: 10px; }
  .soc-open-hint { display: none; }   /* save space; row is still tappable */
  .soc-glyph { flex-basis: 34px; width: 34px; height: 34px; }
}