@import "_reset.css";

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

@import "_header.css";
@import "_view-recipe.css";
@import "_view-collection.css";
@import "_add-edit.css";
@import "_delete.css";
@import "_login.css";
@import "_add-collection.css";
@import "_settings.css";



body {
	font-size: 1em;
	font-family: "Open Sans", sans-serif;
	font-optical-sizing: auto;
	font-weight: 300;
	font-style: normal;
	background-color: #fafaff;
	color: #1c1c1c;
	position: relative;
}

a {
	color: #000;
	text-decoration: underline;
}

label {
	display: block;
	margin-bottom: 4px;
	font-weight: 500;
}
input[type="text"], input[type="email"], input[type="password"], textarea {
	width: 100%;
	border-radius: 4px;
	-webkit-appearance: none;
	-moz-appearance: none;
	appearance: none;  
	padding: 12px;
	box-sizing: border-box;
	font-size: 1.1em;
	border: 1px solid #d6d8d9;
}
textarea{
	height: 200px;
	resize: none;
	font-family: inherit;
	font-weight: normal;
	font-style: normal;
	font-variant: normal;
}
select{
	-webkit-appearance: none;
  	appearance: none;
}

.error {
	background-color: #D22B2B;
	color: #fff;
	padding: 12px;
	box-sizing: border-box;
	margin-top: 24px;
	border-radius: 4px;
	font-weight: 400;
	ul {
		margin-top: 8px;
	}
}

.button{
	padding: 12px 16px;
	box-sizing: border-box;
	font-size: 1.1em;
	line-height: 1.2em;
	display: block;
	border-radius: 4px;
	text-align: center;
	text-decoration: none;
	font-weight: 400;
	-webkit-appearance: none;
	-moz-appearance: none;
	appearance: none;
	
	&:hover{
		cursor: pointer;
	}

	&.grey {
		border: 1px solid #ccc;
		color: #000;
		background-color: #f8f8f8;
		&:hover {
			background-color: #eee;
		}
	}
	&.green {
		background-color: #3EBB75;
		border: 1px solid #38a869;
		color: #fff;
		&:hover {
			background-color: #38a869;
		}
	}
	&.red {
		background-color: #de4035;
		border: 1px solid #de4035;
		color: #fff;
		&:hover {
			background-color: #f2441d;
		}
	}

}

.content {
	width: 100%;
	max-width: 1200px;
	margin: 0 auto;
	box-sizing: border-box;
	padding: 0 12px 24px;

	&#view-recipe{
		padding: 0 0 24px !important;
	}

	.back-link{
		display: none;
	}
	
	.topbar {
		margin: 16px 0 24px;

		h2 {
			font-size: 1.8em;
			font-weight: 500;
		}

		.add-collection {
			float: right;
		}

		.add-button {
			display: block;
			margin: 24px 0 24px 0;
		}

	}

	.filter-bar {
		margin: 24px 0 16px;
		display: block;

		.search-container {
			border-radius: 4px;
			width: 100%;
			padding: 0 12px 0 40px;
			box-sizing: border-box;
			border: 1px solid #d6d8d9;
			background: #fff url(../images/search.svg) 8px center no-repeat;
			background-size: 20px;
			position: relative;
			input {
				-webkit-appearance: none;
				-moz-appearance: none;
				appearance: none;  
				font-size: 1.1em;
				padding: 0;
				border-radius: 0;
				border: 0;
				height: 44px;
			}
			.clear-results {
				width: 44px;
				height: 44px;
				text-indent: -9999px;
				position: absolute;
				top: 0;
				right: 0;
				bottom: 0;
				background: transparent url(../images/close.svg) center center no-repeat;
			}
		}

		.right {
			margin-top: 12px;
			/*#sort-select {
				vertical-align: top;
				display: inline-block;
				height: 44px;
				width: 182px;
				border: 1px solid #d6d8d9;
				padding: 10px;
				border-radius: 4px;
				font-size: 1.1em;
			}*/

			.recipe-sort {
				vertical-align: top;
				display: inline-block;
				width: 200px;
				height: 44px;
				border: 1px solid #d6d8d9;
				box-sizing: border-box;
				padding: 0 12px 0 12px;
				border-radius: 4px;
				position: relative;
				background-color: #fff;
				&:hover{
					cursor: pointer;
				}
				.sort-arrow{
					display: block;
					background: #fff url(../images/chevron-down.svg) right center no-repeat;
					background-size: 24px;
					height: 24px;
					width: 24px;
					position: absolute;
					right: 8px;
					top: 10px;
				}
				select {
					border: none;
					background: transparent;
					font-size: 1.1em;
					position: absolute;
					top: 0;
					right: 12px;
					bottom: 0;
					left: 12px;
					z-index: 100;
				}
			}

			.layout-switch {
				display: inline-block;
				vertical-align: top;
				margin-left: 12px;

				a {
					height: 44px;
					width: 44px;
					display: inline-block;
					text-indent: -9999px;
					border-radius: 4px;
					border: 1px solid #d6d8d9;
					&.active{
						background-color: #eee;
					}
				}
				.show-grid {
					background: transparent url(../images/layout-grid.svg) center center no-repeat;
					background-size: 44px;
					margin-right: 12px;
				}
				.show-rows {
					background: transparent url(../images/layout-rows.svg) center center no-repeat;
					background-size: 32px;
				}
			}
		}

	}

	@media screen and (min-width: 431px) {

		padding: 0 16px 0;

		&#view-recipe{
			padding: 0 !important;
		}

		.back-link{
			display: block;
			margin: 0 0 24px;
			font-size: 1.3em;
			font-weight: 400;
			padding-left: 20px;
			background: transparent url(../images/chevron-left.svg) left center no-repeat;
			background-size: 20px 20px;
		}


		.topbar {
			
			position: relative;
			min-height: 44px;

			h2 {
				font-size: 2em;
				padding-top: 8px;
			}

			.add-button {
				position: absolute;
				top: 0;
				right: 0;
				margin: 0;
				height: 44px;
			}

		}

		.filter-bar {

			height: 44px;
			position: relative;

			.search-container {
				border-radius: 4px;
				width: 300px;
			}

			.right {
				position: absolute;
				top: 0;
				right: 0;
				margin-top: 0;
			}

		}

	}
}

.list{

	.empty {
		margin-top: 24px;
		box-sizing: border-box;
		width: 100% !important;

		div {
			text-align: center;
			background-color: #fff;
			border-radius: 4px;
			box-shadow: 0px 0px 2px rgba(0,0,0,0.2);
			padding: 24px 12px;
			box-sizing: border-box;
			h3 {
				font-weight: 500;
				font-size: 1.6em;
				margin-bottom: 8px;
			}
			p{ 
				font-size: 1.1em;
			}
			a {
				display: block;
				font-size: 1.1em;
				width: 200px;
				margin: 16px auto 0;
			}
		}
	}

	ul {
		display: grid;

		li {
			height: auto;
			box-sizing: border-box;
			.card {
				display: block;
				height: 100%;
				background-color: #fff;
				overflow: hidden;
				box-shadow: 0px 0px 2px rgba(0,0,0,0.2);
				position: relative;
				text-decoration: none;
				.top {
					position: relative;
					.remove-plan {
						display: block;
						height: 44px;
						width: 44px;
						border-radius: 4px;
						position: absolute;
						top: 16px;
						right: 16px;
						background: transparent url(../images/remove-collection.svg) top center no-repeat;
						background-size: 32px;
						text-indent: -9999px;
					}
					.image {
						background-position: center center;
						background-repeat: no-repeat;
						background-size: cover;
						position: relative;
						background-color: #BBD2C5;
					}
					.details{
						display: inline-block;
						padding: 12px;
						box-sizing: border-box;
						a {
							text-decoration: none;
							color: #000;
						}
						h3 {
							font-size: 1.125em;
							line-height: 1.2em;
							font-weight: 500;
							margin-bottom: 4px;
							overflow: hidden;
							text-overflow: ellipsis;
							display: -webkit-box;
							-webkit-line-clamp: 2;
							-webkit-box-orient: vertical;
						}
						.notes {
							font-size: 1em;
							line-height: 1.2em;
							margin-bottom: 8px;
							overflow: hidden;
							text-overflow: ellipsis;
							display: -webkit-box;
							-webkit-line-clamp: 1;
							-webkit-box-orient: vertical;
						}
						.meta, .source {
							color: #888;
							margin-bottom: 4px;
							font-size: 1em;
							line-height: 1.3em;
							overflow: hidden;
							text-overflow: ellipsis;
							display: -webkit-box;
							-webkit-line-clamp: 1;
							-webkit-box-orient: vertical;
							strong {
								font-weight: 400;
							}
						}
						.source {
							overflow: hidden;
							text-overflow: ellipsis;
							display: -webkit-box;
							-webkit-line-clamp: 1;
							-webkit-box-orient: vertical;
							
						}
					}
				}
			}

		}

		&.rows{
			grid-template-columns: repeat(1, 1fr);
			grid-column-gap: 0;
			grid-row-gap: 0;
			li {
				.card {
					.top {
						box-sizing: border-box;
						display: flex;
						padding: 12px;
						.image {
							display: block;
							width: 124px;
							height: 72px;
							border-radius: 4px;
						}
						.details{
							padding: 0 12px;
							display: block;
							width: 100%;
							h3 {
								padding-right: 52px;
							}
							.source{
								display: none;
							}
						}
					}
					.bottom {
						.actions {
							a {
								&.go {
									float: right;
								}
							}
						}
					}
				}

				

			}
		}

		&.grid{
			grid-template-columns: repeat(2, 1fr);
			grid-column-gap: 16px;
			grid-row-gap: 16px;
			li{
				.card {
					border-radius: 4px;
					.top {
						.remove-plan {
							background-color: #fff;
							background-position: center center;
							
						}
						.image {
							display: block;
							width: 100%;
							height: 100px;
						}
						.details{
							.meta, .source, .notes {
								display: none;
							}
						}
					}
					.bottom {
						.actions{
							a {
								text-indent: -9999px;
								width: 25%;
								margin-left: -4px;
								background-position: center center;
								&.go {
									border: none;
								}
							}
						}
					}

				}

				
			}
		}

		&.collections{
			grid-template-columns: repeat(1, 1fr);
			grid-column-gap: 0;
			grid-row-gap: 0;
			li {
				.card {
					padding-bottom: 0;
					.details{
						width: 100%;
						h3 {
							width: 100%;
							a{ display:block; }
						}
						.notes {
							font-size: 1.2em;
							line-height: 1.3em;
							margin: 4px 0 8px;
						}
						.meta {
							margin: 0;
						}
					}
				}

			}
		}
		
	}

	@media screen and (min-width: 431px) {
		ul{
			padding-bottom: 24px;
			li{
				.card{
					
					.top{
						.details{
							h3 {
								font-size: 1.4em;
								line-height: 1.2em;
								margin-bottom: 8px;
							}
							.notes {
								font-size: 1.125em;
								line-height: 1.2em;
								margin-bottom: 12px;
							}
							.meta, .source {
								font-size: 1em;
								line-height: 1.2em;
							}
						}
					}
				}
			}
			&.rows{
				grid-column-gap: 0;
				grid-row-gap: 16px;
				li {
					.card{
						.top{
							.image{
								width: 200px;
								height: 124px;
							}
							.details{
								.source {
									display: block;
								}
							}
						}
					}
				}
			}
			&.grid{
				li {
					.card{
						.top{
							.image{
								height: 140px;
							}
							.details{
								.meta, .source, .notes {
									display: block;
								}
							}
						}
					}
				}
			}
			&.collections{
				grid-row-gap: 16px;
			}
		}
	}

	@media screen and (min-width: 1025px) {
		ul{
			&.grid{
				grid-template-columns: repeat(3, 1fr);
				grid-column-gap: 16px;
				grid-row-gap: 16px;
				li {
				}
			}
		}
	}
}

/* Standard Button Layout */
.actions {
	display: block;
	margin: 0 auto;
	display: flex;
	flex-direction: column-reverse;

	p {
		display: block;
		margin-bottom: 24px;
		a, input {
			width: 100%;
			display: block;
		}
	}

	@media screen and (min-width: 431px) {
		width: 80%;
		flex-direction: row;
		p {
			display: inline-block;
			width: 50%;
			padding: 0 24px;
			box-sizing: border-box;
			margin-bottom: 0;
		}
	}
}

#home{
	position: fixed;
	top: 0;
	right: 0;
	bottom: 0;
	left: 0;
	background: #fff url(../images/a.jpg) right bottom no-repeat;
	background-size: cover;
	.intro{
		position: absolute;
		right: auto !important;
		left: 400px;
		bottom: auto !important;
		top: 50% !important;
		transform: translate(-50%, -50%) !important;
		h1{
			font-size: 4em;
			color: #fff;
			font-weight: 600;
		}
		h2 {
			font-size: 2.5em;
			color: #fff;
			font-weight: 500;
			margin-top: 32px;
		}
	}
}











