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

body {
	display: grid;
	gap: 10px;
}

@media (min-width: 1024px) {
	body {
		grid-template-columns: 1fr 1fr 1fr;
	}
}

section {
	background-color: #fafafa;
	padding: 20px;
	border: 2px solid #dedede;
	display: flex;
	align-items: center;
	justify-content: center;
	aspect-ratio: 1/1;
	border-radius: 8px;
	position: relative;

	& > h2 {
		position: absolute;
		color: #826bd3;
		opacity: 0.7;
		top: 0;
		left: 8px;
		font-size: 14px;
		font: 700 14px monospace;
		font-weight: 400;
		font-style: normal;
	}
}

oatie-wrapper {
	overflow: hidden;
	position: relative;
	display: block;
	background: #f4f3f0;
	border: 2px solid #dedede;
	border-radius: 8px;

	.headline {
		display: block;
		font-family: "Lusitana", serif;
		font-size: 18px;
		color: #424E5F;

		span {
			color: #826bd3;
		}
	}

	.sub {
		display: block;
		font-family: monospace;
		font-size: 10px;
		margin-left: 0.1em;
		color: #8c8c8c;
	}

	.link {
		cursor: pointer;
		appearance: none;
		border: 0;
		margin: 0;
		padding: 0;
		font-family: inherit;
		font-size: inherit;
		color: inherit;
		text-decoration: underline;
	}
}

oatie-bubble {
	color: #8c8c8c;
	cursor: pointer;
	position: relative;
	overflow: hidden;
	width: 48px;
	height: 48px;
	display: flex;
	align-items: center;
	justify-content: center;

	svg {
		width: 24px;
		height: 24px;
		transition: scale 0.2s;
	}

	&:hover {
		color: #826bd3;
		svg {
			scale: 1.1;
		}
	}
	&:active {
		svg {
			scale: 0.9;
		}
	}
}

oatie-loader {
	width: 300px;
	height: 48px;
	display: flex;
	gap: 10px;
	color: #8c8c8c;
	align-items: center;
	padding-left: 12px;

	svg {
		animation: oatie-loader-spin 1s ease infinite;
		width: 24px;
		height: 24px;
	}

	span {
		font-family: monospace;
		font-size: 12px;
	}
}

@keyframes oatie-loader-spin {
	0% {
		transform: rotate(0deg);
	}
	100% {
		transform: rotate(360deg);
	}
}

oatie-returning {
	display: flex;
	flex-direction: column;
	justify-content: center;
	width: 300px;
	color: #424E5F;
	padding: 12px;
}

oatie-new {
	display: flex;
	flex-direction: column;
	justify-content: center;
	width: 300px;
	padding: 12px;

	form {
		margin-top: 4px;
		display: flex;

		input {
			padding-left: 8px;
			border: 1px solid #DEDEDE;
			border-radius: 8px 0 0 8px;
			height: 32px;
			width: 100%;
			font-family: monospace;
			box-sizing: border-box;
			box-shadow: none;
			transition: box-shadow 0.2s;
			border-right: 0;
			&:focus {
				border-color: #826bd3;
				outline: none;
				box-shadow: 0 0 0 2px rgba(129, 107, 211, 0.2);
			}
		}
		button {
			border-radius: 0 8px 8px 0;
			border: 1px solid #DEDEDE;
			border-left: 0;
			background: #826bd3;
			color: white;
			width: 32px;
			height: 32px;
			flex-shrink: 0;

			&:focus {
				border-color: #826bd3;
				outline: none;
				box-shadow: 0 0 0 2px rgba(129, 107, 211, 0.2);
			}

			svg {
				width: 100%;
				height: 100%;
			}
		}
	}
}