
/* ==========================================================================
   Fonts
   ========================================================================== */

/* vollkorn-regular - latin */
@font-face {
	font-display: swap;
	font-family: Vollkorn;
	font-style: normal;
	font-weight: 400;
	src: url('../fonts/vollkorn-v30-latin-regular.woff2') format('woff2');
}

/* vollkorn-italic - latin */
@font-face {
	font-display: swap;
	font-family: Vollkorn;
	font-style: italic;
	font-weight: 400;
	src: url('../fonts/vollkorn-v30-latin-italic.woff2') format('woff2');
}

/* vollkorn-700 - latin */
@font-face {
	font-display: swap;
	font-family: Vollkorn;
	font-style: normal;
	font-weight: 700;
	src: url('../fonts/vollkorn-v30-latin-700.woff2') format('woff2');
}

/* vollkorn-700italic - latin */
@font-face {
	font-display: swap;
	font-family: Vollkorn;
	font-style: italic;
	font-weight: 700;
	src: url('../fonts/vollkorn-v30-latin-700italic.woff2') format('woff2');
}

/* ==========================================================================
   HTML Elements
   ========================================================================== */

html {
  box-sizing: border-box;
  font-size: 62.5%;
  }

body {
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  font-size: 1.4em;
  position: relative;
  width: 100%;
  place-content: start;
	line-height: 145%;
	font-family: Vollkorn, sans-serif;
	text-align: justify;
  }

h1 {
  font-size: 3rem;
	font-weight: 700;
	line-height: 145%;
  }

h2 {
	text-align: center;
	margin: 0;
}

header {
  order: 0;
  position: relative;
  width: 100%;
  z-index: 1;
}

div > nav {
	width: 100%;
}

footer {
  order: 3;
  height: 5.9rem;
  left: 0;
  top: 140rem;
  width: 100%;
}

fieldset > * {
	margin: 0.1rem;
}

a:hover {
	color: #005680;
}

button {
	border-radius: 0;
	padding-right: 5rem;
	padding-left: 5rem;
	border: 0.2rem solid black;
	color: white;
	background-color: #007cb7;
	font-weight: 700;
	text-align: center;
	cursor: pointer;
	max-width: 16rem;
}

button:hover {
	background-color : #005680
}

input {
	border-radius: 5px;
	padding-left: 0.5rem;
}

input[required] {
	border-left: 0.4rem solid #c82333;
	padding-left: 0.5rem;
}

input[required]:invalid {
	border-left: 0.4rem solid #c82333;
	padding-left: 0.5rem;
}

input[required]:valid {
	border-left: 0.4rem solid #218838;
	padding-left: 0.5rem;
}

input[id="birth-date"],
select[id="civil-status"],
input[id="submit"] {
	cursor: pointer;
}

input[id="birth-date"]:invalid,
select[id="civil-status"]:invalid,
select[id="civil-status"] option:disabled {
	border-left: 0.4rem solid #c82333;
	padding-left: 0.5rem;
}

input[id="birth-date"]:valid,
select[id="civil-status"]:valid {
	border-left: 0.4rem solid #218838;
	padding-left: 0.5rem;
}

input:focus,
textarea:focus {
	outline: 2px solid #007cb7;
}

/* ==========================================================================
   HTML Classes
   ========================================================================== */

.link-return {
  color: #007cb7;
  font-weight: 700;
  }

.info-box p {
	text-justify: inter-word;
}

.content-box {
  display: flex;
  width: 100%;
	max-width: 100rem;
  position: relative;
  padding: 2rem;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	margin-left: auto;
	margin-right: auto;
	box-sizing: border-box;
	gap: 2rem;
  }

.content-box > div {
	border: 1px solid #2e2e2e;
	border-radius: 5px;
	padding: 2rem;
	background-color: #f6f7f8;
}

.form {
	margin-top: 4rem;
  display: grid;
	width: 100%;
  grid-template-columns: 1fr 2fr 1fr 2fr;
  gap: 2rem;
  place-items:center left;
	box-sizing: border-box;
	max-width: 100%;
  }

.form > * {
	max-width: 100%;
	box-sizing: border-box;
	width: 100%;
	padding: 0;
}

.form > label,
.form-items-comment > label,
.form .form-items > label {
	color: #007cb7;
	font-weight: 700;
	justify-items: right;
	justify-self: right;
	text-align: right;
}

.form-box .clickable {
	justify-self: left;
	width: auto;
	display: flex;
}

.form-items-comment {
	grid-column: span 4;
	display: grid;
	grid-template-columns: 1fr 5fr;
	gap: 2rem;
	align-items: center;
}

.form-items-comment .input-comment-area {
	grid-column: 2 / 5;
	width: 100%;
	overflow: auto;
	line-height: 1.5;
	min-height: 10rem;
	height: auto;
	max-height: 30rem;
	resize: vertical;
	border-radius: 5px;
}

.form-items-button {
	place-self: center;
	grid-column: 1 / 5;
	margin-top: 2rem;
	width: 15rem;
	padding: 1rem;
}

.submit-button {
	padding: 1rem;
	width: 100%;
}

.choice {
	width: 100%;
	border: 0;
}

.choice > * {
	border: 0;
}

.input-address {
  width: 100%;
  flex-flow: column;
  display: flex;
	gap: 0.5rem;
  }

.input-npa {
  display: flex;
	width: 100%;
  flex-direction: row;
	gap: 0.5rem;
  }

.input-npa > * {
	width: 50%;
}

/* ==========================================================================
   Media Queries
   ========================================================================== */

/* =============================
   =========  Desktop  ========= */

@media (width >= 1000px ) {
	.form .form-items {
		box-sizing: border-box;
		grid-column: span 2;
		width: 100%;
		align-items: center;
		display: grid;
		grid-template-columns: 1fr 2fr;
		grid-template-rows: 1fr;
		gap: 2rem;
	}
	
	.form-items label {
		grid-column: 1 / 2;
	}

	.form-items input {
		grid-column: 2;
	}

	.input-bar {
		min-width: 100%;
	}
	
	.choice {
		align-items: center;
	}
	
}

/* ================================
   ===========  Tablet  =========== */

@media (width >= 769px) and (width <= 999px) {
	body {
		height: 100rem;
	}
	
	.content-box {
		width: 100%;
	}
	
	.form .form-items > label,
	.form .form-items-comment > label{
		color: #007cb7;
		font-weight: 700;
		text-align: left;
		padding: 0;
	}
	
	.form-box {
		width: 100%;
	}

	.form {
		grid-template-columns: repeat(2, 1fr);
		align-items: start;
		width: 100%;
	}
	
	.form-items {
		display: flex;
		flex-flow: row;
		flex-direction: column;
		width: 100%;
		text-align: left;
	}

	.form-items .input-address {
		justify-self: left;
		justify-items: left;
		text-align: left;
	}

	.form-items-comment {
		grid-column: 1 / 3;
		width: 100%;
	}
	
	.form-items-button {
		place-self: center;
		grid-column: span 2;
		margin-top: 0;
		width: auto;
		padding: 1rem;
		justify-self: center;
		justify-items: center;
		justify-content: space-around;
		}

	.submit-button {
		margin-top: 0;
	}
}

/* ================================
   ======  Landscape phone  ======= */

@media (width >= 481px) and (width <= 768px) {
	body {
		height: 100rem;
	}
	
	.content-box {
		width: 100%;
	}

	.form .form-items > label,
	.form .form-items-comment > label{
		color: #007cb7;
		font-weight: 700;
		text-align: left;
		justify-self: left;
		padding: 0;
		overflow: clip;
	}

	.form-box {
		width: 100%;
	}

	.form {
		grid-template-columns: repeat(1, 1fr);
		align-items: start;
		width: 100%;
	}

	.form-items {
		display: grid;
		grid-template-columns: 50% 50%;
		width: 100%;
		text-align: left;
	}

	.form-items .input-address {
		justify-self: left;
		justify-items: left;
		text-align: left;
	}
	
	.form-items-comment {
		grid-column: 1 ;
		width: 100%;
	}

	.form-items-button {
		place-self: center;
		margin-top: 0;
		width: auto;
		padding: 1rem;
		grid-column: span 1;
		justify-self: center;
		justify-items: center;
		justify-content: space-around;
	}

	.submit-button {
		margin-top: 0;
	}
	
	.choice,
	.choice > *{
		padding: 0;
		align-items: center;
		margin: 0;
		gap: 0;
		width: auto;
	}
	
}

/* ============================
   =======  Smartphone  ======= */

@media (width <= 480px) {
	input {
		width: 100%
	}
	
	.content-box {
		width: 100%;
	}
	
	.form > label,
	.form-items-comment > label{
		color: #007cb7;
		font-weight: 700;
		justify-items: left;
		justify-self: left;
		text-align: left;
	}

	.form-box {
		width: 100%;
		padding: 0;
		margin: 0;
	}

	.form {
		padding: 0;
		grid-template-columns:  repeat(1, 1fr);
		grid-template-rows: 1fr;
		grid-auto-flow: row;
		text-align: left;
	}

	.link-return {
		color: #007cb7;
		font-weight: 700;
	}

	.content-box > div {
		border: 1px solid #d6d8db;
		border-radius: 5px;
		padding: 2rem;
		background-color: #f6f7f8;
	}
	
	.form > * {
		max-width: 100%;
		box-sizing: border-box;
		width: 100%;
		padding: 0;
	}

	.form-box .clickable {
		justify-self: left;
		width: auto;
		display: flex;
	}
	
	.form-items-comment {
		grid-column: 1 / 1;
		display: grid;
		grid-auto-flow: row;
		grid-template-columns: 1fr;
		gap: 0;
	}
	
	.form-items-comment .input-comment-area {
		grid-column: 1 / 2;
		height: auto;
		border-radius: 5px;
	}
	
	.form-items-button {
		place-self: center;
		grid-column: span 1;
		margin-top: 0;
		width: auto;
		padding: 1rem;
	}

	.submit-button {
		margin-top: 0;
		padding: 0.5rem;
		width: 12rem;
	}
	
	.input-bar {
		min-width: 100%;
	}
	
	.input-address {
		width: 100%;
		flex-flow: column;
		display: flex;
		grid-column: 1;
		gap: 0.5rem;
	}
	
	.input-npa {
		display: flex;
		width: 100%;
		flex-direction: row;
		gap: 0.5rem;
	}
	
	.input-npa > * {
		width: 50%;
	}
	
	.choice {
		display: grid;
		grid-template-columns: auto 1fr;
		grid-template-rows: repeat(1, 1fr);
		grid-auto-flow: column;
		align-items: center;
		width: 100%;
		padding: 0;
		gap: 0;
		border: 0;
	}
	
	.choice label {
		grid-column: 2 / 2;
		margin-left: 1rem;
	}
	
	.choice input {
		grid-column-start: 1;
	}
	
	.choice > * {
		border: 0;
	}
	
}
