@import url("https://fonts.googleapis.com/css2?family=Merriweather:wght@400;700;900&display=swap");

body {
	display: flex;
	flex-direction: column;
	background-color: #f8fafc;
	font-family: "Merriweather", serif;
}

.top-wrapper {
	display: grid;
	grid-template-columns: 2fr 1fr;
}

h1 {
	font-size: 3rem;
	font-weight: bold;
	display: flex;
	justify-content: center;
}

.equation-wrapper {
	display: flex;
	flex-direction: column;
	align-items: center;
}

#poly-eqn {
	font-size: 1.5rem;
	font-weight: bold;
	width: 60%;
}

.solutions-wrapper {
	display: grid;
	grid-template-columns: 1fr 1fr 1fr;
	grid-gap: 1rem;
	margin: 2rem;
}

.solution {
	padding: 5px;
	font-size: 1.5rem;
	font-weight: bold;
}

.btn-wrapper {
	display: flex;
	flex-direction: row;
	justify-content: flex-start;
	margin-bottom: 1rem;
}

.message-wrapper {
	display: flex;
	flex-direction: column;
	margin: 1rem 2rem;
}

.canvas-wrapper {
	margin-left: 2rem;
}

.error {
	color: #dc2626;
	background-color: #fee2e2;
	font-size: 1.5rem;
	font-weight: 700;
	padding: 5px;
	border: 1px solid #dc2626;
	border-radius: 5px;
	text-align: center;
	margin-bottom: 1rem;
}

.hide {
	display: none;
}

button {
	font-size: 1.5rem;
	font-weight: 700;
	margin-right: 25px;
	padding: 10px;
	border-radius: 5px;
}

#send {
	color: white;
	border: none;
	background-color: rgb(52 211 153);
}

#send:hover {
	background-color: rgb(4 120 87);
}

#send:disabled {
	outline: none;
	opacity: 0.3;
	background-color: gray;
}

#solve {
	color: white;
	border: none;
	background-color: rgb(167 139 250);
}

#solve:hover {
	background-color: rgb(109 40 217);
}

#solve:disabled {
	outline: none;
	opacity: 0.3;
	background-color: gray;
}

#clear {
	color: white;
	border: none;
	background-color: rgb(248 113 113);
}

#clear:hover {
	background-color: rgb(185 28 28);
}

input {
	text-align: center;
	border-radius: 5px;
	margin-bottom: 1rem;
	padding: 5px;
}

input:focus,
input:active {
	outline: none;
	border: 3px solid #7f9cf5;
}

input.error {
	border: 3px solid #dc2626;
	background-color: #fee2e2;
}

.local-error {
	margin-bottom: 1rem;
	color: #dc2626;
	font-weight: 900;
}

footer {
	display: flex;
	flex-direction: column;
	justify-content: center;
	align-items: flex-end;
	margin: 1rem 2.5rem;
}

a {
	text-decoration: none;
	color: #4f6cf0;
	font-size: 1.5rem;
}
a:hover {
	text-decoration: underline;
}

/* Prevents canvas from going crazy on touch screen */
#canvas-editor {
	touch-action: none;
}
