/* Basic Styles */
body {
	padding: 20px 10%;

	background-color: #f0f0f0;
	color: #2b3640;
	font-family: Verdana, Geneva, Tahoma, sans-serif;
}

h2,
h3 {
	margin-top: 0;
}

img,
svg,
video {
	max-width: 100%;
	height: auto;
}

section {
	margin-bottom: 40px;
}

fieldset {
	margin-bottom: 10px;
	padding: 20px;

	background-color: #ced8e0;
	border: #2b3640 1px solid;
	border-radius: 4px;
	box-shadow: 0 0 6px 2px rgba(0, 0, 0, 0.2);
}

fieldset legend {
	padding: 4px;

	font-weight: bold;
	background-color: #fff;
	box-shadow: 0 0 6px 1px rgba(0, 0, 0, 0.2);
	border-radius: 4px;
}

button {
	font-family: inherit;
}

/* main header */
h1.main-header {
	margin-bottom: 1em;
	position: relative;
	text-align: center;
}

h1.main-header::before {
	content: '';
	width: 20%;
	height: 4px;

	position: absolute;
	bottom: -4px;
	left: 50%;
	transform: translateX(-50%);
	background-color: #7fb2df;
}

/* section .book-filters */

section.book-filters fieldset {
	max-height: 0;
}

section.book-filters fieldset.show {
	max-height: 100%;
}

section.book-filters fieldset legend {
	display: flex;
	justify-content: center;
	align-items: center;
}

section.book-filters fieldset legend::after {
	width: 1.5em;
	height: 1.5em;
	margin-left: 6px;

	content: '';
	display: inline-block;
	transform: rotate(0);

	background: url(../images/chevron-right.svg) center center;
	transition: transform 250ms ease-in-out;
}

section.book-filters fieldset.show legend::after {
	transform: rotate(90deg);
}

article.filters {
	display: none;
}

article.filters div > * {
	cursor: pointer;
}

article.filters.show {
	display: flex;
	gap: 20px;
	justify-content: space-between;
	align-items: center;
}

article.filters form.radio-filters {
	padding: 0.7rem;

	background-color: #fff;
	border-radius: 4px;
}

article.filters p.books-total {
	padding: 0.5rem;

	background-color: #fff;
	border-radius: 4px;
}

article.filters p.books-total span#booksTotal {
	font-weight: bold;
}

article.filters #search-form input[type='search'] {
	padding: 5px;
	border-radius: 4px;
}

article.filters #search-form input[type='search']::placeholder {
	filter: grayscale(1);
}

/* section form */

section.addEditForm fieldset {
	max-height: 0;
}

section.addEditForm fieldset.show {
	max-height: 100%;
}

section.addEditForm fieldset legend {
	display: flex;
	justify-content: center;
	align-items: center;
}

section.addEditForm fieldset legend::after {
	width: 1.5em;
	height: 1.5em;
	margin-left: 6px;

	content: '';
	display: inline-block;
	transform: rotate(0);

	background: url(../images/chevron-right.svg) center center;
	transition: transform 250ms ease-in-out;
}

section.addEditForm fieldset.show legend::after {
	transform: rotate(90deg);
}

section.addEditForm fieldset form {
	display: none;
}

section.addEditForm fieldset form.show {
	display: grid;
	grid-template-columns: repeat(2, 1fr);
	gap: 25px;
}

section.addEditForm fieldset form .form-control.alreadyReadChk {
	margin: 0 auto;
	padding: 0.7rem;

	grid-column: span 2;
	display: inline-block;

	background-color: #fff;
	border-radius: 4px;
	text-align: center;
}

section.addEditForm fieldset form label:not(label.chk-label) {
	margin-bottom: 5px;
}

section.addEditForm fieldset form .form-control input[type='text'] {
	width: 100%;
	padding: 0.5rem;
	box-sizing: border-box;

	border-radius: 4px;
	font-size: 1em;
}

section.addEditForm fieldset form .form-control input[type='checkbox'] {
	font-size: 2rem;
	font-weight: bold;
	line-height: 1.1;
}

section.addEditForm fieldset form button {
	/* width: 100px; */
	margin: 5px auto;
	padding: 10px 15px;

	grid-column: span 2;

	background: radial-gradient(#b9d2e7, #8ab4da);
	color: #2b3640;
	border-radius: 4px;
	font-size: 0.9em;
	font-weight: bold;
	transform: scale(1);
	transition: all 250ms ease-in-out;
}

section.addEditForm fieldset form button:hover,
section.addEditForm fieldset form button:active {
	background: radial-gradient(#bed9f1, #98c7f0);
	transform: scale(1.025);
}

/* section book-gallery */
section#book-gallery {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
	gap: 10px;
}

/* Card */
article.card {
	padding: 20px;
	text-align: center;
	background: radial-gradient(#a2c1dd 50%, #7fb2df);
	border-radius: 4px;
	box-shadow: 0 0 6px 2px rgba(0, 0, 0, 0.2);
}

article.card .thumbnail {
	cursor: zoom-in;
}

article.card button {
	padding: 5px;
	display: inline-block;
	color: black;
	cursor: pointer;
}

article.card button:hover {
	color: rgb(54, 125, 205);
	transition: color 250ms ease-in-out;
}

article.card button > * {
	pointer-events: none;
}

article.card button svg {
	width: 25px;
}

/* section .popup */
section.popup {
	width: 100vw;
	height: 100vh;

	position: fixed;
	top: 0;
	left: 0;
	display: none;

	background-color: rgba(0, 0, 0, 0.7);
	cursor: zoom-out;
}

section.popup.show {
	display: flex;
	justify-content: center;
	align-items: center;
}
