@import url('https://fonts.googleapis.com/css2?family=Noto+Sans:ital,wght@0,100..900;1,100..900&display=swap');

:root {
	--background-color: #1a1a1a;
	--card-background: #2b2b2b;
	--text-color: #e0e0e0;
	--accent-color: #9a7bca;
	--border-color: #444444;
	--border-radius: 0.2rem;
}

html {
	font-family: 'Noto Sans', sans-serif;
	color: var(--text-color);
	background-color: var(--background-color);
	line-height: 1.2;
}

*,
*::before,
*::after {
	box-sizing: border-box;
}

ul {
	list-style: none;
	margin: 0;
	padding: 0;
}

body {
	min-height: 90dvh;
	padding: 1rem;
	margin: 0;
	min-width: 360px;
}

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

.title {
	font-size: 1.8rem;
	padding: 0.3rem 0;
}

.form {
	display: flex;
	max-width: 30rem;
	align-items: center;
	gap: 0.5rem;
	margin-bottom: 1rem;
}

.input {
	font-size: 1rem;
	padding: 0.3rem 0.6rem;
	color: var(--text-color);
	background-color: var(--card-background);
	border: 1px solid var(--border-color);
	border-radius: var(--border-radius);
	outline: none;
	height: 100%;
}

.input:focus {
	border-color: var(--accent-color);
}

.button {
	font-size: 1rem;
	color: var(--text-color);
	background-color: var(--accent-color);
	border: 1px solid var(--accent-color);
	border-radius: var(--border-radius);
	padding: 0.3rem 0.6rem;
	transition: opacity 0.2s;
	outline: none;
	cursor: pointer;
}

.button:not(:disabled):focus-visible {
	outline: 1px solid var(--accent-color);
	outline-offset: 2px;
}

.button:disabled {
	opacity: 0.8;
	cursor: not-allowed;
}

@media (any-hover: hover) {
	.button:not(:disabled):hover {
		opacity: 0.85;
	}
}

.todos {
	max-width: 25rem;
	width: 100%;
}

.todo {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 1rem;
	width: 100%;
	padding: 0.6rem;
	margin-bottom: 0.6rem;
	border-radius: var(--border-radius);
	background-color: var(--card-background);
}

.todo:last-child {
	margin-bottom: 0;
}

.todo.completed {
	opacity: 0.7;
}

.todo.completed .todo-text {
	text-decoration: line-through;
}

.todo-actions {
	display: flex;
	gap: 0.25rem;
	flex-shrink: 0;
}
