@import url("https://fonts.googleapis.com/css2?family=Source+Sans+Pro:wght@300;400;600;700&display=swap");

:root {
  --color-primary-dark: rgb(100, 100, 100);
  --color-primary-dark-dark-light: rgb(60, 60, 60);

  --color-primary-dark-dark: rgb(41, 41, 41);

  --color-primary-dark-light: rgb(112, 112, 112);
  --color-primary-light: rgb(255, 166, 0);
  --color-primary-light-light: rgb(255, 170, 0);
  --color-primary-light-dark: rgb(255, 157, 0);
  --color-text: rgb(255, 255, 255);
}

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

html {
  font-size: 62.5%;
}
body {
  font-family: "Source Sans Pro", sans-serif;
  height: 100vh;
  min-height: 48rem;
  width: 100vw;
  min-width: 28rem;
  display: flex;
  justify-content: center;
  align-items: center;
  background: linear-gradient(
    160deg,
    var(--color-primary-light-dark) 50%,
    var(--color-primary-dark-dark) 50%
  );
}

/*___________Defaults Utility__________*/
.button {
  font-weight: 500;
  cursor: pointer;
  border: none;
  padding: 2rem 1rem;
  background-color: var(--color-primary-dark);
  color: var(--color-text);
  font-size: 2rem;
  border-radius: 0.2rem;
}
.button:hover {
  box-shadow: 1px 2px 4px rgba(0, 0, 0, 0.5);
  background-color: var(--color-primary-dark-light);
}
input {
  outline: none;
  border: none;
  font-size: 4rem;
  font-weight: 700;
}
/*___________ Calculator Form __________*/
.calculator {
  display: flex;
  flex-direction: column;
  width: 35rem;
  margin: auto;
  background-color: var(--color-primary-dark-dark);
  border-radius: 1rem;
  box-shadow: 2px 4px 8px rgba(0, 0, 0, 0.8);
  overflow: hidden;
}

.calculator input {
  width: 100%;
  background-color: var(--color-primary-dark-dark);
  color: var(--color-text);
  padding: 1rem;
  text-align: right;
  text-justify: center;
  font-weight: 500;
}

.calculator-button {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr 1fr;
  grid-template-rows: repeat(5, max-content);
  justify-content: space-around;
  gap: 0.5rem;
}

.calculator-button button:nth-last-child(2) {
  grid-column: 1 / span 2;
}
.calculator-button button:nth-last-child(3) {
  grid-column: 4;
  height: 100%;
  background-color: var(--color-primary-light-dark);
  grid-row: 4 / span 2;
}

.orange:hover {
  box-shadow: 1px 2px 4px rgba(0, 0, 0, 1);
  background-color: var(--color-primary-light-light);
}
.oper-btn {
  background-color: var(--color-primary-light-dark);
  font-weight: 600;
}

.grey-dark {
  background-color: var(--color-primary-dark-dark-light);
}
.grey-dark:hover {
  background-color: rgb(70, 70, 70);
}

.design-close-exit {
  width: 100%;
  height: 3rem;
  display: flex;
  justify-content: flex-start;
  align-items: center;
  gap: 1.5rem;
  padding-left: 1.5rem;
}

.circle {
  height: 1.5rem;
  width: 1.5rem;
  border-radius: 50%;
  text-align: center;
  font-size: 1.2rem;
  font-weight: 700;
}

.red {
  background-color: rgb(241, 71, 71);
  color: rgb(241, 71, 71);
}
.green {
  background-color: rgb(29, 180, 29);
  color: rgb(29, 180, 29);
}
.yellow {
  background-color: rgb(250, 179, 46);
  color: rgb(250, 179, 46);
}

.red:hover,
.yellow:hover,
.green:hover {
  color: rgb(63, 63, 63);
}

/*________________ Animation _____________*/
.calculator {
  transform: translate(-20vmin, 5vmin);
  animation: calculator-appears 2s ease-in-out forwards;
}

@keyframes calculator-appears {
  0% {
  }
  50% {
    transform: translate(20vmin, -10vmin);
  }
  100% {
    transform: translate(0);
  }
}

@media screen and (max-width: 768px) {
  html {
    font-size: 56%;
  }
  .calculator {
    width: 30rem;
  }
}

@media screen and (max-width: 500px) {
  html {
    font-size: 50%;
  }
  .calculator {
    width: 25rem;
  }
}

@media screen and (orientation: landscape) and (max-height: 700px) {
  html {
    font-size: 56%;
  }
  .calculator {
    width: 30rem;
  }
}

@media screen and (orientation: landscape) and (max-height: 500px) {
  html {
    font-size: 50%;
  }
  .calculator {
    width: 25rem;
  }
}
