@import url("https://fonts.googleapis.com/css2?family=Raleway:wght@700&family=Roboto:wght@400;500;700;900&display=swap");

*,
::before,
::after {
  padding: 0;
  margin: 0;
  box-sizing: border-box;
}

html {
  font-family: "Roboto", sans-serif;
  font-size: 16px;
}

body {
  height: 100vh;
  background: linear-gradient(to right, #ffd89b, #19547b);
  display: flex;
  justify-content: center;
  align-items: center;
}

h1 {
  display: block;
  width: 100%;
  font-size: 3rem;
}

.calculator {
  height: 60%;
  color: #303030;
  width: 330px;
}

/* DISPLAY  */

.display {
  width: 100%;
  height: 25%;
  background-color: #cebb9d;
  box-shadow: rgba(0, 0, 0, 0.35) 0px 5px 15px;
  border-radius: 1rem;
  text-align: right;
  word-break: break-all;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  overflow: hidden;
  padding: 10px;
  font-size: 1.2rem;
  font-weight: bold;
  margin-bottom: 10px;
}

.previousNumber {
  flex-basis: 30%;
}

.mathSign {
  flex-basis: 30%;
}

.currentNumber {
  font-size: 1.8rem;
  flex-basis: 40%;
}

/* BUTTONS */

.buttons {
  height: 75%;
  display: grid;
  grid-template-columns: 1fr 1fr 1fr 1fr;
  grid-template-rows: 1fr 1fr 1fr 1fr 1fr;
  gap: 3px;
}

.buttons button {
  font-size: 1.5rem;
  border-radius: 0.5rem;
  background-color: #cebb9d;
  border: none;
  outline: none;
  cursor: pointer;
  transition: all 0.3s ease-in-out;
  box-shadow: rgba(0, 0, 0, 0.35) 0px 3px 7px;
}

.buttons button:hover {
  background-color: #caab79;
}

.buttons button:active {
  background-color: #c59c59;
}

.equal {
  grid-row: 4/6;
  grid-column: 4/5;
}

.buttons .clear {
  background-color: #cf8b8bc9;
}

/* HISTORY */

.history {
  margin-top: 125px;
  height: calc(60% + 10px);
  width: 180px;
  margin-left: 20px;
  background-color: #90a9cab2;
  border-radius: 0.5rem;
  padding: 10px;
  text-align: center;
  box-shadow: rgba(0, 0, 0, 0.35) 0px 5px 15px;
}

.hisotry__heading {
  font-weight: bold;
  margin-bottom: 10px;
}

.history__button {
  font-weight: bold;
  margin: 10px auto;
  padding: 5px 10px;
  border-radius: 0.5rem;
  text-transform: uppercase;
  border: none;
  outline: none;
  cursor: pointer;
  background-color: #8894e2;
  display: none;
  box-shadow: rgba(0, 0, 0, 0.35) 0px 3px 7px;
}

.history__button:hover {
  background-color: #7a87e0;
}

.history__button:active {
  background-color: #6c7ce4;
}

.history__button--active {
  display: block;
}

.history__results {
  list-style: none;
}

.history__results__item {
  margin-top: 8px;
  word-break: break-all;
}
