/* Mobile first Responsive Web Design */
@import url('https://fonts.googleapis.com/css2?family=Alfa+Slab+One&family=Lato&family=Merriweather:ital@1&family=Montserrat:wght@300;800&family=Poppins&display=swap');

:root {
	--primary-font: 'Montserrat', sans-serif;
	--secondary-font: 'Lato', sans-serif;
	--readable-font: 'Merriweather', serif;
	--header-font: 'Alfa Slab One', cursive;
	--show-info-font: 'Marck Script', cursive;
	--body-background: rgb(206, 202, 202);
	--show-name-bg: #382a38;
	--episode-name-bg: #550303;
	--show-name: #360507;
	--search-info-bg: #550303;
	--dark-rich-blue: rgb(0, 26, 35);
	--select-items-bg: rgb(65, 64, 64);
	--dark-red: rgb(129, 1, 1);
	--wrapper-bg: rgb(248, 251, 252);
	--buttons-bg: rgb(29, 27, 27);
	--white: white;
	--white-2: rgb(248, 251, 252);
	--black: black;
	--box-shadow: rgb(194, 191, 191);
}
body {
	background-color: var(--body-background);
	margin: 0;
	padding: 0;
	box-sizing: border-box;
}

.header {
	display: flex;
	align-items: center;
	margin-bottom: -0.85rem;
	gap: 1rem;
	height: 64px;
	background-image: url(./images/header-bg.webp);
	background-clip: border-box;
	width: 100%;
	font-family: var(--primary-font);
}

.logo {
	height: 64px;
	width: auto;
	float: left;
    cursor: pointer;
    margin-left: 7.5%;
}

.custom-select-wrapper,
.episode-custom-select-wrapper {
	display: flex;
	text-align: center;
	justify-content: center;
	align-items: center;
	width: 85%;
	margin: 1rem auto;
}

.episode-custom-select-wrapper {
	margin: 0 auto 1rem auto;
	display: none;
}

.custom-select,
.custom-select-episode {
	position: relative;
	font-family: var(--readable-font);
	width: 100%;
}

.custom-select select,
.custom-select-episode select {
	display: none; /*hide original select element:*/
}

.select-selected {
	border-radius: 4px;
}

/*style the arrow inside the select element:*/
.select-selected:after {
	position: absolute;
	content: '';
	top: 16px;
	right: 12px;
	width: 0;
	height: 0;
	border: 6px solid transparent;
	border-color: var(--white) transparent transparent transparent;
}

/*point the arrow upwards when the select box is open (active):*/
.select-selected.select-arrow-active:after {
	border-color: transparent transparent var(--white) transparent;
	top: 7px;
}

/*style the items (options), including the selected item:*/
.select-items div,
.select-selected {
	color: var(--white);
	padding: 8px 12px;
	border: 1px solid transparent;
	border-color: transparent transparent rgba(0, 0, 0, 0.1) transparent;
	cursor: pointer;
	user-select: none;
}

/*style items (options):*/
.select-items {
	position: absolute;
	background-color: var(--select-items-bg);
	top: 100%;
	left: 0;
	right: 0;
	z-index: 99;
	max-height: 424px;
	overflow-y: scroll;
}

/*hide the items when the select box is closed:*/
.select-hide {
	display: none;
}

.select-items div:hover,
.same-as-selected {
	background-color: rgba(0, 0, 0, 0.1);
}

.main {
	display: block;
}

.hide {
	display: none;
}

.search-container,
.episode-search-container {
	width: 60%;
	border-radius: 7px;
}

.search-container i,
.episode-search-container i {
	position: absolute;
}

.icon {
	padding: 6px;
	font-size: 20px;
	color: rgb(76, 76, 78);
}

.search-bar,
.episodes-search-bar {
	padding: 6px 4px 6px 32px;
	font-family: var(--readable-font);
	width: 90%;
	font-size: 1rem;
	border: 1px solid var(--white);
	border-radius: 4px;
	color: rgb(76, 76, 78);
}

/* .episodes-search-bar {
	width: 75%;
} */

::placeholder {
	font-size: 1rem;
	color: rgb(76, 76, 78);
	opacity: 1;
}

/* .episodes-page-navigation {
	width: 90%;
	margin: auto;
	display: grid;
	grid-template-columns: repeat(1, 1fr);
} */

.nav-container {
	display: flex;
	flex-direction: column;
	width: 85%;
	margin: 1rem auto 0 auto;
	/* margin-top: -2rem; */
	height: 0;
	justify-content: center;
	align-items: center;
}

.nav-link {
	font-family: var(--primary-font);
	background-color: var(--buttons-bg);
	color: var(--white);
	text-decoration: none;
	text-transform: uppercase;
	/* font-weight: 600; */
	width: fit-content;
	display: none;
	opacity: 0;
	border-radius: 4px;
	cursor: pointer;
	white-space: nowrap;
	text-decoration: none;
	border: none;
	padding: 0.65rem 0.75rem;
}

.show-name {
	font-family: var(--secondary-font);
	font-family: var(--header-font);
	font-family: 'Rye', cursive;
	color: rgb(41, 40, 40);
	color: var(--show-name);
	text-align: center;
	font-size: large;
	display: none;
}

.nav-link:hover,
.episodes-link:hover {
	background-color: rgb(36, 33, 33);
}

.episodes-link {
	/* display: none; */
	opacity: 0;
}

.search-info-wrapper {
	display: none;
	text-align: center;
	width: max-content;
	padding: 0 2.5rem;
	border-radius: 0 24px;
	/* margin: 0 auto -1rem auto; */
	background-color: var(--search-info-bg);
}

/* .episodes-search-info-wrapper {
	margin: 1rem auto;
} */

.search-info {
	font-family: var(--show-info-font);
	color: var(--white);
	text-align: center;
	line-height: 0%;
	/* margin: -1rem auto; */
}

.root {
	display: grid;
	grid-template-columns: repeat(1, 1fr);
	place-items: start center;
	grid-auto-flow: row;
	gap: 2rem;
	width: 85%;
	margin: 0 auto;
}

.wrapper {
	height: 100%;
	width: 100%;
	text-align: center;
	background-color: var(--wrapper-bg);
	margin: 0 auto;
	border-radius: 8px;
	box-shadow: 1px 1px 1px 1px var(--box-shadow);
    cursor: pointer;
}

.wrapper .name,
.wrapper .episode-name {
	font-family: var(--primary-font);
	width: 100%;
	margin: auto;
	text-align: center;
	background-color: #382a38;
	background-color: var(--show-name-bg);
	color: var(--white);
	cursor: pointer;
	margin-top: 0;
}
.wrapper .name {
	padding: 12px 2px;
	border-radius: 7px;
}
.wrapper .episode-name {
	padding: 8px 2px;
	border-radius: 4px;
	background-color: var(--episode-name-bg);
	font-family: var(--secondary-font);
}

.name:hover {
	background-color: #301f30;
}
.episode-name:hover {
	background-color: #610202;
}

.wrapper figure {
	display: table;
	width: fit-content;
	margin: 0 auto;
}

.wrapper figure figcaption {
	display:table-caption;
	caption-side: bottom;
}

.show-info {
	margin-top: 7px;
	margin-bottom: -7px;
	width: inherit;
}

.genres,
.status,
.rating,
.runtime {
	font-family: var(--secondary-font);
	font-size: 0.75rem;
	margin: 0;
	font-weight: 600;
	color: var(--dark-red);
	word-spacing: 5px;
	text-align: left;
	word-wrap: break-word;
}

/* .empty-div {
	width: 100%;
	margin-top: 4px;
	background-color: var(--body-background);
	height: 6px;
	border-top: solid var(--show-name-bg);
} */
.summary {
	font-family: var(--readable-font);
	text-align: left;
	font-size: 0.9rem;
	width: 90%;
	margin: 0 auto;
	color: var(--dark-rich-blue);
	background-color: var(--white-2);
	border: none;
}

.d-none {
	display: none;
}

.read-more,
.read-less {
	display: inline-flex;
	font-family: var(--readable-font);
	border: none;
	text-decoration: none;
	outline: none;
	cursor: pointer;
	font-weight: 500;
	color: var(--dark-red);
	font-size: 1rem;
}

@media screen and (min-width: 690px) {
	.header {
		margin-bottom: -0.85rem;
	}
	.root {
		grid-template-columns: repeat(2, 1fr);
		/* grid-auto-rows: 1fr; */
		/* grid-auto-flow: column; */
		/* grid-template-rows: auto; */
		width: 90%;
		gap: 1.5rem;
	}
	.nav-container {
		flex-direction: row;
		justify-content: space-between;
		width: 90%;
		/* margin: auto; */
		/* justify-content: space-around; */
	}
    .logo {
        margin-left: 5%;
    }
	.nav-link {
		display: inline-block;
	}
	.search-bar {
		width: 80%;
	}
	/* .episodes-search-bar {
		width: 70%;
	} */
	.custom-select,
	.custom-select-episode {
		width: 50%;
	}
}

/* to keep the footer where it belongs */
.main {
	position: relative;
	min-height: 100vh;
	padding-bottom: 7rem;
}

.select-selected {
	background-color: rgb(41, 40, 40);
	color: whitesmoke;
}

.footer {
	display: flex;
	justify-content: center;
	align-items: center;
	text-align: center;
	padding: 1rem 0;
	position: absolute;
	width: 100%;
	height: 4vh;
	background-image: url(./images/header-bg.webp);
	right: 0;
	bottom: 0;
	left: 0;
}
.data-info {
	color: var(--white);
	font-size: large;
}

@media screen and (min-width: 1040px) {
	.root {
		grid-template-columns: repeat(3, 1fr);
		/* grid-auto-rows: minmax(fit-content, auto); */
		/* grid-template-rows: fit-content;
    grid-auto-rows: auto; */
		width: 95%;
	}
    .logo {
        margin-left: 2.5%;
    }
	.nav-container {
		width: 95%;
	}
	.search-container,
	.episode-search-container {
		width: 30%;
	}
	.search-bar {
		width: 90%;
	}
	.episodes-search-bar {
		width: 79%;
	}
	.custom-select,
	.custom-select-episode {
		position: absolute;
		top: 0.9rem;
		right: 2.5%;
		width: 30%;
		/* margin-top: 10px; */
	}
	.select-selected {
		background-color: whitesmoke;
		color: rgb(76, 76, 78);
	}
	.select-items {
		background-color: var(--select-items-bg);
	}
	.select-selected:after {
		border-color: rgb(41, 40, 40) transparent transparent transparent;
	}
	.select-selected.select-arrow-active:after {
		border-color: transparent transparent rgb(41, 40, 40) transparent;
	}
	/* .search-info-wrapper {
		margin: -0.5rem auto -1rem auto;
	} */
	.show-name {
		font-size: 1.5rem;
	}
}

@media screen and (min-width: 1340px) {
	.root {
		grid-template-columns: repeat(4, 1fr);
		width: 97%;
	}
	.custom-select,
	.custom-select-episode {
		width: 30%;
	}
	.nav-container {
		width: 97%;
	}
	/* .episodes-search-bar {
		width: 90%;
	} */
}

@media screen and (min-width: 1720px) {
	.root {
		grid-template-columns: repeat(5, 1fr);
		width: 95%;
	}
}
