:root {
	--primary-background-color: #363353;
	--primary-color: #363353;
	--background-img: url("../images/Happily Ever After - Blur.jpg");
	/* Text, Buttons, Links */
	--primary-button-color: #1ab0e3;
	--play-button-color: #ffffff;
	--light-color: #ffffff;
	--primary-text-color: #ffffff;
	--font-size-base: 16px;
	--spacing-unit: 1rem;
}

* {
	box-sizing: border-box;
	padding: 0;
	margin: 0;
}

body {
	font-family: 'Lato', sans-serif;
	text-align: center;
	margin: 0;
	padding: 0;
	box-sizing: border-box;
	display: flex;
	flex-direction: column;
	justify-content: center;
	align-items: center;
	height: 100dvh;
}

.embedContainer {
	background: var(--primary-background-color) var(--background-img);
	color: var(--primary-color);
	background-position: 0% 0%;
	background-size: cover;
	height: 100%;
	width: 100vw;
	border-radius: 10px;
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 15px;
	justify-content: space-between;
}

.playData {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	border-radius: 0 0 10px 10px;
	/* height: 70px; */
	flex-basis: 50px;
	/* position: absolute; */
	left: 0;
	right: 0;
	padding: 0px;
	bottom: 0;
	background: var(--primary-color);
}

.playContainer {
	width: 95%;
	height: 80px;
	display: flex;
	gap: 15px;
	max-width: 500px;
	align-items: center;
	padding: 0;
}

.current-track-title {
	font-size: 17px;
	font-weight: bold;
	/* text-overflow: ellipsis; */
	white-space: nowrap;
	width: 100%;
	/* overflow: hidden; */
}

.current-track-artist {
	font-size: 15px;
	/* text-overflow: ellipsis; */
	white-space: nowrap;
	width: 100%;
	/* overflow: hidden; */
}

.connect {
	position: absolute;
	bottom: 0;
	right: 0;
	left: 0;
	height: 6vh;
	background: white;
	display: flex;
	align-items: center;
}

.connect ul.stream-links {
	list-style-type: none;
	padding: 0;
	margin: 0;
	display: flex;
	align-items: center;
	flex-direction: row;
	justify-content: space-evenly;
	width: 100%;
	max-width: 500px;
	margin: 0 auto;
	gap: 5px;
}

ul.stream-links li {
	flex: 1;
}

ul.stream-links li::before {
	content: '';
	display: block;
	width: 5px;
	/* Or adjust as needed */
	background-color: #795548;
	align-self: stretch;
	/* Stretches the divider */
}

ul.stream-links li:first-child::before {
	display: none;
}

/* -------------------
--- Install Button ---
--------------------*/
.installModal,
.installModalApple {
	background: #ffffff;
	color: var(--primary-color);
	border-radius: 12px;
	padding: 10px 15px;
	z-index: 100;
	position: absolute;
	top: 15px;
}

.installModal span,
.installModalApple span {
	position: relative;
	top: 2px;
}

.installModal.apple {
	display: none;
}

.install-btn {
	background: var(--primary-color);
	color: var(--light-color);
	font-size: 17px;
	/* padding: 10px 15px; */
	height: 40px;
	width: 100px;
	border-radius: 10px;
	/* margin: 25px 0 0 0; */
	border: none;
	cursor: pointer;
	margin: 0 5px;
}

.installModal svg {
	height: 20px;
	width: auto;
	padding: 5px;
	vertical-align: middle;
	baseline-shift: 5px;
}

.installModal span#dismissBtn,
.installModal span#dismissBtnApple {
	cursor: pointer;
}

.installModal span#dismissBtn svg,
.installModal span#dismissBtnApple svg {
	position: relative;
	bottom: 3.5px;
}

.installModal svg.appleShare {
	height: 30px;
}

/* End of Install Button */

/* -------------------
--- Request Modal ---
--------------------*/
.request-modal-overlay {
	position: fixed;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	background: rgba(0, 0, 0, 0.6);
	z-index: 2000;
	display: none;
	/* Hidden by default */
	justify-content: center;
	align-items: flex-end;
	padding: 0;
}

.request-modal-overlay.active {
	display: flex;
}

.request-modal-content {
	background: #ffffff;
	width: 100%;
	max-width: 100%;
	border-radius: 20px 20px 0 0;
	padding: 20px;
	display: flex;
	flex-direction: column;
	gap: 15px;
	height: 86vh;
	max-height: 86vh;
	color: var(--primary-color);
	box-shadow: 0 -4px 15px rgba(0, 0, 0, 0.3);
	animation: slideUp 0.3s ease-out;
}

.links-modal-content {
	background: #ffffff;
	width: 100%;
	max-width: 100%;
	border-radius: 20px 20px 0 0;
	padding: 20px;
	display: flex;
	flex-direction: column;
	gap: 15px;
	/* height: 86vh; */
	max-height: 86vh;
	color: var(--primary-color);
	box-shadow: 0 -4px 15px rgba(0, 0, 0, 0.3);
	animation: slideUp 0.3s ease-out;
}

@keyframes slideUp {
	from {
		transform: translateY(100%);
	}

	to {
		transform: translateY(0);
	}
}

.request-header {
	display: flex;
	justify-content: space-between;
	align-items: center;
}

.close-modal {
	font-size: 28px;
	font-weight: bold;
	cursor: pointer;
	line-height: 1;
}

.request-input {
	padding: 12px;
	border: 2px solid #ddd;
	border-radius: 8px;
	font-size: 16px;
	width: 100%;
	box-sizing: border-box;
	padding-right: 35px;
}

.search-wrapper {
	position: relative;
	width: 100%;
}

.clear-search-btn {
	position: absolute;
	right: 10px;
	top: 50%;
	transform: translateY(-50%);
	font-size: 24px;
	color: #999;
	cursor: pointer;
	line-height: 1;
	display: none;
}

#requestStep1 {
	display: flex;
	flex-direction: column;
	flex: 1;
	min-height: 0;
}

.request-results {
	flex: 1;
	overflow-y: auto;
	border-top: 1px solid #eee;
	padding-top: 10px;
	min-height: 150px;
}

.request-item {
	display: flex;
	align-items: center;
	gap: 15px;
	padding: 10px;
	border-bottom: 1px solid #f0f0f0;
	cursor: pointer;
	text-align: left;
}

.request-item:hover {
	background-color: #f9f9f9;
}

.request-actions {
	display: flex;
	justify-content: space-between;
	gap: 10px;
	margin-top: 10px;
}

.request-art {
	width: 50px;
	height: 50px;
	border-radius: 5px;
	object-fit: cover;
	background-color: #eee;
}

.request-info {
	display: flex;
	flex-direction: column;
	justify-content: center;
	overflow: hidden;
}

.request-title {
	font-weight: bold;
	font-size: 16px;
	color: var(--primary-color);
}

.request-artist {
	font-size: 14px;
	color: #666;
}

/*---------------------
--- Secondary Modal ---
----------------------*/
.modalLinks {
	list-style-type: none;
	display: flex;
	flex-direction:column;
	align-items: flex-start;
	gap: 10px;
}
.modalLinks li {
	display: flex;
	gap: 10px;
	align-items: center;
	font-size: 1.25rem;
	height: 2.5rem;
}
.modalLinks li svg {
	height: 1.5rem;
	width: auto;
}

.links-results {
	flex: 1;
	overflow-y: auto;
	border-top: 1px solid #eee;
	padding-top: 10px;
}
/* End Secondary Modal */

.opened .popoutLink {
	display: none;
}

.popout {
	height: 25px;
	width: auto;
	position: absolute;
	top: 15px;
	right: 15px;
}

a {
	color: var(--primary-color);
	text-decoration: none;
}

h1,
h2,
h3,
h4,
h5,
p {
	margin: 0;
	padding: 0;
}

.portrait h1 {
	display: none;
}

#station-logo {
	width: 85%;
	height: auto;
	margin: 15px 0 0;
}

.player-container {
	/* height: calc(100vh - 100px); */
	max-width: 500px;
	height: 100%;
	margin: 0 auto;
	padding: 0 15px;
	display: flex;
	flex-direction: column;
	gap: 20px;
	/* position: absolute; */
	/* top: 100px; */
	bottom: 70px;
	left: 0;
	right: 0;
}


.modalButtons button svg {
	height: 2rem;
	width: auto;
	stroke: var(--light-color);
}

.columns .trackHistory h4 {
	text-align: left;
	font-size: 1rem;
}

.album-art {
	width: 80%;
	height: auto;
	background-size: cover;
	background-position: center;
	border-radius: 20px;
}

.track-title {
	font-size: 18px;
	font-weight: bold;
	margin: 10px 0;
}

.artist-name {
	font-size: 16px;
	color: #777;
}

.controls {
	position: relative;
}

.columns {
	display: flex;
	flex-direction: column;
	gap: 15px;
	height: 100%;
}

.columnLeft {
	flex-basis: auto;
}

.columnRight {
	display: flex;
	flex-direction: column;
	justify-content: space-evenly;
	align-items: center;
	/* flex-basis: 150px; */
	gap: 15px;
	height: 100%;
}

.columns .current-track-title {
	font-size: 30px;
	font-weight: bold;
	/* padding: 15px 0 10px; */
	white-space: nowrap;
	margin: 0;
	display: inline-block;
}

.columns #current-track-artist {
	font-size: 20px;
}

.columns h4 {
	padding: 0;
	font-size: 20px;
}

.modalButtons {
	display: flex;
	gap: 30px;
	align-content: center;
	justify-content: center;
}

.modalButtons button {
	width: 200px;
	display: flex;
	justify-content: center;
	align-items: center;
	gap: 5px;
	border-radius: 15px;
	border: none;
	background: var(--primary-color);
	color: var(--light-color);
	padding: 10px 15px;
	font-size: 1rem;
}

.stream-links ul {
	list-style-type: none;
	padding: 0;
	margin: 0;
	display: flex;
	flex-direction: row;
	justify-content: center;
	gap: 10px;
	vertical-align: middle;
}

.stream-links li svg {
	height: 30px;
	width: auto;
	vertical-align: middle;
	padding: 0 5px;
}

.play-button {
	background: var(--primary-color);
	color: #fff;
	border: none;
	padding: 10px 20px;
	font-size: 16px;
	border-radius: 5px;
	cursor: pointer;
	position: absolute;
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%);
}

.play-button:hover {
	background: #0056b3;
}

.station-info {
	height: fit-content;
	display: flex;
	align-items: center;
	justify-content: center;
}

.current-track img {
	max-width: 375px;
	max-height: 375px;
	width: 70vw;
	border-radius: 25px;
}

/* Cast Button */
/* Make the launcher visible and themed */
google-cast-launcher.cast-btn {
	width: 40px;
	height: 40px;
	display: inline-block;
	/* color variables the element understands */
	--disconnected-color: var(--light-color);
	--connected-color: var(--primary-color);
	--activating-color: var(--primary-color);
	/* optional hover */
	cursor: pointer;
	position: absolute;
	top: 25px;
	right: 25px;
	z-index: 50;
}

/* Keep your control row aligned nicely */
#controls {
	display: inline-flex;
	align-items: center;
	gap: .5rem;
	height: 50px;
	width: 50px;
	/* border-top: 2px solid; */
	/* padding: 10px; */
	flex-basis: 50px;
	margin-left: 10px;
}



.track-info {
	display: flex;
	flex-direction: column;
	justify-content: center;
	text-align: left;
	overflow: hidden;
	white-space: nowrap;
	color: var(--light-color);
	/* text-overflow: ellipsis; */
	flex: 1;
	min-width: 0;
}

/* The Animation Class (Applied via JS) */
/* We target the specific class to ensure padding/animation overrides everything else */
.current-track-title.animate,
.current-track-artist.animate {
	padding-left: 100%;
	/* Start off the right edge */
	animation: scroll-left 10s linear infinite;
	box-sizing: content-box;
	width: fit-content;
	overflow: visible;
}

@keyframes scroll-left {
	0% {
		transform: translateX(0);
	}

	100% {
		transform: translateX(-100%);
	}
}


/* Stream Links */
.stream-links {
	/* display: none; */
	/* flex-basis: 50px; */
	display: flex;
	align-items: center;
}

.stream-links h3 {
	display: none;
}

/* Support Buttons */
.support {
	display: flex;
	width: 90%;
	justify-content: space-evenly;
	/* flex-basis: 50px; */
	align-items: center;
}

.support h3 {
	padding: 15px 0;
	display: none;
}

.support button {
	background: var(--primary-color);
	color: var(--light-color);
	font-size: 17px;
	padding: 10px 15px;
	border-radius: 10px;
	/* margin: 5px; */
	border: none;
	cursor: pointer;
}

.support button svg {
	width: 17px;
	height: 17px;
	padding-right: 5px;
	vertical-align: middle;
}

.embed .paypalButton {
	display: none;
}

/* New Button CSS */
.player-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	/* gap: .5rem; */
	border: 0;
	background: none;
	color: var(--light-color);
	/* padding: .6rem .9rem; */
	border-radius: 50%;
	border: 5px solid var(--light-color);
	height: 50px;
	width: 50px;
	cursor: pointer;
	position: absolute;
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%);
}

.player-btn .icon {
	display: none;
	fill: var(--light-color);
}

.player-btn .icon-play {
	display: inline;
}

/* default: show play */
.player-btn.is-playing .icon-play {
	display: none;
}

/* when playing: hide play */
.player-btn.is-playing .icon-pause {
	display: inline;
}

/* when playing: show pause */

/* Screen-reader only helper */
.sr-only {
	position: absolute;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}

.landscape {
	display: none;
}

.portrait {
	/* display: block; */
}

@media only screen and (min-width: 850px) {
	.player-container {
		max-width: fit-content;
		align-items: center;
		justify-content: center;
	}

	.installModal {
		position: absolute;
		opacity: 50%;
		bottom: 140px;
		right: 25px;
		top: initial;
	}

	.installModal:hover {
		opacity: 90%;
	}

	.controls {
		padding: 0;
	}

	.portrait {
		/* display: none; */
	}

	.landscape {
		display: block;
	}

	.album-art {
		width: 100%;
	}

	#station-logo {
		width: 350px;
	}

	.landscape h1 {
		display: none;
	}

	.station-info {}

	.columns {
		gap: 25px;
		justify-content: center;
		flex-direction: row;
	}

	.columnLeft,
	.columnRight {
		width: 500px;
	}

		.columnLeft, .columnRight {
		display: flex;
		flex-direction: column;
		justify-content: center;
		align-content: center;
	}

	.playData {
		/* flex-basis: 155px; */
	}

	.columnRight .support,
	.columnRight .stream-links {}

	.current-track .columnLeft img {
		max-width: 100%;
		max-height: 90dvh;
		width: 100%;
	}

	.current-track #current-track-title {
		padding: 0 0 10px;
	}
}

/* History List Styles */
.trackHistory {
	background: #ffffff80;
	border-radius: 5px;
	padding: 15px;
	width: 90%;
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 5px;
	margin: 0 15px;
}

.track-history-list {
	list-style: none;
	padding: 0;
	margin: 0;
	display: flex;
	flex-direction: row;
	flex-wrap: wrap;
	gap: 5px;
	/* justify-content: space-between; */
}

.history-item {
	display: flex;
	align-items: center;
	gap: 10px;
	/* background: rgba(255, 255, 255, 0.1); */
	padding: 10px;
	border-radius: 8px;
	text-align: left;
	overflow: hidden;
	background: #ffffff55;
}

.history-art {
	width: 50px;
	height: 50px;
	border-radius: 5px;
	object-fit: cover;
}

.history-info {
	display: flex;
	flex-direction: row;
	align-items: center;
}

.history-title {
	font-weight: bold;
	font-size: 0.9rem;
	white-space: nowrap;
	display: flex;
	align-items: center;
}

.history-artist {
	font-size: 0.8rem;
	opacity: 0.8;
	overflow: hidden;
	text-overflow: ellipsis;
}