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

* {
	margin: 0;
	padding: 0;
	box-sizing: border-box;
}


body {
	font-family: 'Roboto', sans-serif;
	background-color: #f8fafc;
}

header {
	width: 100%;
	padding: 20px;
	position: fixed;
	top: 0;
	background-color: #7E22CE;
	z-index: 99;
}

.shadow {
	box-shadow: 0 10px 15px -3px rgb(0, 0, 0, 0.1), 0 4px 6px -4px rgb(0, 0, 0, 0.1);
}

.logo {
	width: max-content;
	margin: 0 auto;
	padding: 8px;
	color: white;
	display: flex;
	align-items: center;
	border: 2px solid white;
	border-radius: 10px;
}

.logo svg {
	width: 50px;
	height: 50px;
	background-color: white;
	color: #7E22CE;
	margin-right: 10px;
	border-radius: 5px;
}


.logo-text p {
	font-size: 15px;
	color: #ddd;
}

main {
	margin-top: 150px;
}


.container {
	max-width: 550px;
	margin: 50px auto 80px;
	padding: 50px 30px 30px;
	border-radius: 10px;
	background-color: white;
	box-shadow: 0 4px 6px -1px rgb(0,0,0,0.1), 0 2px 4px -2px rgb(0,0,0,0.1)
}


.add-book {
	padding: 20px;
	border: 2px solid #581C87;
	border-radius: 10px;
}

.heading {
	text-align: center;
	margin: 20px 0;
	color: #581C87;
}

.form label {
	font-weight: bold;
	color: #581C87;
}

.form input {
	width: 100%;
	padding: 10px;
	margin-top: 5px;
	margin-bottom: 20px;
	font-size: 0.9em;
	border: 1px solid #888;
	border-radius: 5px;
}

.form input:focus {
	outline-color: #581C87;
}

.form-completed {
	display: flex;
	align-items: center;
	margin-bottom: 20px;
}

.form-completed label {
	margin-right: 5px;
	font-weight: normal;
	font-size: 15px;
}


.form-completed input {
	width: 15px;
	height: 15px;
	margin: 0;
	padding: 0;
	cursor: pointer;
}


.form .btn-submit {
	margin-bottom: 10px;
	padding: 12px;
	font-weight: bold;
	background-color: #7E22CE;
	color: white;
}


.btn-submit:hover {
	background-color: #581C87;
	cursor: pointer;
}

.btn-submit:active {
	background-color: #7E22CE;
}


.uncompleted-bookshelf {
	margin-bottom: 50px;
}


.uncompleted-bookshelf,
.completed-bookshelf {
	border: 2px solid #581C87;
	padding: 20px;
	border-radius: 10px;
}

.book-list {
	list-style: none;
}


.book-item {
	border: 2px solid #581C87;
	padding: 20px;
	border-radius: 10px;
	line-height: 1.5;
	margin-bottom: 20px;
	position: relative;
}

.book-item:last-child {
	margin-bottom: 0;
}

.book-item h3 {
	width: 80%;
}

.book-item p {
	color: #555;
	font-size: 0.9em;
}

.complete-button,
.undo-button,
.delete-button {
	padding: 10px 20px;
	background-color: white;
	border-radius: 5px;
	font-weight: bold;
	cursor: pointer;
	margin-top: 20px;
}

.complete-button {
	border: 2px solid #15803D;
	color: #15803D;
}

.complete-button:hover {
	background-color: #15803D;
	color: white;
}

.complete-button:active {
	background-color: white;
	color: #15803D;
}

.undo-button {
	border: 2px solid #6B21A8;
	color: #6B21A8;
}

.undo-button:hover {
	background-color: #6B21A8;
	color: white;
}

.undo-button:active {
	background-color: white;
	color: #6B21A8;
}

.delete-button {
	margin-left: 10px;
	border: 2px solid #B91C1C;
	color: #B91C1C;
}

.delete-button:hover {
	background-color: #B91C1C;
	color: white;
}

.delete-button:active {
	background-color: white;
	color: #B91C1C;
}

.edit-button {
	padding: 2px;
	background-color: white;	
	border: 2px solid #581C87;
	border-radius: 3px;
	color: #581C87;
	position: absolute;
	top: 10px;
	right: 10px;
}

.edit-button:hover {
	background-color: #581C87;
	color: white;
	cursor: pointer;
}

.edit-button:active {
	background-color: white;
	color: #581C87;
}

.edit-button::after {
	content: '';
	position: absolute;
	left: 0;
	top: 0;
	width: 100%;
	height: 100%;
	background-color: transparent;
}

.popup-container {
	position: fixed;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	background-color: rgba(0,0,0,0.4);
	display: none;
	justify-content: center;
	align-items: center;
	z-index: 999;
}

.popup-box {
	width: 500px;
	padding: 30px;
	text-align: center;
	background-color: white;
	border-radius: 10px;
	box-shadow: 0 4px 6px -1px rgb(0,0,0,0.1), 0 2px 4px -2px rgb(0,0,0,0.1);
	opacity: 0;
	transform: scale(0.8);
}

.popup-box h3 {
	width: 80%;
	margin: auto;
	text-transform: capitalize;
}

.icon {
	width: 50px;
	height: 50px;
	margin: 0 auto 20px;
}

.success-icon {
	background: url('../icons/check-circle.svg');
	background-size: contain;
}

.warning-icon {
	background: url('../icons/exclamation-circle.svg');
	background-size: contain;
}

.popup-box button {
	width: 100px;
	padding: 10px;
	background-color: white;
	margin-top: 20px;
	border-radius: 5px;
	font-weight: bold;
	text-transform: capitalize;
	cursor: pointer;
}

.cancel-button {
	border: 2px solid #B91C1C;
	margin-right: 10px;
	color: #B91C1C;
}

.cancel-button:hover {
	background-color: #B91C1C;
	color: white;
}

.cancel-button:active {
	background-color: white;
	color: #B91C1C;
}


.confirm-button {
	border: 2px solid #15803D;
	color: #15803D;
}

.confirm-button:hover {
	background-color: #15803D;
	color: white;
}

.confirm-button:active {
	background-color: white;
	color: #15803D;
}


.content-show {
	display: flex !important;
}


.animation-show {
	animation: animShow .3s forwards;
}

.animation-hide {
	animation: animHide .3s forwards;
}


@keyframes animShow {
	0% {
		opacity: 0;
		transform: scale(0.8);
	}

	100% {
		opacity: 1;
		transform: scale(1);
	}
}

@keyframes animHide {
	0% {
		opacity: 1;
		transform: scale(1);
	}

	100% {
		opacity: 0;
		transform: scale(0.8);
	}
}


.search-bar {
	display: flex;
	justify-content: end;
	margin-bottom: 20px;
}

.search-bar input {
	width: 50%;
	font-size: 0.9em;
	padding: 10px 20px;
	border: 1px solid #581C87;
	border-radius: 50px;
}

.search-bar input:focus {
	outline-color: #581C87;
}


.edit-container {
	display: none;
	position: fixed;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	z-index: 999;
	background-color: rgba(0, 0, 0, 0.5);
	overflow: auto;
}

.edit-container .container {
	width: 500px;
	height: max-content;
}


.edit-book {
	padding: 20px;
	border: 2px solid #581C87;
	border-radius: 10px;
}


/*responsive breakpoints*/
/*mobile*/
@media screen and (max-width: 480px){
	.container {
		width: 90%;
		padding: 50px 20px 20px;
	}

	.uncompleted-bookshelf,
	.completed-bookshelf {
		padding: 10px;
	}

	.complete-button,
	.undo-button,
	.delete-button {
		width: 100%;
	}

	.complete-button,
	.undo-button {
		margin-top: 50px;
	}

	.delete-button {
		margin-left: 0;
		margin-top: 10px;
	}

	.popup-box {
		width: 90%;
	}

	.popup-box h3 {
		width: 100%;
	}

	.search-bar input {
		width: 70%;
	}

	.edit-container .container {
		width: 90%;
		margin: auto;
	}
}
