@font-face {
	font-family: "Oswald";
	src: url("/fonts/Oswald.ttf");
}
@font-face {
	font-family: "Open Sans";
	src: url("/fonts/OpenSans.ttf");
}
@font-face {
	font-family: "Photograph Signature";
	src: url("/fonts/Photograph_Signature.ttf");
}

* {
	box-sizing: border-box;
}

body {
	margin: 0;
	background: #192933;
	color: #fff;
	width: 100%;
	text-align: center;

	display: flex;
	justify-content: center;
}

div.wrapper {
	position: relative;
	margin: 50px auto;
	opacity: 1;

	@media screen and (max-width: 800px) {
		margin: 20px auto;
	}
}

.page-title {
	text-align: left;
	width: 100%;
	font-family: "Oswald";
	font-weight: 100;
	font-size: 45px;
	text-decoration: none;
	margin: 0;
	@media screen and (max-width: 800px) {
		font-size: 35px;
		margin-bottom: 20px;
		margin-left: 20px;
	}
}

div.main {
	position: relative;
	width: 800px;
	max-width: 100vw;
	background: #fff;
	padding: 50px;
	color: #333;
	text-align: left;
	font-family: "Open Sans";
	border-radius: 15px;

	@media screen and (max-width: 800px) {
		padding: 20px;
	}
}

h1,
h2,
h3,
h4 {
	font-family: "Oswald";
	font-weight: 100;
	margin: 0;
}
h1 {
	font-size: 45px;
	font-weight: 400;
	text-decoration: underline;
	text-align: center;
}
h2 {
	font-size: 30px;
	font-weight: 300;
	text-decoration: underline;
	margin-bottom: 10px;
}

.logo-generator {
	background: #eee;
	border-radius: 10px;
	margin: 20px 0;
	width: 100%;
	display: flex;
	flex-wrap: nowrap;

	.preview {
		padding: 25px 15px;
		height: 180px;
		flex-grow: 1;
		width: auto;
		svg {
			max-width: 100%;
			max-height: 100%;
		}
	}
	.controls {
		padding: 12px;
		width: 200px;
		flex-shrink: 0;
		display: flex;
		flex-direction: column;
		align-items: top;
		.color-control {
			display: block;
			margin: 6px 0;
		}
		input.jscolor {
			padding: 5px;
			font-family: "Open Sans";
			font-size: 17px;
			border: solid 1px #555;
			outline: none;
			border-radius: 50px;
			width: 100%;
			&:focus {
				outline: solid 2px #1583bd;
			}
		}
		.downloads {
			width: 100%;
			display: flex;
			flex-wrap: nowrap;
			margin: 3px 0;
			margin-top: auto;
			align-self: flex-end;
		}
		button.download-btn {
			padding: 5px;
			font-family: "Open Sans";
			font-size: 17px;
			border: solid 1px #555;
			outline: none;
			border-radius: 50px;
			width: 50%;
			margin: 0 2px;
		}

		@media only screen and (max-width: 660px) {
			width: 160px;
			input.jscolor {
				font-size: 15px;
			}
			button.download-btn {
				font-size: 15px;
			}
		}
	}
}

.logo-section {
	display: flex;
	flex-wrap: nowrap;

	.logo-generator {
		width: 60%;
		.controls {
			width: 160px;
			input.jscolor {
				font-size: 15px;
			}
			button.download-btn {
				font-size: 15px;
			}
		}
	}
	.two-colors {
		margin-left: 20px;
		flex-grow: 1;
		display: flex;
		flex-direction: column;
		justify-content: center;
	}

	@media only screen and (max-width: 660px) {
		flex-wrap: wrap;
		margin-top: 40px;
		.logo-generator,
		.two-colors {
			width: 100%;
			margin: 10px 0;
		}
	}
}

.color-swatch {
	height: 75px;
	margin: 6px 0;
	display: flex;
	flex-wrap: nowrap;

	.color-block {
		height: 100%;
		aspect-ratio: 1/1;
		border-radius: 10px;

		display: flex;
		flex-direction: column;
		overflow: hidden;

		button {
			opacity: 0;
			flex-grow: 1;
			margin: 0;
			border: none;
			outline: none;
			background: none;
			border-radius: 10px;

			color: #fff;
			font-family: "Open Sans";
			font-weight: 400;
			font-size: 16px;
			font-stretch: 50%;
			cursor: pointer;

			&:hover {
				background: #0002;
			}
			&:active {
				background: #0004;
			}
		}
	}
	.color-values {
		display: flex;
		flex-direction: column;
		justify-content: center;
		margin-left: 13px;
		p {
			margin: 0;
			text-transform: uppercase;
		}
	}

	&:hover {
		.color-block button {
			opacity: 1;
		}
	}

	&.large {
		width: 50%;
		height: 100px;
		.color-block button {
			font-size: 20px;
		}
		.color-values {
			margin-left: 20px;
		}
		.color-values p {
			font-size: 16px;
		}
		@media only screen and (max-width: 660px) {
			width: 100%;
		}
	}
}

.colors-grid {
	display: flex;
	flex-wrap: nowrap;
	justify-content: space-between;
	@media only screen and (max-width: 660px) {
		flex-wrap: wrap;
		justify-content: left;
	}
}

.quick-colors {
	position: absolute;
	top: 0;
	right: 100%;
	padding: 20px;
	padding-top: 0;

	@media screen and (max-width: 1100px) {
		display: none;
	}

	a.quick-color {
		display: block;
		width: 30px;
		aspect-ratio: 1/1;
		border-radius: 50%;
		margin: 20px 0;
		border: solid 2px #fff;
		position: relative;
		text-decoration: none;

		div {
			position: absolute;
			right: calc(100% + 15px);
			top: 50%;
			transform: translateY(-50%);

			pointer-events: none;
			transition: opacity 0.2s;
			opacity: 0;

			min-width: 140px;

			display: inline-block;
			background: #0003;
			padding: 6px 15px;
			z-index: 5;
			text-align: center;
			border-radius: 5px;

			font-family: "Open Sans";
			font-weight: 100;

			h3.hex {
				font-family: "Open Sans";
				margin: 0;
				color: #fff;
				font-size: 20px;
				width: 100%;
			}
			span {
				font-size: 14px;
				color: #fff;
				margin: 0;
				width: 100%;
			}
		}
		&:hover {
			outline: solid 2px #7afa;
			div {
				opacity: 1;
				pointer-events: all;
			}
		}
		&:active {
			opacity: 0.7;
		}
	}
}

.font-list {
	display: flex;
	flex-wrap: nowrap;
	justify-content: space-between;

	.font {
		width: 30%;
		text-align: center;
		h2 {
			text-decoration: none;
			margin-bottom: 0;
			height: 45px;
			display: block;
			@media only screen and (max-width: 660px) {
				font-size: 20px;
				height: auto;
			}
		}
		a.view-link {
			color: #000;
			text-decoration: underline;
			font-style: italic;
			margin-top: 0;
		}
		div.spacer {
			display: block;
			width: 100%;
			flex-grow: 1;
		}
		a.download-button {
			display: inline-block;
			margin-top: 20px;
			padding: 10px 15px;
			border-radius: 10px;

			background: #eee;
			color: #333;

			text-decoration: none;

			&:hover {
				background: #e5e5e5;
			}
			&:active {
				background: #ddd;
			}
		}
	}
}
