* {
	margin: 0;
}

html,
body {
	height: 100%;
}

body {
	position: relative;
	padding-bottom: 3rem;
}

html {
	font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
}

.books-container {
	display: grid;

	gap: 16px;
	padding: 2rem;

	grid-template-columns: repeat(auto-fit, minmax(min(20rem, 100%), 1fr));
}

.book {
	overflow-wrap: break-word;
	color: rgb(207, 207, 207);
	background-color: rgb(35, 35, 35);
	min-height: 20rem;
	padding: 1rem;

	border: none;
	border-radius: 1rem;

	display: flex;
	flex-direction: column;
	justify-content: space-between;
}

.book-bottom {
	display: grid;
	align-items: end;

	grid-template-columns: repeat(auto-fit, minmax(8rem, 1fr));

	gap: 1rem;
}

@media screen and (min-width: 368px) {
	.book-controls {
		text-align: right;
	}
}


.toggle-read-button {
	border-radius: 1rem;
	border: none;
	padding: 1rem;
}

.book.has-read-book {
	border-bottom: 16px solid green;
}

.book:not(.has-read-book) {
	border-bottom: 16px solid red;
}

.book-header .delete-book-button {
	--size: calc(2rem + 1vw);

	height: var(--size);
	width: var(--size);

	border-radius: 0.5rem;
	border: none;
	float: right;
}

.create-book-modal {
	border-radius: 1rem;
	border: none;
	padding: 0;

	min-width: clamp(150px, 75%, 1000px);

	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%);
}

.create-book-modal::backdrop {
	background-color: rgba(20, 20, 20, 0.8);
}

.modal-container {
	padding: 1rem 1rem 1rem;

	display: flex;
	flex-direction: column;
	gap: 2rem;
}

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

	color: rgb(35, 35, 35);
}

.form-container {
	border-radius: 1rem;

	display: flex;
	flex-direction: column;

	gap: 1rem;
}

.open-modal-button {
	padding: 2rem 3rem;

	color: aliceblue;

	position: fixed;
	right: 0.5rem;
	bottom: 0.5rem;

	border-radius: 1rem;
	border: 1px solid #fff;

	background-color: rgb(35, 35, 35);
}

.close-modal-button {
	width: 2rem;
	height: 2rem;

	background-color: rgb(35, 35, 35);
	color: aliceblue;
	border-radius: 0.5rem;
	border: none;
	outline: none;
}

#create-book-form {
	display: grid;
	gap: 2rem;
	padding: 1rem;
	grid-template-columns: repeat(auto-fill, minmax(min(200px, 100%), 1fr));

	background-color: rgb(35 35 35);

	align-items: center;
	justify-content: center;

	border-radius: 0.5rem;
}

#create-book-form>div {
	background-color: #fff;
	border-radius: 0.5rem;
	color: rgb(35, 35, 35);
	padding: 0.5rem 1rem;
	height: clamp(60px, 80px, 100px);
}

#create-book-form>div:not(.has-read-container) input {
	padding: 0 0.3rem;
}

#create-book-form>div:not(.has-read-container) {
	display: flex;
	flex-wrap: wrap;
	gap: 1rem;
	justify-content: center;
}

#create-book-form>div:not(.has-read-container)>* {
	width: 90%;
}

.has-read-container {
	display: flex;
	gap: 1rem;
	align-items: center;
	justify-content: center;
}

.has-read-container input[type="checkbox"] {
	width: 1rem;
	height: 1rem;
}

#add-book {
	min-height: 3.5rem;
	width: 15rem;
	align-self: flex-end;

	font-size: 1.5rem;

	border-radius: 0.5rem;
	border: 1px solid rgba(35, 35, 35, 0.349);
	box-shadow: 0 3px 5px rgb(35 35 35 / 0.5);
}

input {
	outline: none;
	border: 1px solid black;
}

input:not([type="checkbox"]) {
	border-radius: 0.5rem;
}

input:user-invalid {
	border-color: red;
}

input:user-valid {
	border-color: green;
}

input:focus {
	border-color: blue;
}