/* Toddler Tunes licensing: previews (play button, waveform, vocal/instrumental switch, player bar)
   and the "Instrumental included" badge. Added 2026-11-05; player ported from Stockwaves' sw.js. */

:root {
	--ttw-base:   rgba(170, 136, 153, 0.32);
	--ttw-hover:  rgba(235, 120, 125, 0.55);
	--ttw-played: rgb(235, 120, 125);
}



/* ---------------------------------------- play button ---- */
.tt-play {
	flex: 0 0 auto;
	appearance: none;
	display: inline-grid;
	place-items: center;
	width: 2.4rem;
	height: 2.4rem;
	padding: 0;
	border: none;
	border-radius: 50%;
	cursor: pointer;
	color: #fff;
	background: linear-gradient(180deg, rgb(245, 140, 145), rgb(232, 112, 118));
	box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.45), 0 6px 14px -6px rgba(213, 116, 156, 0.6);
	transition: transform 0.2s ease, filter 0.2s ease;
}
.tt-play:hover { transform: scale(1.06); filter: brightness(1.06); }
.tt-play:focus-visible, .tt-icon:focus-visible, .ttp-wave:focus-visible, .tt-wave:focus-visible {
	outline: 3px solid rgba(104, 136, 255, 0.6);
	outline-offset: 2px;
}
.tt-play svg { width: 1.2rem; height: 1.2rem; fill: currentColor; }
.tt-play .i-pause { display: none; }
.row-div.playing .tt-play .i-play, .tt-player.playing #ttp-play .i-play { display: none; }
.row-div.playing .tt-play .i-pause, .tt-player.playing #ttp-play .i-pause { display: block; }
.tt-play.big { width: 2.8rem; height: 2.8rem; }

/* ----------------------------------- waveform + switch ---- */
.tt-wave-row {
	display: flex;
	align-items: center;
	gap: 0.75rem;
	padding-top: 0.6rem;
}
.tt-wave {
	flex: 1 1 auto;
	min-width: 0;
	height: 34px;
	cursor: pointer;
}
.row-div.current { box-shadow: 0 0 0 2px rgba(235, 120, 125, 0.45), 0 16px 32px -14px rgba(213, 116, 156, 0.35); }

/* ------------------------------------------ player bar ---- */
.tt-player {
	position: fixed;
	left: 50%;
	bottom: max(12px, env(safe-area-inset-bottom));
	transform: translateX(-50%);
	z-index: 50;
	width: min(calc(100% - 24px), 980px);
	box-sizing: border-box;
	display: flex;
	align-items: center;
	gap: 0.6rem;
	padding: 0.55rem 0.9rem;
	border-radius: 999px;
	background: rgba(255, 255, 255, 0.82);
	-webkit-backdrop-filter: saturate(1.6) blur(22px);
	backdrop-filter: saturate(1.6) blur(22px);
	border: 1px solid rgba(255, 255, 255, 0.95);
	box-shadow: 0 18px 40px -16px rgba(213, 116, 156, 0.55);
	color: #A89;
}
.tt-player[hidden] { display: none; }
body.tt-has-player { padding-bottom: 6rem; }
.tt-icon {
	appearance: none;
	border: none;
	background: none;
	padding: 0.25rem;
	cursor: pointer;
	color: #c98a9a;
	display: inline-grid;
	place-items: center;
}
.tt-icon svg { width: 1.2rem; height: 1.2rem; fill: currentColor; }
.tt-icon:hover { color: rgb(235, 120, 125); }
.ttp-meta {
	display: flex;
	flex-direction: column;
	min-width: 0;
	width: 13rem;
	line-height: 1.2;
}
.ttp-meta strong { color: rgb(235, 120, 125); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ttp-meta span { font-size: 0.8rem; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ttp-time { font-size: 0.8rem; font-weight: 600; font-variant-numeric: tabular-nums; }
.ttp-wave { flex: 1 1 auto; min-width: 60px; height: 34px; cursor: pointer; }
.ttp-vol { width: 5.5rem; accent-color: rgb(235, 120, 125); }
.ttp-license.license_button { min-width: 0; padding: 0.5em 1.1em; }

@media (max-width: 760px) {
	.ttp-vol, #ttp-prev, #ttp-next { display: none; }
	.ttp-meta { width: 8.5rem; }
}
@media (max-width: 520px) {
	.tt-player { border-radius: 1.4rem; flex-wrap: wrap; padding: 0.55rem 0.8rem; }
	.ttp-meta { flex: 1 1 0; width: auto; }
	.ttp-wave { order: 5; flex-basis: 100%; height: 28px; }
	.ttp-time { display: none; }
	.tt-wave-row { flex-wrap: wrap; }
	.tt-wave { flex-basis: 100%; }
}
@media (prefers-reduced-motion: reduce) {
	.tt-play, .tt-play:hover { transition: none; transform: none; }
}

/* ===================================================================
   Song list layout (2026-11-05, after utabane.com): play, cover,
   title + tags + waveform + links, price + License. A band on the
   left and the category chip use the category's colour.
   =================================================================== */
:root {
	--cat-all:         rgb(235, 120, 125);
	--cat-animals:     #46c489;
	--cat-classics:    #e9a92e;
	--cat-dance:       #f06cc4;
	--cat-educational: #6e8fe8;
	--cat-lullabies:   #a07ade;
	--cat-play:        #f4796b;
	--cat-seasonal:    #e2575c;
	--cat-vehicles:    #3fa6e0;
}

/* category chips: white, the chosen one filled ("inverted") */
.tt-chips { display: flex; flex-wrap: wrap; justify-content: center; gap: 0.6rem; max-width: 860px; margin: 0.9rem auto 0.5rem; }
.tt-chip { position: relative; cursor: pointer; }
.tt-chip input { position: absolute; opacity: 0; pointer-events: none; }
.tt-chip > span {
	display: inline-block;
	padding: 0.4rem 1.1rem;
	border-radius: 999px;
	font-size: 0.95rem;
	font-weight: 700;
	color: #8f7884;
	background: rgba(255, 255, 255, 0.75);
	border: 1px solid rgba(255, 255, 255, 0.95);
	box-shadow: 0 6px 14px -10px rgba(213, 116, 156, 0.45);
	transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
}
.tt-chip:hover > span { transform: translateY(-1px); color: var(--cat); }
.tt-chip input:checked + span { background: var(--cat); border-color: var(--cat); color: #fff; box-shadow: 0 8px 16px -8px var(--cat); }
.tt-chip input:focus-visible + span { outline: 3px solid rgba(104, 136, 255, 0.6); outline-offset: 2px; }

/* rows */
.table-div.tt-list { gap: 1rem; }
.row-div.tt-row {
	display: grid;
	grid-template-columns: auto auto minmax(0, 1fr) auto;
	align-items: center;
	gap: 0.75rem 1.25rem;
	padding: 1.2rem 1.4rem 1.2rem 1.15rem;
	border-radius: 1.25rem;
	border: 1px solid rgba(255, 255, 255, 0.9);
	border-left: 0.35rem solid var(--cat, var(--cat-all));
	background: rgba(255, 255, 255, 0.62);
}
.tt-row .tt-play { align-self: center; }
.tt-play-off { display: inline-block; width: 2.4rem; height: 2.4rem; border-radius: 50%; background: rgba(170, 136, 153, 0.12); box-shadow: none; }
.tt-cover {
	display: block;
	width: 140px;
	height: 140px;
	border-radius: 1.1rem;
	object-fit: cover;
	background: rgba(170, 136, 153, 0.12);
	box-shadow: 0 6px 14px -8px rgba(213, 116, 156, 0.5);
}
.tt-main { min-width: 0; }
.tt-row .tt-title { font-size: clamp(1.05rem, 1rem + 0.3vw, 1.2rem); line-height: 1.5; }
.tt-title-extra { font-weight: 600; color: #A89; }
.tt-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 0.4rem 0.7rem; margin-top: 0.35rem; font-size: 0.85rem; font-weight: 700; color: #A89; }
.tt-cat {
	padding: 0 0.65rem;
	border-radius: 999px;
	font-size: 0.75rem;
	line-height: 1.7;
	color: var(--cat);
	background: color-mix(in srgb, var(--cat) 14%, white);
}
.tt-dur { font-variant-numeric: tabular-nums; }
.tt-inst { font-weight: 700; color: #5bb98a; }  /* "Instrumental included": plain text */
.tt-row .tt-wave-row { padding-top: 0.6rem; }
.tt-row .tt-wave { height: 32px; }

.tt-links { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: 0.75rem; }
.tt-link {
	display: inline-flex;
	align-items: center;
	gap: 0.3em;
	padding: 0.32em 0.95em;
	border-radius: 999px;
	font-size: 0.82rem;
	font-weight: 700;
	text-decoration: none;
	color: var(--link);
	background: color-mix(in srgb, var(--link) 12%, white);
	border: 1px solid color-mix(in srgb, var(--link) 30%, white);
	transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
}
.tt-link svg { width: 1.05em; height: 1.05em; fill: currentColor; }
.tt-link:hover { color: #fff; background: var(--link); transform: translateY(-1px); }
.tt-spotify  { --link: rgb(70, 160, 105); }
.tt-youtube  { --link: rgb(232, 96, 94); }
.tt-download { --link: rgb(196, 146, 62); }

/* price at the top right, License at the bottom right of the row */
.tt-side { display: flex; flex-direction: column; align-items: flex-end; justify-content: space-between; gap: 0.75rem; align-self: stretch; }
.tt-side .price-div { font-size: 1.5rem; line-height: 1.2; }
.tt-soon { font-size: 0.9rem; font-weight: 700; color: #A89; white-space: nowrap; }

@media (max-width: 640px) {
	.row-div.tt-row { grid-template-columns: auto minmax(0, 1fr); align-items: start; padding: 1rem; gap: 0.85rem 0.9rem; }
	/* the play button sits on the cover's corner */
	.tt-row .tt-cover { width: 60px; height: 60px; grid-column: 1; grid-row: 1; }
	.tt-row .tt-play { grid-column: 1; grid-row: 1; align-self: start; justify-self: end; width: 2rem; height: 2rem; margin: 38px -8px 0 0; }
	.tt-row .tt-play svg { width: 1rem; height: 1rem; }
	.tt-row .tt-play { position: relative; z-index: 1; }
	.tt-wav { display: none; }
	.tt-row .tt-main { grid-column: 2; grid-row: 1; }
	.tt-row .tt-wave-row { flex-wrap: wrap; gap: 0.4rem; }
	.tt-row .tt-wave { flex-basis: 100%; }
	.tt-links { gap: 0.4rem; margin-top: 0.6rem; }
	.tt-link { font-size: 0.76rem; padding: 0.22em 0.7em; }
	.tt-side { grid-column: 1 / -1; grid-row: 2; flex-direction: row; align-items: center; justify-content: space-between; }
	.tt-side .license_button { min-width: 7em; }
}
