/*
	The Legacy Of — Web Compatibility Shim CSS
	Stands in for sp://import/css/{adam,api}.css which used to be
	served by the Spotify desktop client.
*/

/* ------------------------------------------------------------------
   Tab bar — sits as a 40px fixed strip at viewport top. The original
   #header (the white Facebook/Twitter/Legacy bar rendered inside the
   page templates as position:fixed) is shifted down 40px so both
   coexist. Matches manifest.json's DefaultTabs.
   ------------------------------------------------------------------ */
#lg-tabs {
	position: fixed;
	top: 0; left: 0; right: 0;
	height: 40px;
	background: #003254;
	border-bottom: 1px solid #001a2e;
	display: flex;
	justify-content: center;
	z-index: 2000;
}

#lg-tabs a {
	display: inline-block;
	padding: 12px 24px 10px;
	font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
	font-size: 11px;
	font-weight: bold;
	letter-spacing: 1.4px;
	text-transform: uppercase;
	color: #99b8cb;
	text-decoration: none;
	border-bottom: 3px solid transparent;
	transition: color 120ms ease, border-color 120ms ease;
}

#lg-tabs a:hover  { color: #fff; }
#lg-tabs a.active { color: #fff; border-bottom-color: #fff; }

/* Push the page-template #header down so it sits below our tab bar. */
body                                       { padding-top: 40px; }
#header                                    { top: 40px !important; }
/* mainPortal / playlistPortal are JS-sized to window.height — clip
   anything that bleeds past the viewport so the scroll bar lines up. */
#mainPortal, #playlistPortal               { max-height: calc(100vh - 40px); overflow: hidden; }

/* ------------------------------------------------------------------
   Player / tile placeholders used by v.Player and v.Image. Album art
   comes from the bundled metadata; click the play button to open the
   underlying track on open.spotify.com.
   ------------------------------------------------------------------ */
.sp-player {
	position: relative;
	background-color: #1a1a1a;
	background-size: cover;
	background-position: center;
	display: block;
	width: 100%;
	height: 100%;
	min-height: 60px;
	overflow: hidden;
	cursor: pointer;
}

.sp-player .sp-player-image {
	position: relative;
	width: 100%;
	height: 100%;
}

.sp-player .sp-image {
	display: block;
	width: 100%;
	height: 100%;
	background-color: #2a2a2a;
	background-size: cover;
	background-position: center;
	background-repeat: no-repeat;
}

.sp-player .sp-player-button {
	position: absolute;
	bottom: 10px; right: 10px;
	width: 38px; height: 38px;
	border: 0;
	border-radius: 50%;
	background: rgba(255,255,255,0.92);
	cursor: pointer;
	z-index: 2;
	transition: background 120ms ease, transform 120ms ease;
}

.sp-player .sp-player-button::before {
	content: '';
	display: block;
	width: 0; height: 0;
	margin: 12px 0 0 14px;
	border-style: solid;
	border-width: 7px 0 7px 12px;
	border-color: transparent transparent transparent #003254;
}

.sp-player:hover .sp-player-button { background: #fff; transform: scale(1.06); }

.shim-tile {
	background-color: #1a1a1a;
	background-size: cover;
	background-position: center;
	width: 100%;
	height: 100%;
	display: block;
}
.sp-image-link { display: block; width: 100%; height: 100%; }

/* Stand-in tracklist — link out to Spotify. */
.shim-tracklist {
	padding: 14px 16px;
	color: #888;
	font-style: italic;
	font-size: 12px;
	background: rgba(0,0,0,0.04);
	border: 1px solid #e0e0e0;
	border-radius: 3px;
	margin: 8px 0;
}
.shim-tracklist-link.sp-button { background: #003254; color: #fff; }
.shim-tracklist-link.sp-button:hover { background: #00528a; color: #fff; }

/* ------------------------------------------------------------------
   Spotify SDK button stubs.
   ------------------------------------------------------------------ */
.sp-button {
	display: inline-block;
	padding: 6px 14px;
	background: #003254;
	color: #fff;
	border: 0;
	border-radius: 3px;
	font-family: Helvetica, Arial, sans-serif;
	font-size: 11px;
	font-weight: bold;
	letter-spacing: 0.5px;
	text-transform: uppercase;
	text-decoration: none;
	cursor: pointer;
	line-height: 18px;
}
.sp-button:hover { background: #00528a; color: #fff; }

.sp-button .sp-plus,
.sp-button .sp-share {
	display: inline-block;
	width: 10px; height: 10px;
	margin-right: 5px;
	vertical-align: middle;
	position: relative;
}
.sp-button .sp-plus::before {
	content: ''; position: absolute;
	left: 1px; right: 1px; top: 4px;
	height: 2px; background: #fff;
}
.sp-button .sp-plus::after {
	content: ''; position: absolute;
	top: 1px; bottom: 1px; left: 4px;
	width: 2px; background: #fff;
}
.sp-button .sp-share::before {
	content: '↗'; color: #fff; font-size: 13px; line-height: 10px;
	position: absolute; top: -2px; left: 0;
}

.sp-list { display: block; }
.sp-list-item-playing,
.sp-list-item-paused { background: rgba(0, 50, 84, 0.08); }

/* Loading meter throbber stand-in. */
#loading .meter {
	display: inline-block;
	width: 200px; height: 4px;
	background: rgba(255,255,255,0.1);
	border-radius: 2px;
	overflow: hidden;
}
#loading .meter > span {
	display: block; height: 100%; width: 0;
	background: #99b8cb;
	transition: width 0.3s ease;
}

/* ------------------------------------------------------------------
   Image-loss recovery. Every artist tile and feature graphic in
   data.json points at http://preview.legacyrecordings.com images. The
   host is dead AND, since the app is now served over HTTPS, every
   request would be mixed-content-blocked anyway. Without these
   styles the tiles render as blank white rectangles because the
   original CSS sets no fallback colour on .graphic.

   - Give every tile a deep blue gradient so it reads as intentional.
   - Always show the artist-name overlay (was opacity:0 until hover).
   - Same treatment for the feature hero.
   ------------------------------------------------------------------ */
#artists .col .graphic {
	background-color: #003254;
	background-image: linear-gradient(135deg, #003254 0%, #001a2e 100%);
}

#artists .col .overlay {
	opacity: 1 !important;
	background: rgba(0, 50, 84, 0.92) !important;
}
#artists .col .overlay h2     { color: #fff; }
#artists .col .overlay .blurb { color: #d4e3ec; opacity: 0.95; }

#artists .feature .graphic {
	background-color: #001a2e;
	background-image: linear-gradient(135deg, #003254 0%, #001a2e 100%);
}

/* The "About" tile uses a sprite background; keep it dark so its
   white icon stays legible. */
#artists .col.about .graphic {
	background-color: #001a2e;
	background-image: none;
}

/* Album-cover players inside single-artist pages also rely on the
   dead images — give them a quiet placeholder colour. */
#singleArtistPage .album .player,
#singleArtistPage .album_wrap .player {
	background-color: #1a2a3a;
}
.playlist .player { background-color: #1a2a3a; }
