/* Import Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Play&display=swap');

/* Variables for color scheme */
:root {
	--primary: #145712; /* Primary color for buttons and accents */
	--business: #ee3a3a; /* Business-related color */
	--personal: var(--primary); /* Personal color */
	--light: #EEE; /* Light background/text color */
	--grey: #2a3227; /* Grey color */
	--dark: #050605; /* Dark background color */
	--danger: #6d2625; /* Danger/error color */

	--shadow: 0 1px 3px rgba(0, 0, 0, 0.1); /* Generic shadow effect */

	--business-glow: 0px 0px 4px rgba(136, 87, 87, 0.75); /* Glow effect for business-related elements */
	--personal-glow: 0px 0px 4px rgba(101, 154, 100, 0.75); /* Glow effect for personal-related elements */
}
/* End of Variables */

/* Reset default styles */
* {
	margin: 0;
	padding: 0;
	box-sizing: border-box;
	font-family: 'montserrat', sans-serif; /* Default font */
}

/* Reset styles for inputs and buttons */
input:not([type="radio"]):not([type="checkbox"]), button {
	appearance: none;
	border: none;
	outline: none;
	background: none;
	cursor: initial;
}
/* End of Resets */

/* Base styles for the body */
body {
	background: var(--dark); /* Set dark background */
	color: var(--light); /* Set light text color */
	display: flex;
	justify-content: center;
	align-items: center;
	min-height: 90vh; /* Minimum height for body */
}

/* Application container styles */
.app {
	position: relative;
	width: 600px;
	height: 500px;
	background: var(--dark); /* Dark background for app */
	border-radius: 0.5rem; /* Rounded corners */
}

/* General section styles */
section {
	margin-top: 2rem;
	margin-bottom: 2rem;
	padding-left: 1.5rem;
	padding-right: 1.5rem;
}

/* Heading styles */
h3 {
	color: var(--light);
	font-size: 1rem;
	font-weight: 400;
	margin-bottom: 0.5rem;
}

/* Subheading styles */
h4 {
	color: var(--light);
	font-size: 0.875rem;
	font-weight: 700;
	margin-bottom: 0.5rem;
}

/* Styles for autofill input */
input:-webkit-autofill,
input:-webkit-autofill:hover,
input:-webkit-autofill:focus,
input:-webkit-autofill:active {
	transition: background-color 5000s; /* Slow transition to override autofill styles */
	-webkit-text-fill-color: #fff !important; /* Text color for autofill */
}

/* Styles for greeting section */
.greeting .title {
	display: flex;
}

.greeting .title input {
	margin-left: 0.5rem;
	flex: 1 1 0%;
	min-width: 0;
}

.greeting .title,
.greeting .title input {
	color: var(--light);
	font-size: 1.5rem;
	font-weight: 700;
}

/* Styles for creating todos */
.create-todo input[type="text"] {
	display: block;
	width: 100%;
	font-size: 1.125rem;
	padding: 1rem 1.5rem;
	color: #fff;
	background-color: #1d1f1d;
	border-radius: 0.5rem;
	box-shadow: var(--shadow);
	margin-bottom: 1.5rem;
}

.create-todo .options {
	display: grid;
	grid-template-columns: repeat(2, 1fr);
	grid-gap: 1rem;
	margin-bottom: 1.5rem;
}

.create-todo .options label {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	background-color: #1d1f1d;
	padding: 1.5rem;
	box-shadow: var(--shadow);
	border-radius: 0.5rem;
	cursor: pointer;
}

/* Hide radio and checkbox inputs */
input[type="radio"],
input[type="checkbox"] {
	display: none;
}

/* Bubble styles for options */
.bubble {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 20px;
	height: 20px;
	border-radius: 999px;
	border: 2px solid var(--business);
	box-shadow: var(--business-glow);
}

.bubble.personal {
	border-color: var(--personal);
	box-shadow: var(--personal-glow);
}

.bubble::after {
	content: '';
	display: block;
	opacity: 0;
	width: 0px;
	height: 0px;
	background-color: var(--business);
	box-shadow: var(--business-glow);
	border-radius: 999px;
	transition: 0.2s ease-in-out;
}

.bubble.personal::after {
	background-color: rgb(94, 203, 94);
	box-shadow: var(--personal-glow);
}

/* Show bubble on input check */
input:checked ~ .bubble::after {
	width: 10px;
	height: 10px;
	opacity: 1;
}

/* Additional styles for options labels */
.create-todo .options label div {
	color: var(--light);
	font-size: 1.125rem;
	margin-top: 1rem;
}

/* Button styles for submitting todos */
.create-todo input[type="submit"] {
	display: block;
	width: 100%;
	font-size: 1.125rem;
	padding: 1rem 1.5rem;
	color: #FFF;
	font-weight: 700;
	text-transform: uppercase;
	background-color: var(--primary);
	box-shadow: var(--personal-glow);
	border-radius: 0.5rem;
	cursor: pointer;
	transition: 0.2s ease-out;
}

.create-todo input[type="submit"]:hover {
	opacity: 0.75;
}

/* Styles for todo list container */
.todo-list .list {
	padding-top: 10px;
	margin: 1rem 0;
}

/* Styles for individual todo items */
.todo-list .todo-item {
	display: flex;
	align-items: center;
	background-color: var(--grey);
	padding: 1rem;
	border-radius: 0.5rem;
	box-shadow: var(--shadow);
	margin-bottom: 1rem;
}

.todo-item label {
	display: block;
	margin-right: 1rem;
	cursor: pointer;
}

.todo-item .todo-content {
	flex: 1 1 0%;
}

.todo-item .todo-content input {
	color: var(--light);
	font-size: 1.125rem;
}

.todo-item .actions {
	display: flex;
	align-items: center;
}

.todo-item .actions button {
	display: block;
	padding: 0.5rem;
	border-radius: 0.25rem;
	color: #FFF;
	cursor: pointer;
	transition: 0.2s ease-in-out;
}

.todo-item .actions button:hover {
	opacity: 0.75;
	background-color: rgb(105, 121, 97);
}

/* Strike through completed todos */
.todo-item.done .todo-content input {
	text-decoration: line-through;
	color: var(--light);
}

/* Media query for larger screens */
@media screen and (min-width:850px) {
	body {
		background: var(--dark); /* Set dark background */
		color: var(--light); /* Set light text color */
		display: flex;
		justify-content: center;
		align-items: center;
		min-height: 90vh; /* Minimum height for body */
	}

	.app {
		position: relative;
		width: 600px;
		height: 500px;
		background: var(--dark); /* Dark background for app */
		border-radius: 0.5rem; /* Rounded corners */
	}

	/* Split screen layout */
	.split {
		height: 100%;
		width: 50%;
		position: fixed;
		z-index: 1;
		top: 0;
		overflow-x: hidden;
		padding-top: 20px;
	}

	.left {
		left: 0;
		background-color: #111; /* Dark background for left side */
	}

	.right {
		right: 0;
	}

	.centered {
		position: absolute;
		top: 50%;
		left: 50%;
		transform: translate(-50%, -50%);
		text-align: center;
	}

	/* Adjustments for todo list on larger screens */
	.todo-list {
		margin-top: 2rem;
		padding-top: 10px;
		width: 100%;
		height: auto; /* Allows the list to expand downward */
	}

	.todo-list .list {
		margin-top: 0;
		padding-top: 0;
		width: 100%;
		height: auto;
	}

	.split.right .centered {
		max-height: 100%; /* Ensures the right section doesn't overflow */
	}

	.todo-list h3 {
		margin-top: 0;
		margin-bottom: 1rem;
		color: var(--light);
		font-size: 2rem;
		font-weight: 600;
	}
	
}
