/**
 * @author Jaroslav Louma <xlouma00@stud.fit.vutbr.cz>
 * @brief This file is part of the ITU project - Music Player App.
 * @copyright Copyright (c) 2023
 */

music-player {
	display: none;
}

.icon {
	display: flex;
	justify-content: center;
	align-items: center;
}

#views {}

#views .view {
	display: none;
	flex-direction: column;
	margin-bottom: 200px;
	padding: 20px 20px 200px 20px;
}

#views .view.active {
	display: flex;
}

#views home-view {
	gap: 30px;
}

/* Search bar */

search-bar {
	display: flex;
	flex-direction: row;
	border-radius: 10px;
	overflow: hidden;
	background-color: var(--background-color2);
}

search-bar .input {
	flex: 1;
	display: flex;
	flex-direction: row;
	align-items: center;
	justify-content: center;
	padding: 10px 15px;
}

search-bar input {
	flex: 1;
	margin-left: 10px;
	font-size: 12px;
	font-weight: 400;
}

search-bar .icon,
search-bar .settings,
search-bar .paste {
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 2px;
}

search-bar .icon svg,
search-bar .settings svg {
	width: 20px;
	opacity: 0.66;
}

search-bar .settings {
	margin-right: 15px;
}

search-bar .settings svg {}

search-bar .paste {
	width: 40px;
	background-color: var(--primary-color2);
}

search-bar .paste svg {
	width: 18px;
	opacity: 1;
}

/* Preview Carousel */

.carousel {
	display: flex;
	flex-direction: column;
	/* align-items: center; */
	gap: 10px;
	margin: 0 10px;
}

.carousel .items {
	display: flex;
	flex-direction: row;
	padding-bottom: 10px;
	gap: 30px;
	overflow-x: scroll;
	scroll-snap-type: x mandatory;
	scroll-behavior: smooth;
	-webkit-overflow-scrolling: touch;

	/* Fix for hidden overflow */
	margin: 0px -30px;
	padding: 0 30px;
}

.carousel .items::-webkit-scrollbar {
	display: none;
}

.carousel .items .item {
	flex: 0 0 100%;
	display: flex;
	align-items: flex-end;
	justify-content: center;
	width: 100%;
	height: 320px;
	border-radius: 50px 50px 0 0;
	scroll-snap-align: center;
	scroll-snap-stop: always;

	background: linear-gradient(360deg, var(--background-color) 0%, var(--background-color) 10%, transparent 50%, transparent 100%), var(--url), var(--background-color2);
	background-size: cover;
	background-position: center;
	background-repeat: no-repeat;
}

.carousel .items .item .details {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	padding: 0 20px;
	text-align: center;
}

.carousel .items .item .details .title {
	font-size: 25px;
	font-weight: 600;
}

.carousel .items .item .details .artist {
	font-size: 14px;
}

.carousel .pagination {
	display: flex;
	flex-direction: row;
	align-items: center;
	justify-content: center;
	/* margin: 20px 0; */
}

.carousel .pagination .page {
	width: 4.5px;
	height: 4.5px;
	margin: 0 5px;
	border-radius: 50%;
	background-color: var(--text-color);
	opacity: 0.5;
}

.carousel .pagination .page.active {
	opacity: 0.8;
}


/* Horizontal scroller */

.horizontal-scroller {
	display: flex;
	flex-direction: row;
	align-items: center;
}

.horizontal-scroller .items {
	display: flex;
	flex-direction: row;
	align-items: center;
	gap: 15px;
	overflow-x: scroll;

	/* Fix for hidden overflow */
	margin: 0 -20px;
	padding: 0 20px;
}

.horizontal-scroller .items::-webkit-scrollbar {
	display: none;
}

.horizontal-scroller .items .item {
	flex: 0 0 100px;
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	justify-content: flex-end;
	width: 100px;
	height: 100px;
	border-radius: 20px;
	box-shadow: rgba(0, 0, 0, .5) 0 0 25px -10px;
	overflow: hidden;
	background: linear-gradient(360deg, rgba(15, 15, 15, .75) 0%, rgba(15, 15, 15, .75) 15%, transparent 50%, transparent 100%), var(--url), var(--background-color2);
	background-size: cover;
	background-position: center;
	background-repeat: no-repeat;
}

.horizontal-scroller .items .item .details {
	width: 100%;
	padding: 6px 10px;
}

.horizontal-scroller .items .item .details .title {
	font-size: 12px;
	font-weight: 400;
	text-overflow: ellipsis;
	white-space: nowrap;
	overflow: hidden;
}

.horizontal-scroller .items .item .details .artist {
	font-size: 9px;
	font-weight: 200;
	opacity: 0.8;
}

/* Heading */

.view.home .heading {
	display: flex;
	flex-direction: row;
	align-items: center;
	justify-content: space-between;
	margin-bottom: 15px;
}

.view.home .heading:not(:first-child) {
	margin-top: 40px;
}

.view.home .heading .title {
	font-size: 16px;
	font-weight: 500;
}

.view.home .heading .more {
	font-size: 11px;
	color: var(--primary-color2-light);
}

/* Static */

#static {
	position: fixed;
	bottom: 0;
	left: 0;
	width: 100%;
}

/* Navigation */

#static #nav {
	display: flex;
	flex-direction: row;
	justify-content: space-evenly;
	padding: 15px 0 15px 0;
	background: linear-gradient(0deg, var(--background-color) 0%, var(--background-color) 90%, transparent 100%);
}

#static #nav button {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: flex-end;
	width: 80px;
	opacity: 0.5;
	transition: 0.25s;
}

#static #nav button.active {
	opacity: 1;
}

#static #nav button svg {
	width: 30px;
	height: 30px;
	margin: 8px 0;
}

#static #nav button.library svg {
	width: 25px;
}

#static #nav button span {
	font-size: 10px;
	text-transform: uppercase;
	letter-spacing: 1.1px;
	font-weight: 200;
}

/* Floating Player */

#static #floating-player {
	display: flex;
	flex-direction: row;
	margin: 5px 10px;
	padding: 8px 20px 8px 8px;

	/* background-color: #282c3c; */
	border-radius: 40px;
	height: 60px;
	max-width: 100vw;

	backdrop-filter: blur(10px);
	background: linear-gradient(88deg, rgba(70, 68, 114, 0.20) 0%, rgba(168, 90, 242, 0.20) 39.06%, rgba(124, 105, 232, 0.20) 65.1%, rgba(70, 68, 114, 0.20) 100%), linear-gradient(90deg, rgba(168, 90, 242, 0.00) 50.52%, rgba(124, 105, 232, 0.26) 78.13%, rgba(182, 114, 247, 0.40) 99.99%, rgba(168, 90, 242, 0.00) 100%), rgba(36, 38, 53, 0.80);
	background-repeat: no-repeat;
	background-position-x: 0px, 106px;
}

#static #floating-player .cover {
	width: 45px;
	height: 45px;
	border-radius: 50%;
	background: var(--url);
	background-color: var(--background-color3);
	background-size: cover;
	background-position: center;
	background-repeat: no-repeat;
	animation: rotate 8s linear infinite;
	animation-play-state: paused;
	box-shadow: 0 0 10px -2px rgba(0, 0, 0, 0.5);
}

#static #floating-player .cover.playing {
	animation-play-state: running;
}

#static #floating-player .details {
	flex: 1;
	display: flex;
	flex-direction: column;
	min-width: 0;
	margin: 0 8px;
}

#static #floating-player .details .title {
	font-size: 15px;
	font-weight: 400;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

#static #floating-player .details .artist {
	font-size: 12px;
	font-weight: 200;
	opacity: 0.8;
}

#static #floating-player .controls {
	display: flex;
	flex-direction: row;
	align-items: center;
	gap: 12px;
}

#static #floating-player .controls button {
	display: flex;
	/* margin: 0 5px; */
}

#static #floating-player .controls button svg {
	width: 22px;
	height: 22px;
}

#static #floating-player .controls button.play svg {
	width: 30px;
	height: 30px;
}

@keyframes rotate {
	from {
		transform: rotate(0deg);
	}

	to {
		transform: rotate(360deg);
	}
}


#views {
	height: 100vh;
	width: 100%;
	/* background: #341414; */
}



.view.add-music {
	justify-content: space-between;
	align-self: stretch;
	min-height: 100vh;
	text-align: center;
}

.view.add-music h2 {
	margin: 20px 0 25px;
}

.view.add-music section {
	display: flex;
	flex-direction: column;
	gap: 10px;
}

.view.add-music section.upload {
	flex: 1;
	justify-content: flex-end;
	margin-top: 50px;
}

.view.add-music section>span {
	font-size: 12px;
	font-weight: 300;
}

.view.add-music section>button {
	align-self: center;
	display: flex;
	flex-direction: row;
	align-items: center;
	justify-content: center;
	gap: 10px;
	flex-grow: 0;
	padding: 10px 30px;
	border-radius: 10px;
	color: var(--text-color);
	background-color: var(--primary-color2);
}

.view.add-music section>button .icon {
	display: flex;
}

.view.add-music section>button .icon svg {
	width: 20px;
}

.view.add-music section>button span {}


/* Library */

.library-menu {
	display: flex;
	flex-direction: column;
	gap: 20px;
}

.library-menu .navigation {
	display: flex;
	flex-direction: row;
	align-items: center;
	justify-content: space-between;
	gap: 10px;
	padding: 10px 20px;
}

.library-menu .navigation button {
	flex: 1;
	padding: 5px 0px;
	border-bottom: 2px solid transparent;
	font-size: 12px;
	font-weight: 300;
	opacity: 0.66;

	transition: 0.2s;
	height: 35px;
}

.library-menu[data-active="songs"] .navigation button.songs,
.library-menu[data-active="playlists"] .navigation button.playlists,
.library-menu[data-active="artists"] .navigation button.artists,
.library-menu[data-active="recent"] .navigation button.recent {
	border-color: var(--primary-color);
	font-size: 14px;
	font-weight: 500;
	opacity: 1;
}



.library-menu .content {
	display: flex;
	flex-direction: row;
	overflow: auto;
	width: 100%;
	scroll-snap-type: x mandatory;
}

.library-menu .content::-webkit-scrollbar {
	display: none;
}

.library-menu .content .category {
	/* display: none; */

	display: flex;
	flex-direction: column;
	flex-shrink: 0;
	width: 100%;
	margin: 0 30px;
	scroll-snap-align: center;
	scroll-snap-stop: always;
}

/* .library-menu[data-active="songs"] .content .category.songs,
.library-menu[data-active="playlists"] .content .category.playlists,
.library-menu[data-active="artists"] .content .category.artists,
.library-menu[data-active="recent"] .content .category.recent {
	display: block;
} */

.library-menu .content .category item-list {
	display: flex;
	flex-direction: column;
	gap: 10px;
}


/* Options */
.options {}

.options button {
	display: flex;
	flex-direction: row;
	align-items: center;
	justify-content: center;
	padding: 5px;
}

.options button svg {
	width: 20px;
	height: 20px;
}

/* Tag */
.tag {
	font-size: 8px;
	font-weight: 400;
	border: 1px solid var(--primary-color);
	border-radius: 20px;
	padding: 0px 5px;
	background-color: rgba(var(--primary-color2-rgb), 0.33);
}

/* Views */
.views {
	background-color: var(--primary-color);
	font-size: 8px;
	padding: 2px 8px;
	border-radius: 4px;
}

/* General */
song-item,
playlist-item,
artist-item,
music-card {
	/* flex: 1; */
	display: flex;
	flex-direction: row;
	align-items: center;
	gap: 10px;
}

song-item .cover,
playlist-item .cover,
artist-item .picture,
music-card .cover {
	background: var(--url);
	background-color: var(--background-color2);
	background-size: cover;
	background-position: center;
	background-repeat: no-repeat;
}

song-item .details,
playlist-item .details,
artist-item .details,
music-card .details {
	flex: 1;
	align-self: stretch;
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	min-width: 0;
}

/* Song Items */
song-item .cover {
	width: 45px;
	height: 45px;
	border-radius: 10px;
}

song-item .details .title {
	width: 100%;
	font-size: 14px;
	white-space: nowrap;
	text-overflow: ellipsis;
	overflow: hidden;
}

song-item .details .artist {
	display: flex;
	flex-direction: row;
	align-items: center;
	gap: 5px;
}

song-item .details .artist svg,
song-item .details .artist span {
	opacity: 0.5;
}

song-item .details .artist svg {
	width: 12px;
	height: 12px;
}

song-item .details .artist span {
	font-size: 12px;
	font-weight: 300;
}

song-item .details .artist .dot {
	margin: 0 2px;
}

/* Playlist Items */
playlist-item .cover {
	display: grid;
	grid-template-columns: repeat(2, 1fr);
	grid-template-rows: repeat(2, 1fr);
	width: 60px;
	height: 60px;
	border-radius: 10px;
	overflow: hidden;
}

playlist-item .cover .song {
	width: 100%;
	height: 100%;
	background: var(--url);
	background-color: var(--background-color2);
	background-size: cover;
	background-position: center;
	background-repeat: no-repeat;
}

playlist-item .details {
	padding: 4px 0;
}

playlist-item .details .title {
	font-size: 14px;
}

playlist-item .details .info {
	font-size: 12px;
	opacity: 0.5;
}

playlist-item.add-new {
	margin-top: 10px;
}

playlist-item.add-new .cover {
	display: flex;
	align-items: center;
	justify-content: center;
}

playlist-item.add-new .cover svg {
	width: 30px;
	height: 30px;
}

playlist-item.add-new .details {
	align-self: center;
}

/* Artist Items */
artist-item .picture {
	width: 45px;
	height: 45px;
	border-radius: 50%;
}

artist-item .details {}

artist-item .details .title {
	font-size: 14px;
}

artist-item .details .info {
	font-size: 12px;
	opacity: 0.5;
}

/* Add Music Button */
add-music-button {
	display: flex;
	flex-direction: row;
	align-items: center;
	justify-content: center;
	gap: 3px;
	padding: 3px 12px 3px 10px;
	border: 2px solid transparent;
	border-radius: 20px;
	background-color: var(--primary-color2);
}

add-music-button.saved {
	border-color: white;
	background-color: transparent;
}

add-music-button svg {
	width: 12px;
	height: 12px;
}

add-music-button span {
	font-size: 10px;
	font-weight: 500;
}

/* Music Cards */
.category item-list {
	display: flex;
	flex-direction: column;
	gap: 10px;
}

.category .name {
	margin: 25px 0 10px;
	font-size: 12px;
	font-weight: 400;
	text-transform: uppercase;
	text-align: left;
	opacity: 0.8;
}

music-card {
	padding: 10px;
	border-radius: 10px;
	background-color: var(--background-color2);
}

music-card .cover {
	width: 60px;
	height: 60px;
	border-radius: 10px;
}

music-card .details {
	justify-content: space-between;
}

music-card .details .title {
	font-size: 14px;
	font-weight: 500;
	text-align: left;
	white-space: nowrap;
	text-overflow: ellipsis;
	width: 100%;
	overflow: hidden;
}

music-card .details .artist {
	font-size: 11px;
	font-weight: 300;
	opacity: 0.8;
}

music-card .details .names {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	width: 100%;
}

music-card .details .info .views {
	margin-bottom: 2px;
}

music-card .add-button {}

/* Pages */

#pages>* {
	box-shadow: 0 0 60px -25px rgba(0, 0, 0, 0.5);
}

#pages button.close {
	display: flex;
	align-items: center;
	justify-content: center;
}

#pages button.close svg {
	width: 30px;
	height: 30px;
}

/* Player Page */
#pages player-page {
	display: flex;
	flex-direction: column;

	overflow: initial;
}

#pages player-page>.heading {
	display: flex;
	flex-direction: row;
	justify-content: space-between;
	gap: 10px;
	margin: 20px 0;
	padding: 0 15px 0 20px;

	position: absolute;
	width: 100%;
	height: 35px;
}

#pages player-page>.heading add-music-button {
	margin: 0 10px;
}

#pages player-page>.heading button.like {
	margin: 0 5px;
}

#pages player-page>.heading button.like svg {
	width: 25px;
	height: 25px;
}

#pages player-page>.heading button.like.active {
	color: var(--primary-color-light);
}

#pages player-page>.heading button.like.active svg {
	filter: drop-shadow(0 0 2px var(--primary-color));
}

#pages player-page>.heading .options {
	display: flex;
	flex-direction: row;
}

#pages player-page>.heading .options>* {
	align-self: center;
}

#pages player-page>.content {
	flex: 1;
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 75px;

	overflow: auto;
}

#pages player-page>.content::-webkit-scrollbar {
	display: none;
}

#pages player-page .player {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 20px;
	width: 100%;
	padding: 0 30px;

	position: absolute;
	margin-top: 75px;
}

#pages player-page .player .cover {
	display: flex;
	justify-content: center;
	width: 100%;
	padding: 25px;
	padding-top: 10px;
	padding-bottom: 0;
}

#pages player-page .player .cover .image {
	width: 100%;
	max-width: 280px;
	border-radius: 50%;
	aspect-ratio: 1;
	background: var(--url);
	background-color: var(--background-color2);
	background-size: cover;
	background-position: center;
	background-repeat: no-repeat;
}

#pages player-page .player .details {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 5px;
	width: 100%;
	height: 90px;
	text-align: center;
}

#pages player-page .player .details .title {
	font-size: 20px;
	font-weight: 500;
}

#pages player-page .player .details .artist {
	font-size: 15px;
	font-weight: 300;
	opacity: 0.8;
}

#pages player-page .player .controls {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 10px;
	width: 100%;
	margin-top: 20px;
}

#pages player-page .player .controls .seek {
	display: flex;
	flex-direction: column;
	gap: 8px;
	width: 100%;
}

#pages player-page .player .controls .seekable-area {
	padding: 10px 0;
	margin: -10px 0;
}

#pages player-page .player .controls .seek .seekbar {
	width: 100%;
	height: 4px;
	border-radius: 5px;
	background-color: var(--background-color2);

	position: relative;
}

#pages player-page .player .controls .seek .seekbar .progress {
	display: flex;
	/* justify-content: end; */
	align-items: center;
	width: 62%;
	height: 100%;
	border-radius: 5px;
	background: linear-gradient(90deg, var(--primary-color2) 0%, var(--primary-color) 100%);
}

#pages player-page .player .controls .seek .seekbar .head {
	width: 9px;
	height: 9px;
	margin-right: -5px;
	margin-top: 1px;
	border-radius: 50%;
	background-color: var(--primary-color-light);
	box-shadow: 0 0 4px rgba(0, 0, 0, .25);

	position: absolute;
	top: -2px;
	left: -5px;
}

#pages player-page .player .controls .seek .time {
	display: flex;
	flex-direction: row;
	align-items: center;
	justify-content: space-between;
	padding: 0px 2px;
	font-size: 12px;
	font-weight: 300;
}

#pages player-page .player .controls .navigation {
	display: flex;
	flex-direction: row;
	align-items: center;
	justify-content: space-around;
	width: 100%;
}

#pages player-page .player .controls .navigation button {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 22px;
	height: 22px;
}

#pages player-page .player .controls .navigation button.previous,
#pages player-page .player .controls .navigation button.next {
	width: 30px;
	height: 30px;
}

#pages player-page .player .controls .navigation button.repeat.active,
#pages player-page .player .controls .navigation button.shuffle.active {
	color: var(--primary-color-light);
}

#pages player-page .player .controls .navigation button.repeat.active svg,
#pages player-page .player .controls .navigation button.shuffle.active svg {
	filter: drop-shadow(0 0 2px var(--primary-color));
}

#pages player-page .player .controls .navigation button.play {
	width: 55px;
	height: 55px;
}

#pages player-page .player .controls .navigation button svg {
	width: 100%;
	height: 100%;
}


#pages player-page .queue {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 20px;
	width: 100%;
	padding: 5px 30px;
	padding-bottom: 30px;
	/* padding-bottom: 70px; */
	background-color: var(--background-color2);
	border-radius: 20px 20px 0 0;
	box-shadow: rgba(0, 0, 0, .5) 0 0 30px -10px;

	margin-top: 85vh;
	max-height: 80vh;
	z-index: 1;
}

#pages player-page .queue .handle {
	width: 40px;
	height: 4px;
	margin: 10px 0;
	border-radius: 5px;
	background-color: white;
	opacity: 0.5;
}

#pages player-page .queue .heading {
	width: 100%;
	font-size: 18px;
	font-weight: 500;
}

#pages player-page .queue item-list {
	display: flex;
	flex-direction: column;
	gap: 10px;
	width: 100%;

	overflow: auto;
}

/* List Page */
#pages list-page {
	display: flex;
	flex-direction: column;

	overflow: initial;
}

#pages list-page>.heading {
	display: flex;
	flex-direction: row;
	justify-content: space-between;
	gap: 10px;
	height: 35px;
	margin: 20px 15px;
	padding-left: 5px;
}

#pages list-page>.heading .title {
	display: flex;
	justify-content: center;
	align-items: center;
}

#pages list-page>.search {
	margin: 0 15px;
}

#pages list-page>.content {
	margin: 0 15px;
}

#pages list-page>.content .content-loader {
	flex-direction: column;
	align-items: center;
	justify-content: center;
	height: 66vw;
	display: none;
}

#pages list-page>.content .content-loader.active {
	display: flex;
}

#pages list-page>.content .category {
	display: none;
}

#pages list-page>.content .category.visible {
	display: block;
}



/* Loader */
.loader {
	width: 35px;
	height: 35px;
	border: 4px solid #353348;
	border-top: 5px solid #8478ff;
	border-radius: 50%;
	/*-webkit-animation: spin 1s linear infinite;
    animation: spin 1s linear infinite;*/
	animation: spin2 1.75s cubic-bezier(0.4, 0.1, 0.6, 0.9) infinite;
	-webkit-animation: spin2 1.75s cubic-bezier(0.4, 0.1, 0.6, 0.9) infinite;
}


.feed-loader {
	display: none !important;
	height: calc(100vw / 3 * 1.2);
}

.feed-loader.active {
	display: flex !important;
	height: calc(100vw / 3 * 1.2);
}

@keyframes spin {
	0% {
		-webkit-transform: rotate(0deg);
		-ms-transform: rotate(0deg);
		transform: rotate(0deg);
	}

	100% {
		-webkit-transform: rotate(360deg);
		-ms-transform: rotate(360deg);
		transform: rotate(360deg);
	}
}

@keyframes spin2 {
	0% {
		-webkit-transform: rotate(0deg);
		-ms-transform: rotate(0deg);
		transform: rotate(0deg);
	}

	100% {
		-webkit-transform: rotate(720deg);
		-ms-transform: rotate(720deg);
		transform: rotate(720deg);
	}
}