/* Fonts */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;500&family=Roboto:wght@400;500&display=swap');

/* Defaults */
#embed-app {
	font-family: 'Roboto', sans-serif;
	line-height: 1;
	position: relative;
	overflow: hidden;
}
button {
	outline: none;
	border: none;
}

body {
	margin: 0;
}

/* Player */
.player {
	width: 100%;
	height: 150px;
	background: linear-gradient(359.68deg, #24212c 1.03%, #383344 77.9%);
	border-radius: 4px;
	overflow: hidden;
}
.player__main {
	display: grid;
	grid-template-columns: 150px 1fr;
	grid-gap: 15px;
	position: relative;
}
.player__artwork {
	line-height: 0;
	z-index: 0;
}
.player__artwork:hover {
	cursor: pointer;
}
.player__artwork img {
	height: 150px;
	width: 150px
}
.player__body {
	display: grid;
	grid-template-rows: auto auto 1fr;
	padding: 13px 13px 10px 0;
}
.powered-by {
	position: absolute;
	bottom: 15px;
	right: 15px;
	background-position: top left;
	background-repeat: no-repeat;
	opacity: 0.4;
	background: url('images/castos-logo-light.svg');
}
.powered-by a {
	width: 59px;
	display: block;
	height: 20px;
}

/* Panels */
.player-panels .player-panel {
	position: absolute;
	left: 12px;
	right: 12px;
	top: 12px;
	bottom: 0%;
	background: #2e2a37;
	box-shadow: 0px 0px 12px rgba(0, 0, 0, 0.05);
	border-radius: 3px 3px 0px 0px;
	z-index: 2;
	transform: translateY(110%);
	transition: all 250ms ease-in-out;
}
.player-panels .player-panel.open {
	transform: translateY(0);
}
.close-btn {
	z-index: 3;
	position: absolute;
	top: -7px;
	right: -7px;
	background-color: #fff;
	border-radius: 50%;
	display: inline-block;
	width: 21px;
	height: 21px;
}
.close-btn span {
	display: inline-block;
	width: 13px;
	height: 2px;
	background-color: #df4e4f;
	position: absolute;
	left: 4px;
	top: 9px;
	transition: all 100ms ease-in-out;
}
.close-btn span:nth-child(1) {
	transform: rotate(45deg);
}
.close-btn span:nth-child(2) {
	transform: rotate(-45deg);
}
.close-btn:hover {
	cursor: pointer;
}
.close-btn:hover span:nth-child(1) {
	transform: rotate(135deg);
}
.close-btn:hover span:nth-child(2) {
	transform: rotate(45deg);
}

.player-panel {
	padding: 12px 7px 10px 15px;
}
.player-panel h3 {
	font-family: 'Poppins', sans-serif;
	font-weight: 500;
	color: #fff;
	margin: 0 0 5px 0;
}
.player-panel .player-panel-row {
	display: grid;
	grid-template-columns: 70px 1fr 30px;
	margin-bottom: 10px;
	align-items: center;
}
.player-panel .player-panel-row .title {
	color: #fff;
	text-transform: uppercase;
	font-family: 'Poppins', sans-serif;
	font-weight: 500;
	font-size: 14px;
}
.player-panel .player-panel-row button {
	justify-self: flex-end;
	padding: 16px 13px 15px 14px;
	border-radius: 0 4px 4px 0;
	transition: all 200ms ease-in-out;
	display: block;
	mask-image: url('images/icon-copy.svg');
	mask-repeat: no-repeat;
	mask-position: center center;
	-webkit-mask-image: url('images/icon-copy.svg');
	-webkit-mask-repeat: no-repeat;
	-webkit-mask-position: center center;
	border: none;
	background-color: #f8f6f6;
}
.player-panel .player-panel-row button:hover {
	cursor: pointer;
	background-color: #df4e4f !important;
}
.icons-holder {
	display: grid;
	grid-template-columns: auto auto 1fr;
}
.share-icon {
	width: 30px;
	height: 30px;
	display: grid;
	align-items: center;
	justify-content: center;
	margin-right: 10px;
	border-radius: 50%;
	transition: all 200ms ease-in-out;
	background-color: #423d4c;
}
.share-icon span {
	mask-repeat: no-repeat;
	mask-position: center center;
	-webkit-mask-repeat: no-repeat;
	-webkit-mask-position: center center;
	width: 14px;
	height: 15px;
	background-color: #fff;
}
.share-icon.facebook span {
	mask-image: url('images/brands/icon-brand-facebook.svg');
	-webkit-mask-image: url('images/brands/icon-brand-facebook.svg');
}
.share-icon.twitter span {
	mask-image: url('images/brands/icon-brand-twitter.svg');
	-webkit-mask-image: url('images/brands/icon-brand-twitter.svg');
}
.share-icon.download span {
	mask-image: url('images/icon-download.svg');
	-webkit-mask-image: url('images/icon-download.svg');
}

#embed-app .share-icon:hover {
	background-color: #df4e4f !important;
}
.player-panel .player-panel-row input {
	border: none;
	padding: 7px;
	margin: 0;
	color: #d4c9c9;
	background-color: #423d4c;
	font-size: 14px;
	width: calc(100% - 14px);
	border-radius: 2px;
	text-overflow: ellipsis;
}
.subscribe-icons {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	grid-gap: 10px 15px;
	align-items: center;
	justify-content: start;
	margin: 5px 0 15px 0;
}
.subscribe-icons a {
	color: #fff;
	text-decoration: none;
	font-size: 11px;
	display: grid;
	grid-template-columns: auto 1fr;
	align-items: center;
	grid-gap: 5px;
	opacity: 0.8;
	margin: 0;
	float: none;
}
.subscribe-icons a:hover {
	opacity: 1;
	cursor: pointer;
	color: #fff;
}
.subscribe-icons span {
	mask-repeat: no-repeat;
	mask-position: left center;
	-webkit-mask-repeat: no-repeat;
	-webkit-mask-position: left center;
	width: 20px;
	height: 20px;
	background-color: #fff;
}
.subscribe-icons .apple-podcasts span {
	mask-image: url('images/brands/icon-brand-apple-podcasts.svg');
	-webkit-mask-image: url('images/brands/icon-brand-apple-podcasts.svg');
}
.subscribe-icons .sticher span {
	mask-image: url('images/brands/icon-brand-sticher.svg');
	-webkit-mask-image: url('images/brands/icon-brand-sticher.svg');
}
.subscribe-icons .overcast span {
	mask-image: url('images/brands/icon-brand-overcast.svg');
	-webkit-mask-image: url('images/brands/icon-brand-overcast.svg');
}
.subscribe-icons .pocketcasts span {
	mask-image: url('images/brands/icon-brand-pocketcasts.svg');
	-webkit-mask-image: url('images/brands/icon-brand-pocketcasts.svg');
}
.subscribe-icons .spotify span {
	mask-image: url('images/brands/icon-brand-spotify.svg');
	-webkit-mask-image: url('images/brands/icon-brand-spotify.svg');
}
.subscribe-icons .castro span {
	mask-image: url('images/brands/icon-brand-castro.svg');
	-webkit-mask-image: url('images/brands/icon-brand-castro.svg');
}

/* Currently Playing */
.currently-playing {
	overflow: hidden;
	width: 100%;
}
.currently-playing .show {
	color: #fff;
	opacity: 0.6;
	font-size: 14px;
	line-height: 1.1;
	text-overflow: ellipsis;
	white-space: nowrap;
	overflow: hidden;
}
.currently-playing .show strong {
	padding-right: 2px;
}
.currently-playing .show span {
	padding-left: 3px;
	white-space: nowrap;
}
.episode-title {
	color: #fff;
	font-family: 'Poppins', sans-serif;
	font-size: 16px;
	margin: 7px 0 4px 0;
	line-height: 1.2;
	height: 25px;
	text-overflow: ellipsis;
	white-space: nowrap;
	overflow: hidden;
	width: 100%;
}
.play-progress {
	display: grid;
	grid-template-columns: 45px 1fr;
	grid-gap: 15px;
}
.play-pause-controls {
	background: #fff;
	position: relative;
	width: 44px;
	height: 44px;
	display: block;
	border-radius: 50%;
}
.play-pause-controls button {
	position: absolute;
}
.play-pause-controls .play-btn {
	background: url('images/icon-play.svg');
	background-repeat: no-repeat;
	background-position: 14px 11px;
	border: none;
	padding: 22px;
	z-index: 2;
	border-radius: 50%;
	width: 44px;
	height: 44px;
}
.play-pause-controls .play-btn:hover {
	cursor: pointer;
	transform: scale(1.1);
}
.play-pause-controls .pause-btn {
	background: url('images/icon-pause.svg');
	background-repeat: no-repeat;
	background-position: 13px 13px;
	border: none;
	padding: 22px;
	z-index: 2;
	border-radius: 50%;
	width: 44px;
	height: 44px;
}
.play-pause-controls .pause-btn:hover {
	cursor: pointer;
	transform: scale(1.1);
}
.play-pause-controls .hide {
	display: none;
}
.play-pause-controls .loader {
	padding: 4px 3px 4px 3px;
	animation-name: spin;
	animation-duration: 3000ms;
	animation-iteration-count: infinite;
	animation-timing-function: linear;
	z-index: 1;
}
@keyframes spin {
	from {
		transform: rotate(0deg);
	}
	to {
		transform: rotate(360deg);
	}
}

.progress {
	flex: 10;
	position: relative;
	display: flex;
	flex-basis: 100%;
	width: 100%;
	height: 8px;
	border-radius: 10px;
	margin: 4px 0;
	cursor: ew-resize;
	background-color: #4c4659;
}
.progress__filled {
	width: 0;
	flex: 0;
	flex-basis: 0;
	border-radius: 10px;
	background-color: #df4e4f;
}

.play-pause-controls .icon {
	position: absolute;
	top: 15px;
}

/* Audio Player */
.playback {
	display: grid;
	grid-template-columns: 1fr auto;
	justify-items: flex-start;
	padding: 5px 0;
}
.playback__controls {
	display: grid;
	grid-template-columns: repeat(4, auto);
	justify-content: center;
	align-items: center;
	grid-gap: 10px;
}
.playback__timers {
	color: #fff;
	opacity: 0.4;
	font-size: 12px;
	letter-spacing: normal;
	transition: all 200ms ease-in-out;
}
.playback__timers span {
	opacity: 0.6;
}
.playback__controls button {
	opacity: 0.4;
	transition: all 200ms ease-in-out;
}
.player:hover .playback__controls button,
.player:hover .playback__timers,
.player:hover .player-panels-nav button {
	opacity: 0.65;
}
.player:hover .playback__controls button:hover {
	opacity: 1;
	cursor: pointer;
}
.player-btn__volume,
.player-btn__rwd,
.player-btn__fwd {
	mask-repeat: no-repeat;
	mask-position: left center;
	-webkit-mask-repeat: no-repeat;
	-webkit-mask-position: left center;
}
.player-btn__volume {
	mask-image: url('images/icon-volume-on.svg');
	-webkit-mask-image: url('images/icon-volume-on.svg');
	border: none;
	width: 20px;
	height: 18px;
}
.player-btn__volume.off {
	mask-image: url('images/icon-volume-off.svg');
	-webkit-mask-image: url('images/icon-volume-off.svg');
	border: none;
	width: 20px;
	height: 18px;
	background-color: #dd4142 !important;
}
.player-btn__rwd {
	mask-image: url('images/icon-rwd.svg');
	-webkit-mask-image: url('images/icon-rwd.svg');
	border: none;
	width: 20px;
	height: 20px;
	background-color: #fff;
}
.player-btn__fwd {
	mask-image: url('images/icon-fwd.svg');
	-webkit-mask-image: url('images/icon-fwd.svg');
	border: none;
	width: 20px;
	height: 20px;
	background-color: #fff;
}
.player-btn__speed {
	font-size: 12px;
	border-radius: 4px;
	background: none;
	padding: 1px 4px;
	width: 32px;
	text-align: center;
	color: #fff;
	border: 1px solid #fff;
}
.player-panels-nav {
	margin-left: 52px;
	align-self: flex-end;
	line-height: normal;
}
.player-panels-nav button {
	border: none;
	padding: 3px 10px;
	font-size: 12px;
	font-family: 'Poppins', sans-serif;
	border-radius: 4px;
	text-transform: uppercase;
	opacity: 0.4;
	transition: all 200ms ease-in-out;
	color: #fff;
	background-color: rgba(255, 255, 255, 0);
}
.player:hover .player-panels-nav button:hover {
	opacity: 1;
	cursor: pointer;
	background-color: rgba(255, 255, 255, 0.1);
}

/* ///////////////////////////////////////////////////////////////////////// */
/* LIGHT MODE */
/* ///////////////////////////////////////////////////////////////////////// */
#embed-app.light-mode .player {
	background: linear-gradient(359.68deg, #dddddd 1.03%, #f0f0f0 77.9%);
}
#embed-app.light-mode .powered-by {
	background: url('images/castos-logo-dark.svg');
}
#embed-app.light-mode .player-panels .player-panel {
	background: #fff;
	box-shadow: 0px 0px 12px rgba(0, 0, 0, 0.05);
}
#embed-app.light-mode .close-btn {
	background-color: #423d4c;
}
#embed-app.light-mode .close-btn span {
	background-color: #fff;
}
#embed-app.light-mode .episode-title,
#embed-app.light-mode .currently-playing .show,
#embed-app.light-mode .subscribe-icons a,
#embed-app.light-mode .player-panel h3,
#embed-app.light-mode .player-panel .player-panel-row .title,
#embed-app.light-mode .playback__timers {
	color: #4b4659;
}
#embed-app.light-mode .share-icon,
#embed-app.light-mode .player-panel .player-panel-row input {
	background-color: #f1f1f1;
}
#embed-app.light-mode .player-panel .player-panel-row input {
	color: #5f596e;
}
#embed-app.light-mode .player-panels-nav button {
	color: #2e2a37;
	background-color: rgba(0, 0, 0, 0);
}
#embed-app.light-mode .player:hover .player-panels-nav button:hover {
	background-color: rgba(0, 0, 0, 0.05);
}
#embed-app.light-mode .player-btn__speed {
	color: #4b4659;
	border: 1px solid #4b4659;
}
#embed-app.light-mode .progress {
	background-color: #d3d3d3;
}
#embed-app.light-mode .player-panel .player-panel-row button {
	background-color: #5f596e;
}
#embed-app.light-mode .subscribe-icons span,
#embed-app.light-mode .share-icon span,
#embed-app.light-mode .player-btn__volume,
#embed-app.light-mode .player-btn__rwd,
#embed-app.light-mode .player-btn__fwd {
	background-color: #4c4659;
}

/* ///////////////////////////////////////////////////////////////////////// */
/* AUTO DETECT LIGHT MODE */
/* ///////////////////////////////////////////////////////////////////////// */
@media (prefers-color-scheme: light) {
	#embed-app .player {
		background: linear-gradient(359.68deg, #dddddd 1.03%, #f0f0f0 77.9%);
	}
	#embed-app .powered-by {
		background: url('images/castos-logo-dark.svg');
	}
	#embed-app .player-panels .player-panel {
		background: #fff;
		box-shadow: 0px 0px 12px rgba(0, 0, 0, 0.05);
	}
	#embed-app .close-btn {
		background-color: #423d4c;
	}
	#embed-app .close-btn span {
		background-color: #fff;
	}
	#embed-app .episode-title,
	#embed-app .currently-playing .show,
	#embed-app .subscribe-icons a,
	#embed-app .player-panel h3,
	#embed-app .player-panel .player-panel-row .title,
	#embed-app .playback__timers {
		color: #4b4659;
	}
	#embed-app .share-icon,
	#embed-app .player-panel .player-panel-row input {
		background-color: #f1f1f1;
	}
	#embed-app .player-panel .player-panel-row input {
		color: #5f596e;
	}
	#embed-app .player-panels-nav button {
		color: #2e2a37;
		background-color: rgba(0, 0, 0, 0);
	}
	#embed-app .player:hover .player-panels-nav button:hover {
		background-color: rgba(0, 0, 0, 0.05);
	}
	#embed-app .player-btn__speed {
		color: #4b4659;
		border: 1px solid #4b4659;
	}
	#embed-app .progress {
		background-color: #d3d3d3;
	}
	#embed-app .player-panel .player-panel-row button {
		background-color: #5f596e;
	}
	#embed-app .subscribe-icons span,
	#embed-app .share-icon span,
	#embed-app .player-btn__volume,
	#embed-app .player-btn__rwd,
	#embed-app .player-btn__fwd {
		background-color: #4c4659;
	}
}

/* ///////////////////////////////////////////////////////////////////////// */
/* DARK MODE */
/* ///////////////////////////////////////////////////////////////////////// */
#embed-app.dark-mode .player {
	background: linear-gradient(359.68deg, #24212c 1.03%, #383344 77.9%);
}
#embed-app.dark-mode .powered-by {
	background: url('images/castos-logo-light.svg');
}
#embed-app.dark-mode .player-panels .player-panel {
	background: #2e2a37;
	box-shadow: 0px 0px 12px rgba(0, 0, 0, 0.05);
}
#embed-app.dark-mode .close-btn {
	background-color: #fff;
}
#embed-app.dark-mode .close-btn span {
	background-color: #df4e4f;
}
#embed-app.dark-mode .episode-title,
#embed-app.dark-mode .currently-playing .show,
#embed-app.dark-mode .subscribe-icons a,
#embed-app.dark-mode .player-panel h3,
#embed-app.dark-mode .player-panel .player-panel-row .title,
#embed-app.dark-mode .playback__timers {
	color: #fff;
}
#embed-app.dark-mode .share-icon,
#embed-app.dark-mode .player-panel .player-panel-row input {
	color: #d4c9c9;
	background-color: #423d4c;
}
#embed-app.dark-mode .player-panels-nav button {
	color: #fff;
	background-color: rgba(255, 255, 255, 0);
}
#embed-app.dark-mode .player:hover .player-panels-nav button:hover {
	background-color: rgba(255, 255, 255, 0.1);
}
#embed-app.dark-mode .player-btn__speed {
	color: #fff;
	border: 1px solid #fff;
}
#embed-app.dark-mode .progress {
	background-color: #4c4659;
}
#embed-app.dark-mode .player-panel .player-panel-row button {
	background-color: #f8f6f6;
}
#embed-app.dark-mode .subscribe-icons span,
#embed-app.dark-mode .share-icon span {
	background-color: #fff;
}
#embed-app.dark-mode .subscribe-icons span,
#embed-app.dark-mode .share-icon span,
#embed-app.dark-mode .player-btn__volume,
#embed-app.dark-mode .player-btn__rwd,
#embed-app.dark-mode .player-btn__fwd {
	background-color: #fff;
}

/* ///////////////////////////////////////////////////////////////////////// */
/* RWD */
/* ///////////////////////////////////////////////////////////////////////// */
@media (max-width: 768px) {
	.player__main {
		grid-template-columns: 60px 1fr;
		grid-gap: 0;
		height: 150px;
	}
	.player__artwork img {
		width: 45px;
		height: 45px;
		margin: 12px;
		border-radius: 4px;
	}
	.player__body {
		padding: 12px 12px 4px 12px;
	}
	.player-panels .player-panel {
		left: 0;
		right: 0;
		top: 0;
		bottom: 0;
		border-radius: 0;
	}
	.player-panel .row input {
		font-size: 16px;
	}
	.play-progress {
		grid-gap: 18px;
		margin-left: -60px;
		margin-top: 4px;
	}
	.play-pause-controls {
		width: 45px;
		height: 45px;
	}
	.playback {
		align-items: center;
		padding: 5px 0 0 0;
	}
	.panel__inner {
		height: 140px;
		overflow-y: scroll;
	}
	.close-btn {
		top: 0;
		right: 0;
		width: 26px;
		height: 26px;
		border-radius: 0 0 0 4px;
	}
	.close-btn span {
		width: 16px;
		height: 3px;
		left: 5px;
		top: 11px;
	}
	.player-panels-nav button {
		padding: 5px 10px;
	}
	.powered-by {
		bottom: 5px;
		left: 8px;
		right: auto;
	}
	.player-btn__volume {
		display: none;
	}
	.player-btn__rwd {
		width: 22px;
		height: 22px;
		mask-size: cover;
		-webkit-mask-size: cover;
	}
	.player-btn__speed {
		width: 35px;
		padding: 3px 4px;
		mask-size: cover;
		-webkit-mask-size: cover;
		border-width: 1px;
	}
	.player-btn__fwd {
		width: 22px;
		height: 22px;
		mask-size: cover;
		-webkit-mask-size: cover;
	}
	.playback .playback__controls {
		grid-template-columns: repeat(3, auto);
		grid-gap: 15px;
		justify-content: flex-start;
	}
	.player-panels-nav {
		margin: 3px -8px 0 0;
		justify-self: flex-end;
	}
	.subscribe-icons {
		grid-template-columns: 1fr 1fr;
		grid-gap: 10px;
		margin: 5px 0 8px 0;
	}
	.playback__timers {
		margin-right: 2px;
	}
	.episode-title {
		width: calc(100vw - 100px);
	}
	.show {
		width: calc(100vw - 100px);
	}
}