/* http://meyerweb.com/eric/tools/css/reset/ 
   v2.0 | 20110126
   License: none (public domain)
*/

html,
body,
div,
span,
applet,
object,
iframe,
h1,
h2,
h3,
h4,
h5,
h6,
p,
blockquote,
pre,
a,
abbr,
acronym,
address,
big,
cite,
code,
del,
dfn,
em,
img,
ins,
kbd,
q,
s,
samp,
small,
strike,
strong,
sub,
sup,
tt,
var,
b,
u,
i,
center,
dl,
dt,
dd,
ol,
ul,
li,
fieldset,
form,
label,
legend,
table,
caption,
tbody,
tfoot,
thead,
tr,
th,
td,
article,
aside,
canvas,
details,
embed,
figure,
figcaption,
footer,
header,
hgroup,
menu,
nav,
output,
ruby,
section,
summary,
time,
mark,
audio,
video {
  margin: 0;
  padding: 0;
  border: 0;
  font-size: 100%;
  font: inherit;
  vertical-align: baseline;
}
/* HTML5 display-role reset for older browsers */
article,
aside,
details,
figcaption,
figure,
footer,
header,
hgroup,
menu,
nav,
section {
  display: block;
}
body {
  line-height: 1;
}
ol,
ul {
  list-style: none;
}
blockquote,
q {
  quotes: none;
}
blockquote:before,
blockquote:after,
q:before,
q:after {
  content: "";
  content: none;
}
table {
  border-collapse: collapse;
  border-spacing: 0;
}

@font-face {
  font-family: "Poppins-Regular";
  src: url("fonts/Poppins-Regular.ttf");
}

@font-face {
  font-family: "Poppins-ExtraBold";
  src: url("fonts/Poppins-ExtraBoldItalic.ttf");
}

html {
  font-family: "Poppins-Regular", sans-serif;
}

body {
  background-color: #f0f0f0;
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  flex-direction: column;
  font-size: 32px;
}

.attribution {
  position: fixed;
  bottom: 10px;
  font-size: 1rem;
}

.panel {
  background-color: white;
  width: 100%;
  max-width: 30em;
  border: 1px solid rgb(236, 236, 236);
  border-radius: 2rem 2rem 10rem 2rem;
}

.calculator {
  font-size: 15px;
  text-transform: uppercase;
  padding: 2em;
  display: flex;
  justify-content: flex-start;
  font-size: 32px;
  box-sizing: border-box;
}

.inputs {
  display: flex;
  width: 100%;
  flex-shrink: 1;
}

.input {
  width: 10rem;
  min-width: 1rem;
  margin-right: 40px;
}

label {
  display: block;
  letter-spacing: 3px;
  color: hsl(0, 1%, 44%);
  margin: 0.7em 0;
  font-weight: 600;
  font-size: 0.5em;
}

.calc-input {
  font-weight: 800;
  width: 100%;
  height: 4rem;
  border: 2px solid lightgray;
  border-radius: 10px;
  font-size: 1em;
  text-indent: 0.7em;
}

.calc-input:focus {
  outline: none;
  border-color: hsl(259, 100%, 65%);
}

.calc-btn {
  display: flex;
  justify-content: flex-end;
}

.inputs,
.calc-btn {
  padding-bottom: 1.5em;
  border-bottom: 2px solid lightgray;
}

button {
  border-radius: 50%;
  padding: 2em;
  border: 0;
  height: fit-content;
  background-color: hsl(259, 100%, 65%);
  position: relative;
  top: calc(50% + 3rem);
}

button:hover {
  background-color: black;
  cursor: pointer;
}
img {
  width: 4rem;
}

/*------------------------------------*/

.output {
  border: 0;
  font-family: "Poppins-ExtraBold";
  color: hsl(259, 100%, 65%);
  font-size: 1em;
}

.output-panel {
  padding-bottom: 2em;
}

p {
  font-family: "Poppins-ExtraBold";
  padding: 0 0.6em;
  font-size: 6rem;
  display: flex;
  align-items: center;
}

/* ------------------------------------ */

@media (max-width: 360px) {
  .body {
    font-size: 16px;
  }

  .panel {
    width: 90%;
    border-radius: 2rem 2rem 6rem 2rem;
  }

  .calculator {
    padding: 2.5rem 1rem;
    justify-content: center;
    flex-wrap: wrap;
    padding-bottom: 0;
  }

  .inputs {
    width: 100%;
    padding-bottom: 3.5rem;
    justify-content: space-evenly;
  }

  .calc-btn {
    border: none;
    padding-bottom: 0;
  }

  button {
    padding: 1rem;
    top: -50%;
  }
  img {
    width: 1.5rem;
    height: 1.5rem;
  }

  .input {
    margin-right: 1em;
    font-size: 1.2rem;
  }

  .calc-input {
    width: 5rem;
    height: 3rem;
  }

  .input:last-child {
    margin-right: 0;
  }

  p {
    font-size: 1.5em;
  }

  .output-panel {
    padding-bottom: 3rem;
  }
}

.invalid-input {
  border: 1px solid hsl(0, 100%, 67%);
}

.invalid-label {
  color: hsl(0, 100%, 67%);
}

.error-msg {
  padding: 0;
  margin-top: 1rem;
  font-family: "Poppins-Regular";
  color: hsl(0, 100%, 67%);
  font-size: 0.8rem;
  font-style: italic;
  display: none;
}
