@charset "utf-8";

@import url('https://fonts.googleapis.com/css?family=Poppins:200,400,500,600&display=swap');
@import url('https://fonts.googleapis.com/css?family=Lato:300,400,700&display=swap');

html {
  margin: 0;
  padding: 0;
  height: 100%;
}

body {
	display: flex;
  justify-content: center;
  align-items: center;
	height: 100%;
	background-origin: border-box;
  background-image: url(../img/background.jpg);
	background-position: center center;
	background-repeat: no-repeat;
  background-size: cover;
  background-clip: border-box;
	color: #223951;
	font-family: 'Lato', sans-serif;
	font-weight: 400;
	font-size: 1em;
}
.wrapper {
	max-width: 960px;
	margin-right: auto;
  margin-left:  auto;
  padding-right: 10px;
  padding-left:  10px;
}
.flex-container {
  display: flex;
  justify-content: center;
  align-items: center;
  max-height: 960px;
  margin-bottom: 2em;
  padding-bottom: 2em;
  overflow: hidden;
}

#calculator {
  display: block;
  max-width: 360px;
  margin: 2em auto 0 auto;
  padding: 2em 2.5em;
  background-image: url(../img/paper-pattern.jpg);
  background-position: center center;
  background-size: cover;
  background-clip: border-box;
  background-repeat: no-repeat;
  box-shadow: 0 10px 15px -8px #000;
  -webkit-border-radius: 8px;
  -moz-border-radius: 8px;
  border-radius: 8px;
  -webkit-box-sizing: content-box;
  -moz-box-sizing: content-box;
  box-sizing: content-box;
}


form   {
  text-align: left;
  margin-top: 16px;
}

h1  {
	font-family: 'Poppins', sans-serif;
	font-size: 1.572rem;
	font-weight: 600;
	text-transform: uppercase;
	margin: 0;
	padding: 0 0 20px;
  text-align: center;
}

.divider-line {
	display: block;
	width: 100%;
	height: 2px;
	background-color: rgba(34,57,81,0.6);
	margin: -18px auto 0 auto;
	padding:0;
}
form {
  	display: flex;
		flex-direction: column;
		justify-content: center;
		align-items: center;
		max-width: 350px;
	}

form label {
  display: block;
  margin: 25px 0;
  font-weight: bold;
  width: 100%;
  font-size: 1.2rem;
}

form input,
form #serviceQuality {
  padding: 8px;
  margin: 10px 0;
	box-sizing: border-box;
	border: 2px solid #d2d7dc;
  border-radius: 4px;
}

form input[type="text"] {
   text-align: left;
}

input::placeholder {
	opacity: 0.45;
}

input[type="button"] {
	margin-bottom: 3px;
	padding-bottom: 5px;
	
} 

input[type=text]:focus {
  border: 2px solid #223951;
}

#serviceQuality:focus {
	 border: 2px solid #223951;
}

button {
	font-family: 'Poppins', sans-serif;
	background: #223951;
  color: #fff;
  border: none;
  text-transform: uppercase;
  font-size: 1.2rem;
  padding: 10px 15px;
	border-radius: 5px;
	box-shadow: 0px 5px 10px rgba(0,0,0,0.10), 0 5px 35px rgba(0,0,0,0.10);
	max-width: 135px;
}

button:hover {
  background: #f9f9f9;
  color: #223951;
  border-bottom: 1px solid rgba(34,57,81,0.53);
  border-top: 1px solid #e5e5e5;
	border-right: 1px solid #e5e5e5;
	border-left: 1px solid  #e5e5e5;
  box-shadow: 0px 5px 25px rgba(0,0,0,0.15), 0 5px 35px rgba(0,0,0,0.15);
  font-weight: 600;
}

button:active {
    position: relative;
    top: 1px;
}

#totalTip {
	
  margin-top: 30px;
	text-align: center;
}

#totalTip:before {
	content: "Tip amount";
	font-family: 'Poppins', sans-serif;
	font-size: 2.5rem;
	font-weight: 600;
	display: block;
	text-transform: uppercase;
	padding-top: 14px;
	border-top: 1px dashed #223951;
}

#totalTip sup {
	font-family: 'Poppins', sans-serif;
  font-size: 1.3rem;
	font-weight: normal;
}

#totalTip #each {
	font-size: 1.3rem;
	font-family: 'Poppins', sans-serif;
	font-weight: 500;
}

#totalTip #tip {
	font-size: 2.25rem;
	text-align: center;
}

#totalTip:after {
	content: "";
	display: block;
	border-bottom: 1px dashed #223951;
	padding-bottom: 14px;
}

footer {
	position: fixed;
	left: 0;
	bottom: 0;
	width: 100%;
	min-height:24px;
	background: #223951;
	margin: 0;
	padding: 0;
	font-size: 13px;
	font-family: 'Poppins', sans-serif;
	color: #f1f1f1;
	font-weight: 400;
	text-align: center;
	overflow: hidden;
	text-shadow: 1px 0px 1px rgba(0,0,0,0.3); 
}

footer div p a {
	font-family: 'Poppins', sans-serif;
	font-weight: 400;
	font-size: 13px;
	color: #F1F1F1;
	text-decoration: none;
}


@media screen and (min-width: 768px) and (max-width: 980px) { 
	.flex-container {
		display: flex;
		align-items: stretch;
		
	}
	.wrapper {
		display: block;
		max-width: 980px;
		margin-right: auto;
  	margin-left:  auto;
	}
	h1 {
		font-size: 2.572rem;
	}
	#calculator {
		min-width: 450px;
		max-width: 575px;
	}
	form {
  	display: flex;
		flex-direction: column;
		justify-content: center;
		align-items: center;
		max-width: 550px;
	}
	
	form input[type="text"], #serviceQuality {
		min-width: 425px;
 		max-width: 525px;
	}
}

@media screen and (min-width: 1024px) {
	.flex-container {
		display: flex;
		align-items: stretch;
	}
	.wrapper {
		max-width: 1200px;
	}
	h1 {
		font-size: 3rem;
	}
	#calculator {
		min-width: 550px;
		max-width: 700px;
	}
	form {
		display: flex;
		flex-direction: column;
		justify-content: center;
		align-items: center;
		max-width: 650px;
	}
	
	form input[type="text"], #serviceQuality {
		min-width: 475px;
 		max-width: 625px;
	}
	button {
  display: flex;	
		flex-direction: row;
		justify-content: center;
		align-items: center;
	}
}
