:root {
	/* --background: hsl(20deg 5% 13%); */
	--background-body: hsl(20deg 5% 7%);
	--background-content: hsl(20deg 5% 11%);
	--background-nav: hsl(145, 80%, 30%);
	--background-search: hsl(145deg, 70%, 25%);
	--background-filters: hsl(145deg, 4%, 20%);
	--background-editor: hsl(213deg, 29%, 13%);
	--background-editor-panel: hsl(213deg, 29%, 19%);
	--background-input: hsl(213deg, 18%, 79%);
	--white: hsl(0 0% 100%);
	--white-10: hsl(0 0% 100% / 0.1);
	--white-20: hsl(0 0% 100% / 0.2);
	--white-50: hsl(0 0% 100% / 0.5);
	--white-70: hsl(0 0% 100% / 0.7);
	--black-20: hsl(0 0% 0% / 0.2);
	--black-30: hsl(0 0% 0% / 0.3);
	--black-70: hsl(0 0% 0% / 0.7);
	--grey-80: hsl(20deg 5% 80%);
	--grey-70: hsl(20deg 5% 70%);
	--grey-60: hsl(20deg 5% 60%);
	--grey-50: hsl(20deg 5% 50%);
	--grey-40: hsl(20deg 5% 40%);
	--blue: hsl(213deg, 69%, 69%);
	--green: hsl(145deg, 58%, 51%);
	--green-2: hsl(145deg, 40%, 62%);
	--button: hsl(145deg 70% 35%);
	--button-hover: hsl(145deg 70% 40%);
	--error: hsl(355deg 100% 68%);
	--error-dark: hsl(355deg 58% 41%);
}

* {
	-webkit-box-sizing: border-box;
	-moz-box-sizing: border-box;
	box-sizing: border-box;
}

html {
	font-size: 10px;
	/* scroll-behavior: smooth; */
}

body {
	background: var(--background-body);
	color: #fff;
	font-family: 'Roboto', sans-serif;
	margin: 0;
	padding: 5.5rem 0 0 0;
}

section {
	font-size: 1.8rem;
	width: 100rem;
	margin: 3rem auto;
}

.button {
	background-color: var(--button);
	border-radius: .3rem;
	cursor: pointer;
	font-size: 1.8rem;
	padding: 1rem 2rem;
	text-align: center;
	transition: background-color .2s ease-in-out;
}

.button:hover {
	background-color: var(--button-hover);
	transition: background-color .2s ease-in-out;
}

h1 {
	color: var(--green);
	font-family: 'Roboto Slab', sans-serif;
	font-size: 3.3rem;
	font-weight: 700;
	margin: 0 0 2rem;
}

.toggle {
	background: var(--grey-40);
	border-radius: 100rem;
	cursor: pointer;
	display: inline-block;
	height: 1.8rem;
	min-width: 4.5rem;
	position: relative;
	user-select: none;
}

.toggle-handle {
	background: var(--grey-50);
	border-radius: 2rem;
	height: 2.5rem;
	left: 0;
	position: absolute;
	top: -0.33rem;
	transition: all .2s ease-in-out;
	width: 2.5rem;
}

.toggle.on .toggle-handle {
	background: var(--green);
	left: calc(100% - 2.5rem);
	transition: all .2s ease-in-out;
}

#search_cover,
#login_cover {
	display: none;
	width: 100vw;
	height: 100vh;
	position: fixed;
	top: 5.5rem;
	left: 0;
	background-color: var(--black-70);
}

/** ////////////////////////////////////////////////////////////////////////////////////////// */
/** /////////////////////////////////////////////////////////////////////////////////  Nav  // */
/** ////////////////////////////////////////////////////////////////////////////////////////// */

nav {
	font-size: 1.6rem;
	align-items: center;
	background: var(--background-nav);
	display: grid;
	grid-template-columns: auto max-content;
	height: 5.5rem;
	padding: 0 .7em;
	position: relative;
	user-select: none;
	position: fixed;
	top: 0;
	left: 0;
	width: 100%;
	z-index: 4;
}

#show_plants,
#show_tasks,
#search {
	display: inline-block;
	background: var(--black-20);
	border-radius: 30px;
	font-size: 1.6rem;
	font-family: 'Roboto', sans-serif;
	padding: .5em 1em;
	outline: none;
	border: none;
	color: #fff;
	vertical-align: middle;
	text-decoration: none;
	height: 34px;
	transition: all .2s ease-in-out;
}

#show_plants svg,
#show_tasks svg {
	fill: #fff;
	width: 1.8rem;

}

#show_plants,
#show_tasks {
	cursor: pointer;
	user-select: none;
}

#show_plants:hover,
#show_tasks:hover {
	background: var(--black-30);
	transition: all .2s ease-in-out;
}

#search_wrapper {
	display: inline-block;
	position: relative;
}

#search {
	width: 5.2em;
	transition: width .2s ease-in-out;
}

#search.active {
	width: 15em;
	padding: 0.5em 2.6em 0.5em 1em;
	transition: width .2s ease-in-out;
}

#search::placeholder {
	color: #fff;
	opacity: 1;
}

#search.active::placeholder {
	opacity: 0;
}

#search_clear {
	display: none;
	position: absolute;
	top: 0;
	right: 0;
	height: 100%;
	width: 4rem;
	text-align: center;
	cursor: pointer;
}

#search_clear svg {
	fill: var(--white-50);
	width: 40%;
	margin-top: .4rem;
	transition: all .2s ease-in-out;
}

#search_clear:hover svg {
	fill: var(--white);
	transition: all .2s ease-in-out;
}


.nav-button {}

.nav-button svg {
	fill: var(--white-50);
	transition: all .2s ease-in-out;
}

.nav-button:hover svg {
	fill: var(--white);
	transition: all .2s ease-in-out;
}

#menu_add_plant, #menu_add_task, #menu_login, #menu_edit {
	display: none;
}


/** ////////////////////////////////////////////////////////////////////////////////////////// */
/** ////////////////////////////////////////////////////////////////////////  Plants List  // */
/** ////////////////////////////////////////////////////////////////////////////////////////// */

#plants {
	display: none;
}

#plants_list {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 2rem;
}

.plant {
	cursor: pointer;
	font-size: 1.8rem;
	left: -1rem;
	padding: .5rem 1rem;
	position: relative;
	transition: background .3s ease-in-out;
	user-select: none;
}

.plant:hover {
	background: var(--white-10);
	border-radius: .5rem;
	transition: background .3s ease-in-out;
}


/** ////////////////////////////////////////////////////////////////////////////////////////// */
/** ////////////////////////////////////////////////////////////////////////  Tasks List  // */
/** ////////////////////////////////////////////////////////////////////////////////////////// */

#tasks {
	display: none;
}

#tasks_list_header {
	display: grid;
	grid-template-columns: auto max-content;
	align-items: center;
}

#tasks_toggle {
	color: var(--grey-60);
	display: grid;
	font-size: 16px;
	gap: 15px;
	grid-template-columns: max-content max-content;
	align-items: center;
}

#tasks_list {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 2rem;
}

.task {
	display: none;
	cursor: pointer;
	font-size: 1.8rem;
	left: -1rem;
	padding: .5rem 1rem;
	position: relative;
	transition: background .3s ease-in-out;
	user-select: none;
}

.task:hover {
	background: var(--white-10);
	border-radius: .5rem;
	transition: background .3s ease-in-out;
}

.task.is-current {
	display: block;
}

.task span {
	color: var(--green-2);
}

.task .task-when {
	font-size: 1.6rem;
	margin-top: 0.5rem;
	color: var(--grey-70);
}

.task .current-dot {
	background: var(--green);
	border-radius: 0.6rem;
	position: absolute;
	left: -0.3rem;
	top: 1.3rem;
	width: 0.6rem;
	height: 0.6rem;
	display: none;
}

.task.is-current .current-dot {
	display: block;
}

#tasks.show-all .task {
	display: block;
}

/** ////////////////////////////////////////////////////////////////////////////////////////// */
/** ///////////////////////////////////////////////////////////////////////  Plant or Task  // */
/** ////////////////////////////////////////////////////////////////////////////////////////// */

article {
	font-size: 1.8rem;
	background: var(--background-content);
	border-radius: .5rem;
	display: none;
	margin: 3rem auto;
	max-width: 114rem;
	min-height: calc(100vh - 11.5rem);
	padding: 3rem 4rem;
}

article.not-found {
	min-height: unset;
}

article h2 {
	font-size: 2.2rem;
	margin: 0 0 2rem;
	color: var(--green-2);
}

article h3 {
	font-size: 2.0rem;
	margin: 0 0 2rem;
	color: var(--green-2);
}

article #description {
	line-height: 2.8rem;
	font-weight: 300;
}

article p {
	line-height: 2.8rem;
	font-weight: 300;
}

article .task-go-to-plant {
	color: var(--white-70);
	cursor: pointer;
	transition: all .2s ease-in-out;
}

article .task-go-to-plant:hover {
	color: #fff;
	transition: all .2s ease-in-out;
}

article .task-when {
	color: var(--white-70);
}

article #plant_grid {
	display: grid;
	grid-template-columns: 2fr minmax(200px, 1fr);
	gap: 6rem;
}

article .plant-task {
	border-radius: .2rem;
	cursor: pointer;
	margin-bottom: 2rem;
	position: relative;
	transition: all .2s ease-in-out;
	width: fit-content;
	min-width: 12rem;
}

article .plant-task:hover {
	background: hsl(145deg 4% 19%);
	box-shadow: 0 0 0 5px hsl(145deg 4% 19%);
	transition: all .2s ease-in-out;
}

article .plant-task .plant-task-when {
	font-size: 1.6rem;
	margin-top: 0.5rem;
	color: var(--grey-70);
}

article .plant-task .current-dot {
	background: var(--green);
	border-radius: 0.6rem;
	position: absolute;
	left: -1.2rem;
	top: 0.75rem;
	width: 0.6rem;
	height: 0.6rem;
	display: none;
}

article .plant-task.is-current .current-dot {
	display: block;
}




/** ////////////////////////////////////////////////////////////////////////////////////////// */
/** /////////////////////////////////////////////////////////////////////// Search Results  // */
/** ////////////////////////////////////////////////////////////////////////////////////////// */

#search_results {
	display: none;
	font-size: 1.6rem;
	position: fixed;
	top: 5.5rem;
	left: 12.5rem;
	width: 40rem;
	background-color: var(--background-search);
	border-radius: 0 0 .3rem .3rem;
}

.search-result {
	cursor: pointer;
	padding: 1.15rem 1.5rem;
	border-top: 1px solid var(--black-20);
	transition: background-color .2s ease-in-out;
}

.search-result:hover {
	background-color: var(--background-nav);
	transition: background-color .2s ease-in-out;
}

.search-result:last-child {
	border-radius: 0 0 .3rem .3rem;
}

.search-results-none {
	font-style: italic;
	padding: 1.15rem 1.5rem;
	border-top: 1px solid var(--black-20);
	color: var(--white-70);
}


/** ////////////////////////////////////////////////////////////////////////////////////////// */
/** /////////////////////////////////////////////////////////////////////////////// Editor  // */
/** ////////////////////////////////////////////////////////////////////////////////////////// */

#editor {
	display: none;
	font-size: 1.7rem;
	background: var(--background-editor);
	border-radius: .5rem;
	margin: 3rem auto;
	max-width: 150rem;
	min-height: calc(100vh - 11.5rem);
	padding: 3rem;
}

#editor .tox-tinymce {
	border: 0;
}

#editor_grid {
	display: grid;
	grid-template-columns: 1fr 1.5fr;
	gap: 2rem;
}

#editor_grid h1 {
	grid-column: 1 / 3;
	grid-row: 1 / 2;
	color: var(--green);
	font-family: 'Roboto Slab', sans-serif;
	font-weight: 700;
	font-size: 3.3rem;
	margin: 0 0 1rem;
}

#editor_form {
	grid-column: 1 / 2;
	grid-row: 2 / 4;
	padding: 2rem;
}

#editor_ingredients {
	grid-column: 2 / 3;
	grid-row: 2 / 3;
}

#editor_directions {
	grid-column: 2 / 3;
	grid-row: 3 / 5;
}

#editor_save {
	grid-column: 1 / 2;
	grid-row: 4 / 5;
	margin: 0 2px 2px 2px;
	border-radius: 0.8rem;
}

#editor_description > label {
	margin: 2rem 0 .5rem 2rem;
	display: inline-block;
	font-size: 1.9rem;
}

#editor_form input,
#editor_form select {
	font-size: 1.6rem;
	padding: 0.7rem 0.8rem;
	border-radius: 0.3rem;
	border: 0;
	outline: none;
	background: var(--background-input);
}

#editor_form input:focus {
	background: var(--white);
}

#editor_form input:read-only {
	background: #3d4c60;
	color: #fff;
	cursor: default;
}

.editor-panel {
	background: var(--background-editor-panel);
	border: 2px solid #161f29;
	border-radius: 1rem;
}

.form-row {
	display: grid;
	grid-template-columns: 1fr;
	gap: .5rem 1.5rem;
	margin-bottom: 2rem;
}

.form-row:last-child {
	margin-bottom: 0;
}

.form-row.double {
	grid-template-columns: 1fr 1fr;
}

.form-row.double label {
	grid-column: 1 / 3;
	grid-row: 1 / 2;
}

.input-checkboxes {
	margin-top: .5rem;
}

.form-input-checkbox {
	background: var(--background-input);
	color: #000;
	padding: 0.7rem;
	border-radius: 0.3rem;
	margin-right: 0.5rem;
	user-select: none;
	font-size: 1.6rem;
}


/** ////////////////////////////////////////////////////////////////////////////////////////// */
/** //////////////////////////////////////////////////////////////////////////////// Login  // */
/** ////////////////////////////////////////////////////////////////////////////////////////// */

#login {
	display: none;
	width: 300px;
	background: var(--background-editor-panel);
	font-size: 1.7rem;
	padding: 3rem;
	position: absolute;
	top: 8.5rem;
	left: 50%;
	transform: translateX(-50%);
	border-radius: 0.5rem;
	box-shadow: 0 1rem 3rem #000;
}

#login h2 {
	margin-top: 0;

}

#login input {
	background: var(--background-input);
	padding: 0.8rem 1rem;
	width: 100%;
	margin: 0.5rem 0 2rem 0;
	border-radius: 0.2rem;
	border: 0;
	font-size: 1.7rem;
}

#login_error {
	color: var(--error);
	display: none;
}


/** ////////////////////////////////////////////////////////////////////////////////////////// */
/** ///////////////////////////////////////////////////////////////////////// Notification  // */
/** ////////////////////////////////////////////////////////////////////////////////////////// */

#notification {
	display: none;
	position: absolute;
	top: 7.5rem;
	width: 90%;
	background: var(--button);
	left: 50%;
	transform: translateX(-50%);
	font-size: 1.7rem;
	padding: 1.7rem 2rem;
	border-radius: 0.8rem;
	max-width: 40rem;
	box-shadow: 0 0 0 3000px var(--black-30), 0 1rem 3rem #000;
}

#notification.error {
	background: var(--error-dark);
}

#notification_title {
	font-size: 2.2rem;
}

#notification_text {
	margin-top: 1.5rem;
}

#notification_close {
	width: 4rem;
	height: 4rem;
	cursor: pointer;
	padding: 1.3rem 0 0 0.5rem;
	position: absolute;
	top: 0;
	right: 0;
}

#notification_close svg {
	width: 45%;
	fill: #fff;
}


/** ////////////////////////////////////////////////////////////////////////////////////////// */
/** ///////////////////////////////////////////////////////////////////////  Media Queries  // */
/** ////////////////////////////////////////////////////////////////////////////////////////// */

/*? // NOTE: Relative Units in media queries are always based off the initial root value (16) and ignore declared values */
/*? // NOTE: So REM units must be based on 16px instead of the 10px declared for the HTML attribute */

@media all and (max-width: 1570px) {
	#editor {
		border-radius: 0;
		margin: 0;
		max-width: unset;
		width: 100%;
		min-height: calc(100vh - 5.5rem);
		padding: 3rem 4rem;
	}
}

@media all and (max-width: 1200px) {
	body {
		background-color: var(--background-content);
	}

	article {
		margin: 0;
		width: 100%;
	}
}

@media all and (max-width: 1100px) {
	section {
		width: 100%;
		padding: 2rem 3rem;
		margin: 0;
	}

	#tasks_list {
		grid-template-columns: 1fr;
	}

	#plants_list {
		grid-template-columns: 1fr;
	}

	#editor_grid {
		grid-template-columns: 1fr;
	}

	#editor_grid h1 {
		grid-column: unset;
		grid-row: unset;
	}

	#editor_form {
		grid-column: unset;
		grid-row: unset;
	}

	#editor_form {
		grid-column: unset;
		grid-row: unset;
	}

	#editor_save {
		grid-column: unset;
		grid-row: unset;
	}
}

@media all and (max-width: 850px) {
	#recipe {
		grid-template-columns: 1fr;
	}

	#editor {
		padding: 2rem;
	}

	article #plant_grid {
		grid-template-columns: 1fr;
		gap: 2rem;
	}
}

@media all and (max-width: 550px) {
	#search_results {
		left: 0;
		width: 100%;
	}

	#search.active {
		width: 10em;
	}

	article {
		padding: 2.5rem;
	}

	article h1 {
		font-size: 2.8rem;
	}
}

@media all and (max-width: 450px) {
	#editor {
		padding: 2rem 1rem;
	}
}

@media all and (max-width: 380px) {
	#fullscreen {
		display: none;
	}

	#task_date_range_start {
		margin-bottom: 5px;
	}
}
