@font-face {
  font-family: "dejavu";
  src: url("./fonts/DejaVu Sans.ttf");
  font-weight: normal;
  font-style: normal;
}

@font-face {
  font-family: "dejavu-mono";
  src: url("./fonts/DejaVu Mono.ttf");
  font-weight: normal;
  font-style: normal;
}

@font-face {
  font-family: "krona-one";
  src: url("./fonts/KronaOne-Regular.ttf");
  font-weight: normal;
  font-style: normal;
}

h1 {
  text-align: center;
  font-size: 2rem;
  letter-spacing: 1.75px;
  padding-bottom: 1rem;
}

h2 {
  text-align: center;
  font-size: 1.45rem;
  color: slategrey;
  letter-spacing: 1.1px;
  padding-bottom: 1rem;
}

h3 {
  text-align: center;
  margin: 1rem 0;
  font-size: 1.3rem;
  letter-spacing: 2px;
  column-span: all;
}

h4 {
  margin-top: 1rem;
}

body {
  font-family: "dejavu", sans-serif;
  --shadow: #37658C;
  --highlight: #7095b4;
  --body-color: steelblue;
  --red-highlight: #E66767;
  background-color: aliceblue;
  color: darkslategrey;
}

#container {
  display: inline-flex;
  flex-flow: row wrap;
  width: 100%;
  margin: auto;
  justify-content: center;
}

#calculator {
  background-color: steelblue;
  color: whitesmoke;
  height: 33rem;
  width: 19.5rem;
  padding: 1.25rem 1rem 1.75rem 1rem;
  display: grid;
  grid-gap: 0.5rem 0.5rem;
  grid-template: 6rem 5rem auto / auto;
  justify-content: center;
  align-content: center;
  /*margin: 2rem 2rem 2rem 5rem;*/
  margin: 3.5rem 2rem 2rem;
  border-radius: 5px 5px 25px 25px;
  box-shadow: 0px 0px 2px inset var(--shadow), 7px 7px 15px lightslategrey, 3px 3px 2px inset var(--highlight), -3px -3px 2px inset var(--shadow);
}

#manual {
  width: 45%;
  min-width: 29em;
  max-width: 40rem;
  margin: 2rem 2rem 2rem 1rem;
  padding: 1rem;
  border-radius: 15px;
  box-shadow: -3px -3px 10px aliceblue, 5px 5px 15px lightslategrey;
}

td {
  padding: 0.5rem 0;
}

.headerRow {
  border-bottom: 2px solid lightsteelblue;
}

.exampleText {
  font-weight: 600;
  color: indianred;
  padding-left: 1.5rem;
  letter-spacing: 1px;
}

.inputText {
  font-family: "dejavu-mono", monospace;
  padding-left: 1.5rem;
}

.btnText {
  border: 1px solid darkslategrey;
  border-radius: 3px;
  padding: 2px 1px;
  font-family: "dejavu-mono", monospace;
}

.resultText {
  font-family: "dejavu-mono", monospace;
  border: 1px solid darkslategrey;
  border-radius: 3px;
  padding: 7px 5px 5px 7px;
  text-align: right;
}

.crossedOut {
  text-decoration: line-through;
  text-decoration-color: darkslateblue;
}

.underlineText {
  text-decoration: underline;
  text-decoration-color: darkslateblue;
}

.display {
  font-family: "dejavu-mono", monospace;
  background: lightgrey;
  width: 17.5rem;     /* 4(btn-width) + 3(grid-gap) */
  height: 3rem;
  text-align: right;
  grid-area: 1 / 1 / 2 / 2;
  white-space: nowrap;
  color: darkslategrey;
  text-shadow: 2px 2px 2px darkgrey;
  transition: 1.5s;
}

#display {
  box-shadow: 2px 2px 2px var(--highlight), -2px -2px 2px var(--shadow);
  border-radius: 2px;
}

#equation {
  color: darkslategrey;
  font-size: 2rem;
  padding: 0.5rem 1rem;
  line-height: 2.75rem;
  border-radius: 2px 2px 0 0;
}

#result {
  color: slategrey;
  font-size: 1.75rem;
  padding: 0.5rem 1rem;
  line-height: 1.75rem;
  border-radius: 0 0 3px 3px;
}

#decoration {
  display: grid;
  grid-template: repeat(2, 1fr) / 2fr 1fr;
  grid-area: 2 / 1 / 3 / 2;
  align-items: start;
}

#brand {
  display: flex;
  grid-area: 1 / 1 / 2 / 3;
  font-size: 1.25rem;
  letter-spacing: 1.5px;
  align-items: flex-start;
  justify-content: flex-start;
  text-shadow: 1px 1px 2px var(--shadow), -1px -1px 2px var(--highlight);
}

#solar {
  width: 8.5rem;
  height: 2.25rem;
  background-color: darkslategrey;
  box-shadow: 2px 2px 2px inset #213838, -1px -1px 1px inset darkslategrey, -2px -2px 2px inset slategrey, 1px 1px 2px var(--highlight), -1px -1px 2px var(--shadow);
;
  display: flex;
  margin-bottom: 0.5rem;
  grid-area: 2 / 1 / 3 / 2;
  border-radius: 2px;
}

.panel {
  width: 25%;
  box-shadow: 0px 0px 0px 0.5px inset #213838;
  border-radius: 2px;
}

#keypad {
  display: grid;
  grid-gap: 0.5rem 0.5rem;
  grid-template: repeat(6, 1fr) / repeat(4, 1fr);
  justify-content: center;
  align-content: center;
}

#numpad {
  grid-area: 3 / 1 / 7 / 4;
  display: grid;
  grid-gap: 0.5rem 0.5rem;
  grid-template: repeat(4, 1fr) / repeat(3, 1fr);
}

#topOperators {
  grid-area: 1 / 1 / 2 / 4;
  display: grid;
  grid-gap: 0.5rem 0.5rem;
  grid-template: 1fr / repeat(3, 1fr);
}

#sideOperators {
  grid-area: 1 / 4 / span 6 / 5;
  display: grid;
  grid-gap: 0.5rem 0.5rem;
  grid-template: repeat(4, 1fr) auto / 1fr;
  margin-left: 1rem;
}

#memory {
  grid-area: 2 / 1 / 3 / 4;
  display: grid;
  grid-gap: 0.5rem 0.5rem;
  grid-template: 1fr / repeat(3, 1fr);
}

button {
  display: inline-flex;
  background-color: whitesmoke;
  color: steelblue;
  height: 2.5rem;
  width: 3.75rem;
  border: 0px solid transparent;
  border-radius: 0.25rem;
  justify-content: left;
  align-items: flex-start;
  cursor: pointer;
  box-shadow: 3px 3px 2px var(--shadow), 0px 0px 0px 1px var(--shadow), 1px 1px 1px inset white, -1px -1px 1px inset darkgrey;
  text-shadow: 1px 1px 2px lightgrey, -1px -1px 2px white;
  font-family: "krona-one", sans-serif;
}

button:hover {
  background-color: white;
  box-shadow: 0px 0px 0px 1px lightgrey, 2px 2px 4px var(--shadow), -1px -2px 4px var(--highlight);
}

button:active {
  transform: scale(99%);
  background-color: lightgrey;
  box-shadow: 2px 2px 2px inset darkgrey, -1px -1px 2px inset whitesmoke, 1px 1px 2px var(--highlight), -1px -1px 2px var(--shadow);
}

.operator, .memory, #equals, #clear {
  background-color: indianred;
  color: whitesmoke;
  font-weight: initial;
  box-shadow: 3px 3px 2px var(--shadow), 0px 0px 0px 1px var(--shadow), 1px 1px 1px inset lightcoral, -1px -1px 1px inset #994444;
  text-shadow: 1px 1px 2px #994444, -1px -1px 2px lightcoral;
  font-family: inherit;
}

.operator:hover, .memory:hover, #equals:hover, #clear:hover {
  background-color: var(--red-highlight);
  box-shadow: 0px 0px 0px 1px indianred, 2px 2px 4px var(--shadow), -1px -2px 4px var(--highlight);
}

.operator:active, .memory:active, #equals:active, #clear:active, .memoryStored {
  transform: scale(99%);
  background-color: #B35050;
  box-shadow: 2px 2px 2px inset #994444, -1px -1px 2px inset lightcoral, 1px 1px 2px var(--highlight), -1px -1px 2px var(--shadow);
}

.operator, #equals, .number {
  font-weight: bold;
}

#equals {
  height: 5.5rem;    /* 2(btn-height) + grid-gap */
}

@media only screen and (min-width: 840px) {
  #calculator {
  position: sticky;
  top: 3.5rem;
  }
}
