/* ==========================================================================
   Jam track product pages (body.tps-jam-page). Loaded on those pages only.
   The page's own content stays; this restyles two things to the song page's
   look:
   1. Compact Audio Player sample players (a "Track Sample, C:" paragraph
      followed by .sc_fancy_player_container with WordPress's MediaElement
      player) become one dark clip row: round brick play button on the left,
      the label as the row's title, the time and progress under it.
   2. The purchase block that replaces "$5.00 – Purchase" (inc/jam-page.php).
   ========================================================================== */

/* ---- Sample players as clip rows --------------------------------------- */

/* The label paragraph is the top half of the dark row. */
.tps-jam-page p:has(+ .sc_fancy_player_container) {
	margin: 16px 0 0;
	padding: 12px 16px 2px 76px;
	background: var(--tps-ink);
	color: var(--tps-cream);
	font-family: var(--tps-font-narrow);
	font-weight: 700;
	font-size: 18px;
	line-height: 1.3;
	letter-spacing: 0.02em;
	text-transform: uppercase;
}
.tps-jam-page p:has(+ .sc_fancy_player_container) strong {
	font-weight: 700;
	color: var(--tps-cream);
}

/* The player is the bottom half. */
.tps-jam-page .sc_fancy_player_container {
	position: relative;
	margin: 0 0 16px;
	padding: 0 16px 12px 76px;
	background: var(--tps-ink);
	/* Whitespace text around the player would add a blank line. */
	font-size: 0;
	line-height: 0;
}
.tps-jam-page .sc_fancy_player_container .mejs-container,
.tps-jam-page .sc_fancy_player_container .mejs-container .mejs-controls {
	position: static;
	width: 100% !important;
	min-width: 0 !important;
	height: 28px !important;
	background: transparent;
}
.tps-jam-page .sc_fancy_player_container .mejs-controls {
	padding: 0;
}

/* Play/pause: the round brick button, centred on the whole row. */
.tps-jam-page .sc_fancy_player_container .mejs-playpause-button {
	position: absolute;
	left: 16px;
	top: -17px;
	width: 44px;
	height: 44px;
	margin: 0;
}
.tps-jam-page .sc_fancy_player_container .mejs-playpause-button > button {
	width: 44px;
	height: 44px;
	margin: 0;
	border-radius: 50%;
	background: var(--tps-brick);
	cursor: pointer;
}
.tps-jam-page .sc_fancy_player_container .mejs-playpause-button > button::after {
	content: "";
	position: absolute;
	inset: 0;
	margin: auto;
	width: 16px;
	height: 16px;
	background: var(--tps-cream);
	-webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 10 10'%3E%3Cpath d='M2 1v8l7-4z'/%3E%3C/svg%3E") center / contain no-repeat;
	mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 10 10'%3E%3Cpath d='M2 1v8l7-4z'/%3E%3C/svg%3E") center / contain no-repeat;
}
.tps-jam-page .sc_fancy_player_container .mejs-pause > button::after {
	-webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 10 10'%3E%3Cpath d='M2 1h2.2v8H2zM5.8 1H8v8H5.8z'/%3E%3C/svg%3E");
	mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 10 10'%3E%3Cpath d='M2 1h2.2v8H2zM5.8 1H8v8H5.8z'/%3E%3C/svg%3E");
}
.tps-jam-page .sc_fancy_player_container .mejs-playpause-button > button:focus-visible {
	outline: 2px solid var(--tps-cream);
	outline-offset: 2px;
}

/* Time and progress: small, in the row's gray and cream. */
.tps-jam-page .sc_fancy_player_container .mejs-time {
	height: 28px;
	padding: 0 8px 0 0;
	color: var(--tps-rule);
	font-family: var(--tps-font);
	font-size: 13px;
	line-height: 28px;
}
.tps-jam-page .sc_fancy_player_container .mejs-duration-container {
	padding: 0 0 0 10px;
}
.tps-jam-page .sc_fancy_player_container .mejs-time-rail {
	height: 28px;
	padding-top: 0;
	margin: 0;
}
.tps-jam-page .sc_fancy_player_container .mejs-time-total {
	margin: 12px 0 0;
	height: 4px;
	border-radius: 0;
	background: rgba(239, 231, 214, 0.25);
}
.tps-jam-page .sc_fancy_player_container .mejs-time-loaded {
	background: rgba(239, 231, 214, 0.35);
}
.tps-jam-page .sc_fancy_player_container .mejs-time-current {
	background: var(--tps-cream);
}
.tps-jam-page .sc_fancy_player_container .mejs-time-handle,
.tps-jam-page .sc_fancy_player_container .mejs-time-float,
.tps-jam-page .sc_fancy_player_container .mejs-time-hovered {
	display: none;
}
/* Volume is left to the device, as on the song page's clip rows. */
.tps-jam-page .sc_fancy_player_container .mejs-volume-button,
.tps-jam-page .sc_fancy_player_container .mejs-horizontal-volume-slider {
	display: none;
}

/* ---- Purchase block ------------------------------------------------------ */

.tps-jam-page .entry-content > .tps-jam-buy {
	max-width: 420px;
	margin: 28px 0 8px;
	padding-top: 16px;
	border-top: 1px solid var(--tps-rule);
}
.tps-jam-buy__note {
	margin: 8px 0 0;
	font-size: 15px;
	line-height: 1.5;
}

/* ---- Song-style jam track page (templates/single-jam.php) -----------------
   The top section reuses the song page's styles (song.css). Here: the page's
   own description and players in the left column, and the phone order. */

.tps-song .tps-jam__description > * + * {
	margin-top: 14px;
}
.tps-jam__description p,
.tps-jam__description li {
	font-size: 17px;
	line-height: 1.6;
}
.tps-jam__description ol,
.tps-jam__description ul {
	margin: 0 0 0 1.4em;
	padding: 0;
}
.tps-jam__description a {
	text-decoration: underline;
}
.tps-jam__players {
	margin-top: 8px;
}
.tps-jam__players p:first-child {
	margin-top: 0;
}
.tps-jam__below > * + * {
	margin-top: 16px;
}

/* Phones: back link, title, art, purchase block, then the details line,
   description and players (the song page's order). */
@media (max-width: 767px) {
	.tps-jam .tps-jam__details     { order: 8; }
	.tps-jam .tps-jam__description { order: 9; }
	.tps-jam .tps-jam__players     { order: 10; }
}
