html,
body {
	width: 100%;
	height: 100%;
}

body {
	background-color: #f4f4f4;

	color: #1c1c1c;

	font-family: "Raleway", sans-serif;

	margin: 0;

	display: grid;

	grid-template-areas: "header" "main" "footer";
	grid-gap: 24px;
	grid-template-rows: minmax(120px, 20%) minmax(auto, 50%) max-content;
}

@media screen and (max-width: 600px) {
	body {
		grid-gap: 12px;
	}
}

header {
	margin: auto 0;
	text-align: center;
}

header h1 {
	margin-top: 0;
	margin-bottom: 6px;

	font-weight: 800;
}

header h2 {
	margin-top: 6px;
	margin-bottom: 0;

	font-weight: 300;
}

main {
	position: relative;

	font-family: "Arial", sans-serif;
}

#start,
#end {
	width: 100%;
	height: 100%;

	display: none;
}

#start.active,
#end.active {
	display: unset;
}

#end .container {
	display: grid;

	grid-template-columns: auto auto;
	grid-gap: 24px;
}

@media screen and (max-width: 600px) {
	#end .container {
		grid-gap: 12px;
		grid-template-columns: 100%;
		grid-template-rows: auto auto;
	}
}

input[type="text"] {
	background: #FFF;

	width: 100%;

	font-family: unset;
	font-size: 12pt;

	outline: unset;

	padding: 4px 6px;

	-webkit-box-shadow: 0px 8px 10px 0px rgba(0, 0, 0, 0.22);
	box-shadow: 0px 8px 10px 0px rgba(0, 0, 0, 0.22);
	box-sizing: border-box;

	border-width: 0;
	border-radius: 6px;

	margin-top: 6px;
}

textarea {
	width: 100%;
	height: 100%;

	background: #FFF;

	font-family: unset;
	font-size: 13pt;

	outline: unset;

	padding: 40px;

	resize: none;

	-webkit-box-shadow: 0px 8px 10px 0px rgba(0, 0, 0, 0.22);
	box-shadow: 0px 8px 10px 0px rgba(0, 0, 0, 0.22);
	box-sizing: border-box;

	padding-left: 2em;
	padding-right: 2em;

	border-width: 0;
	border-radius: 10px;
}

textarea:read-only {
	color: rgba(0, 0, 0, .75);
}

#history {
	display: none;

	position: absolute;

	left: 0;
	top: 0;

	width: calc(25% - 24px);
	height: 100%;
}

#history.active {
	display: grid;
}

@media screen and (max-width: 600px) {
	#history.active {
		display: none;
	}
}

#history .footer {
	display: grid;

	grid-auto-flow: column;
}

#history .footer button {
	opacity: 0;
}

#history .footer button.active {
	opacity: unset;
}

.textarea {
	display: grid;

	grid-template-rows: auto 50px;
}

.textarea .characters {
	margin: auto;

	font-size: 13pt;
}

.textarea .characters.invalid {
	color: red;
}

.backward, .forward {
	background: unset;
	border: unset;
	outline: unset;

	cursor: pointer;
}

footer {
	padding-bottom: 24px;

	font-size: 14pt;
}

footer #finish {
	display: none;
}

footer #finish.active {
	display: inline-block;
}

footer b {
	font-size: 15pt;
}

footer p {
	margin: unset;

	font-size: 13pt;
}

footer p.share {
	margin-top: 24px;
}

footer a {
	color: #1c1c1c;
	text-decoration: none
}

footer a:hover {
	border-bottom: 1px solid #fff;
}

#cut {
	background-color: #4FB286;

	border-radius: 24px;
	border-width: 0;

	display: inline-block;

	cursor: pointer;

	color: #ffffff;

	font-size: 1.4em;

	padding: 9px 48px;

	text-decoration: none;
}

#finish {
	background-color: transparent;

	border-radius: 24px;
	border-width: 2px;
	border-color: #4FB286;

	display: inline-block;

	cursor: pointer;

	color: #ffffff;

	font-size: 1.4em;

	padding: 9px 48px;

	text-decoration: none;

	float: left;
}

.share {
	background-color: transparent;
	border-radius: 24px;
	border-width: 2px;
	border-color: #4FB286;
	display: inline-block;
	cursor: pointer;
	color: #ffffff;
	font-size: 1em;
	font-family: 'Raleway';
	padding: 10px 10px;
	text-decoration: none;
	float: left;
}

.right {
	float: right;
}

.container {
	height: 100%;
	width: 50%;

	margin: 0 auto;
}

@media screen and (max-width: 600px) {
	.container {
		width: 90%;
	}
}

.container.center {
	text-align: center;
}

.container #input {
	width: 100%;
	height: 100%;
}

textarea::-webkit-scrollbar {
	width: 8px;
}

textarea::-webkit-scrollbar-thumb {
	background: #E5E5E5;

	border-radius: 6px;
}

.start, .end {
	display: grid;

	grid-template-rows: max-content auto;
}

.start .header, .end .header {
	font-family: "Raleway", sans-serif;

	text-align: center;

	padding: 12px 0;
}

#feedback {
	display: none;
	position: absolute;
  right: 5%;
  bottom: 5%;
	color: black;
	font-size: 13pt;
	font-family: 'Raleway';
}

#feedback.active {
	display: block;
}

.overlay {
	position: fixed;

	display: flex;

	left: 0;
	top: 0;

	width: 100%;
	height: 100%;

	background: rgba(0, 0, 0, .33);
}

.overlay .overlay-container {
	margin: auto;

	min-width: 33%;
	min-height: 33%;
	background-color: #fff;
	padding: 2em;
	border-radius: 15px;
}

.overlay .overlay-header {
	display: grid;
	grid-template-columns: auto auto;
	grid-gap: 12px;
}

.overlay .overlay-message,
.overlay .overlay-header {
	margin-bottom: 24px;
}

.overlay button {
	background: white;
	color: black;
}

.overlay textarea {
	padding: 12px;
	border: 1px solid #000;
	min-height: 140px;
	height: 100%;
}

input.overlay-name, input.overlay-mail {
	border: 1px solid #000;
}
