/*
 * Music Star Encore - child theme styles.
 *
 * TABLE OF CONTENTS
 * 1. Variables
 * 2. Tour dates
 * 3. Front page music area
 * 4. Featured track player
 * 5. Reduced motion
 */

/* 1. Variables
--------------------------------------------- */
:root {
	--mse-accent: #c36dff;
	--mse-accent-alt: #ff4f8b;
	--mse-accent-bg: linear-gradient(90deg, #c36dff 0%, #ff4f8b 100%);
	--mse-radius: 6px;
	--mse-heading-font: 'Raleway', Arial, Helvetica, sans-serif;
}

@keyframes mse-bounce {
	0% { transform: scaleY(0.35); }
	100% { transform: scaleY(1); }
}


/* Sound wave
--------------------------------------------- */
.mse-wave {
	display: flex;
	align-items: flex-end;
	justify-content: center;
	gap: 4px;
	height: 64px;
	padding: 8px 12px 0;
	overflow: hidden;
}

.mse-wave span {
	flex: 1 1 0;
	max-width: 14px;
	height: 30%;
	border-radius: 3px 3px 0 0;
	background: linear-gradient(to top, var(--mse-accent), var(--mse-accent-alt, var(--mse-accent)));
	opacity: 0.85;
	transform-origin: bottom;
}

.mse-wave span:nth-child(3n) { height: 70%; }
.mse-wave span:nth-child(4n) { height: 45%; }
.mse-wave span:nth-child(5n) { height: 95%; }
.mse-wave span:nth-child(7n) { height: 60%; }
.mse-wave span:nth-child(11n) { height: 85%; }

.mse-wave-animated span {
	animation: mse-bounce 1.2s ease-in-out infinite alternate;
}

.mse-wave-animated span:nth-child(2n) { animation-duration: 0.9s; }
.mse-wave-animated span:nth-child(3n) { animation-duration: 1.5s; animation-delay: -0.4s; }
.mse-wave-animated span:nth-child(5n) { animation-duration: 1.1s; animation-delay: -0.8s; }
.mse-wave-animated span:nth-child(7n) { animation-duration: 1.7s; animation-delay: -0.2s; }

/* 2. Tour dates
--------------------------------------------- */
.mse-tour {
	padding: 50px 20px 20px;
	overflow-x: hidden;
}

.mse-tour-inner {
	max-width: 1000px;
	margin: 0 auto;
}

.mse-tour-title {
	margin: 0 0 25px;
	text-align: center;
	font-size: 2.2em;
}

.mse-tour-list {
	position: relative;
	margin: 0;
	padding: 0;
	list-style: none;
}

.mse-show {
	display: flex;
	align-items: center;
	gap: 24px;
	margin-bottom: 12px;
	padding: 16px 20px;
	border: 1px solid rgba(128, 128, 128, 0.25);
	border-left: 4px solid var(--mse-accent);
	border-radius: var(--mse-radius);
	background: rgba(128, 128, 128, 0.08);
	transition: transform 0.2s ease, background 0.2s ease;
}

.mse-show:hover {
	transform: translateX(4px);
	background: rgba(128, 128, 128, 0.14);
}

/*
 * Scroll animation: odd shows slide in from the left, even ones from the right.
 * The .mse-animate class is added by JavaScript, so without JavaScript the
 * list is simply visible.
 */
.mse-tour-list.mse-animate .mse-show {
	opacity: 0;
	transform: translateX(-100vw);
	transition: opacity 1.2s ease, transform 1.6s cubic-bezier(0.25, 0.8, 0.25, 1), background 0.2s ease;
}

.mse-tour-list.mse-animate .mse-show:nth-child(even) {
	transform: translateX(100vw);
}

.mse-tour-list.mse-animate .mse-show.is-visible {
	opacity: 1;
	transform: none;
}

.mse-tour-list.mse-animate .mse-show.is-visible:hover {
	transform: translateX(4px);
}

.mse-tour-list.mse-animate .mse-show.is-done {
	transition: transform 0.2s ease, background 0.2s ease;
}

.mse-show-date {
	display: flex;
	flex-direction: column;
	align-items: center;
	min-width: 64px;
	line-height: 1.1;
	text-transform: uppercase;
}

.mse-show-day {
	font-family: var(--mse-heading-font);
	font-size: 2em;
	font-weight: 700;
	color: var(--mse-accent);
}

.mse-show-month,
.mse-show-year {
	font-size: 0.8em;
	letter-spacing: 0.1em;
}

.mse-show-place {
	display: flex;
	flex: 1;
	flex-direction: column;
}

.mse-show-city {
	font-family: var(--mse-heading-font);
	font-size: 1.25em;
	font-weight: 700;
}

.mse-show-venue {
	opacity: 0.8;
}

a.mse-show-tickets {
	display: inline-block;
	padding: 10px 22px;
	border-radius: var(--mse-radius);
	background: var(--mse-accent-bg);
	color: #fff;
	font-weight: 700;
	text-decoration: none;
	text-transform: uppercase;
	letter-spacing: 0.06em;
	white-space: nowrap;
}

a.mse-show-tickets:hover,
a.mse-show-tickets:focus {
	color: #fff;
	filter: brightness(1.12);
}

.mse-tour-empty {
	text-align: center;
	opacity: 0.8;
}

@media screen and (max-width: 600px) {
	.mse-show {
		flex-wrap: wrap;
		gap: 12px 16px;
	}

	a.mse-show-tickets {
		width: 100%;
		text-align: center;
	}
}

/* 3. Front page music area
--------------------------------------------- */
.mse-front-area {
	padding: 30px 20px 10px;
}

.mse-front-area-inner {
	max-width: 1000px;
	margin: 0 auto;
}

.mse-front-widget {
	margin-bottom: 30px;
}

/* 4. Featured track player
--------------------------------------------- */
.mse-player {
	position: fixed;
	right: 0;
	bottom: 0;
	left: 0;
	z-index: 9995;
	padding: 10px 16px;
	border-top: 2px solid var(--mse-accent);
	background: rgba(10, 10, 14, 0.94);
	-webkit-backdrop-filter: blur(10px);
	backdrop-filter: blur(10px);
	color: #eee;
}

.mse-player-inner {
	display: flex;
	align-items: center;
	gap: 16px;
	max-width: 1200px;
	margin: 0 auto;
}

.mse-player-icon {
	display: flex;
	align-items: flex-end;
	gap: 3px;
	width: 26px;
	height: 22px;
}

.mse-player-icon span {
	flex: 1;
	height: 40%;
	background: var(--mse-accent);
}

.mse-player-icon span:nth-child(2) { height: 100%; }
.mse-player-icon span:nth-child(3) { height: 65%; }
.mse-player-icon span:nth-child(4) { height: 85%; }

.mse-player.is-playing .mse-player-icon span {
	animation: mse-bounce 0.8s ease-in-out infinite alternate;
}

.mse-player.is-playing .mse-player-icon span:nth-child(2) { animation-delay: -0.3s; }
.mse-player.is-playing .mse-player-icon span:nth-child(3) { animation-delay: -0.6s; }

.mse-player-meta {
	display: flex;
	flex-direction: column;
	min-width: 0;
	line-height: 1.3;
}

.mse-player-label {
	font-size: 11px;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	color: var(--mse-accent);
}

.mse-player-title,
.mse-player-artist {
	overflow: hidden;
	white-space: nowrap;
	text-overflow: ellipsis;
	color: #fff;
}

.mse-player-artist {
	font-size: 0.85em;
	color: #bbb;
}

.mse-player-audio {
	flex: 1;
	min-width: 140px;
}

.mse-player-audio .wp-audio-shortcode,
.mse-player-audio .mejs-container {
	margin: 0;
}

.mse-player .mejs-container,
.mse-player .mejs-container .mejs-controls {
	background: transparent;
}

.mse-player .mejs-controls .mejs-time-rail .mejs-time-current {
	background: var(--mse-accent);
}

button.mse-player-close {
	flex: 0 0 auto;
	width: 34px;
	height: 34px;
	padding: 0;
	border: 1px solid rgba(255, 255, 255, 0.25);
	border-radius: 50%;
	background: transparent;
	color: #fff;
	font-size: 20px;
	line-height: 1;
	cursor: pointer;
}

button.mse-player-close:hover,
button.mse-player-close:focus {
	background: rgba(255, 255, 255, 0.12);
	filter: none;
}

.mse-player-notice {
	margin: 0;
	font-size: 0.9em;
	color: #ddd;
}

/* Minimized player: a round button in the bottom left corner. */
button.mse-player-open {
	display: none;
	align-items: flex-end;
	justify-content: center;
	gap: 3px;
	width: 52px;
	height: 52px;
	padding: 15px 14px;
	border: 0;
	border-radius: 50%;
	background: var(--mse-accent-bg);
	box-shadow: 0 6px 20px rgba(0, 0, 0, 0.45);
	cursor: pointer;
}

button.mse-player-open span {
	flex: 1;
	height: 40%;
	background: #fff;
	transform-origin: bottom;
}

button.mse-player-open span:nth-child(2) { height: 100%; }
button.mse-player-open span:nth-child(3) { height: 65%; }
button.mse-player-open span:nth-child(4) { height: 85%; }

button.mse-player-open:hover,
button.mse-player-open:focus {
	filter: brightness(1.12);
}

.mse-player.is-collapsed {
	padding: 0;
	border-top-color: transparent;
	background: transparent;
	-webkit-backdrop-filter: none;
	backdrop-filter: none;
	pointer-events: none;
}

/*
 * The bar keeps its full width while minimized and is only hidden visually,
 * so the audio controls always have the right size (no display: none).
 */
.mse-player.is-collapsed .mse-player-inner {
	height: 0;
	overflow: hidden;
	visibility: hidden;
}

.mse-player.is-collapsed button.mse-player-open {
	display: flex;
	position: fixed;
	bottom: 20px;
	left: 20px;
	pointer-events: auto;
}

.mse-player.is-playing button.mse-player-open span {
	animation: mse-bounce 0.8s ease-in-out infinite alternate;
}

.mse-player.is-playing button.mse-player-open span:nth-child(2) { animation-delay: -0.3s; }
.mse-player.is-playing button.mse-player-open span:nth-child(3) { animation-delay: -0.6s; }

.mse-has-player .site-footer {
	padding-bottom: 80px;
}

.mse-has-player .cd-top {
	bottom: 90px;
}

.mse-has-player.mse-player-collapsed .site-footer {
	padding-bottom: 0;
}

.mse-has-player.mse-player-collapsed .cd-top {
	bottom: 20px;
}

@media screen and (max-width: 600px) {
	.mse-player-inner {
		flex-wrap: wrap;
		gap: 8px 12px;
	}

	.mse-player-meta {
		flex: 1;
	}

	.mse-player-audio {
		flex-basis: 100%;
		order: 4;
	}

	.mse-has-player .site-footer {
		padding-bottom: 130px;
	}

	.mse-has-player .cd-top {
		bottom: 140px;
	}
}

/* 5. Reduced motion
--------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
	.mse-wave-animated span,
	.mse-player.is-playing .mse-player-icon span,
	.mse-player.is-playing button.mse-player-open span {
		animation: none;
	}

	.mse-show {
		transition: none;
	}
}
