/* Platform icons for the service-page "Available on" rows: Steam, PlayStation,
   Xbox, Epic Games, Windows Store. The glyphs live in the icomoon font under
   plugins/icomoon/ (selection.json is the source), but that plugin's own
   style.css was never linked from any page, so for years every
   <span class="icon-steam2"></span> on 800+ game templates rendered as
   nothing (Ryan, 2026-09-14: "Where's the Steam icon here?").

   This file is the ONLY stylesheet for those classes and is linked from every
   header template unconditionally. It deliberately does NOT carry icomoon's
   generic [class^="icon-"] selector: that would hijack icon-item, icon-append,
   icon-top, icon-bar and every other icon-* class on the site. Only the five
   platform classes below are targeted.

   Guarded by tests/platform-icon-classes.contract.test.mjs (every icon-* class
   used inside a .platform span in any template must be defined here) and
   tests/platform-icons.public.spec.js (every game page's platform glyphs must
   actually render). Add a class here AND in selection.json/the font before
   using it in a template.

   It is also the one home of THE PLATFORM ROW's icon box and icon colour
   (second half of this file): a template never sets them itself. */

@font-face {
	font-family: 'ss-platform-icons';
	src: url('../plugins/icomoon/fonts/icomoon.eot?u2yu0u');
	src: url('../plugins/icomoon/fonts/icomoon.eot?u2yu0u#iefix') format('embedded-opentype'),
		url('../plugins/icomoon/fonts/icomoon.woff?u2yu0u') format('woff'),
		url('../plugins/icomoon/fonts/icomoon.ttf?u2yu0u') format('truetype'),
		url('../plugins/icomoon/fonts/icomoon.svg?u2yu0u#icomoon') format('svg');
	font-weight: normal;
	font-style: normal;
	font-display: block;
}

.icon-steam2,
.icon-playstation,
.icon-xbox,
.icon-epic-games,
.icon-windows-store {
	font-family: 'ss-platform-icons' !important;
	speak: never;
	font-style: normal;
	font-weight: normal;
	font-variant: normal;
	text-transform: none;
	line-height: 1;
	display: inline-block;
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
}

.icon-epic-games:before { content: "\e900"; }
.icon-playstation:before { content: "\e901"; }
.icon-steam2:before { content: "\e902"; }
.icon-xbox:before { content: "\e903"; }
.icon-windows-store:before { content: "\e904"; }

/* ------------------------------------------------------------
   THE PLATFORM ROW ("... compatible with: Steam (PC), Xbox, PlayStation 5")

   Ryan, 2026-11-13, on a row of three Font Awesome icons and the Switch
   picture: "The switch icon should be the same white color as all of the
   other icons. Also, its vertical alignment is different than the other
   ones. It needs to be the same. Also, the gap between the icon and the word
   switch needs to be the same as the other ones. Make sure this is changed
   for all game pages that may have the same issues".

   A row's icons are drawn three ways: one of the five glyphs above, a Font
   Awesome <i>, or an inline Switch picture (the font has no Switch glyph).
   Each sat on a different line (the glyph font's, Font Awesome's, and the
   bottom edge of a picture), only some got the 6px gap, and only some got
   the row's colour. The three row families: the shared `.pv2p-compat` row
   (public-v2-core.css 5.3e), the hand-written `.compat-bar` and the
   `.compat-bar-cta` order band. In a chip, everything that is not the grey
   `.note` is an icon.

   1. ONE BOX. Every icon is a box one em high, hung by its MIDDLE
      (`vertical-align: middle` puts the middle of the box half an x-height
      above the line, whatever font the icon is drawn in) and lifted 0.09em,
      which is the middle of a capital letter of the word. 6px to the word.
      The picture is as wide as it is high through its own square viewBox.
      The selectors out-rank a template's own rule on purpose (0,3,2 against
      0,3,1), so a template cannot move one icon off the line again.
   2. ONE COLOUR PER ROW. Shared row: gold when the row shows one of our
      glyphs, the words' white when it shows none (Font Awesome icons and the
      picture alone). Hand-written row and order band: the page's own rule
      colours its icons; an icon the page left out takes the stock gold those
      pages use, never the words' white. A page with a gold of its own names
      every icon in its own colour rule.
   3. ICON AND WORD STAY TOGETHER. A hand-written chip was plain text in a
      line, so a row that wrapped could leave an icon at the end of one line
      and its word on the next (the Starseeker row at 1280 wide; the Xbox and
      Windows icons of 7 Days to Die on a 360 phone). A chip is now one piece
      (an inline block): it moves to the next line whole, as the shared row's
      chips always did. It is never forced onto one line and never given a
      width: a name too long for a phone's row (German Nomad Drive, 324px in
      a row of 330) takes the row's width less its own margin and wraps
      inside itself. (white-space: nowrap ran that name into the row's side
      padding; a max-width moved the spill of a page that sets nowrap itself.)

   tests/platform-icon-classes.contract.test.mjs fails when a template sets
   an icon's box or line itself, when a row's icons would get two colours,
   or when this block loses one of its parts.
   ------------------------------------------------------------ */
body .pv2p-compat .pv2p-compat-p > :is(i, svg, span:not(.note)),
body .compat-bar .platform > :is(i, svg, span:not(.note)),
body .compat-bar-cta .platform > :is(i, svg, span:not(.note)) {
	display: inline-block;
	position: relative;
	top: -0.09em;
	width: auto;
	height: 1em;
	margin: 0 6px 0 0;
	line-height: 1;
	vertical-align: middle;
}
/* the Epic Games glyph is drawn 2px narrower than its own box */
body .pv2p-compat .pv2p-compat-p > span.icon-epic-games:not(.note),
body .compat-bar .platform > span.icon-epic-games:not(.note),
body .compat-bar-cta .platform > span.icon-epic-games:not(.note) {
	margin-right: 4px;
}

/* a chip is one piece: it never leaves its icon behind at the end of a line,
   and a name too long for the line wraps inside it (no nowrap, no width) */
body .compat-bar .platform,
body .compat-bar-cta .platform {
	display: inline-block;
}
/* hand-written rows: no weight at all, so a page's own colour rule always wins */
:where(.compat-bar, .compat-bar-cta) :where(.platform) > :where(i, svg, span:not(.note)) {
	color: rgb(219, 155, 21);
}

/* shared row: the words' colour for every icon ... */
body.pubv2 .pv2p-compat .pv2p-compat-p > :is(i, svg, span:not(.note)) {
	color: inherit;
}
/* ... and gold for every icon once the row shows one of our own glyphs. In a
   rule of its own: a browser that does not know :has() drops only this one. */
body.pubv2 .pv2p-compat:has(.pv2p-compat-p > span:not(.note)) .pv2p-compat-p > :is(i, svg, span:not(.note)) {
	color: var(--pv2-gold);
}
