@import url("https://fonts.googleapis.com/css2?family=Spartan:wght@700&display=swap");

#container {
  font-family: "Spartan", sans-serif;
  background-color: rgb(0, 73, 107);
  width: 100%;
  height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

.calculator-header {
  display: flex;
  position: absolute;
  flex-direction: row;
  text-align: center;
}

#calculator {
  width: 25%;
  height: 45%;
  margin: 20px auto;
  padding: 10px;
  background-color: #021532;
  border-radius: 5px;
  box-shadow: 0 0 5px rgba(0, 0, 0, 0.3);
  border-radius: 8px;
  /* background-color: #ee3939; */
}

#result {
  width: 90%;
  margin-bottom: 10px;
  padding: 20px;
  font-size: 36px;
  background-color: #ffffff00;
  color: #ffffff;
  text-align: end;
  border: none;
}

#display {
  text-align: center;
  width: 25%;
  padding: 10px;
  background-color: #021532;
  border-radius: 8px;
}

#buttons {
  display: grid;
  /* width: 100%; */
  grid-template-columns: repeat(4, 1fr);
  grid-gap: 25px;
  padding: 20px;
  /* padding: 20px; */
}

#buttons button:hover {
  background: linear-gradient(to bottom, #e6e6e6 5%, #ffffff 100%);
  background-color: #ffffff;
}

#buttons button:active {
  position: relative;
  top: 2px;
}

#buttons button {
  width: 100%;
  padding: 4px;
  font-size: 36px;
  font-weight: 900;
  background-color: #e6e6e6;
  border: none;
  border-radius: 5px;
  box-shadow: 0 5px 5px 0 rgba(255, 229, 229, 0.653);
}

#buttons button:nth-child(4) {
  background-color: rgb(105, 70, 192);
}

.row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
  font-size: 18px;
}

.row button {
  width: 48%;
  padding: 15px;
  border-radius: 8px;
  font-size: 20px;
  font-weight: 900;
  box-shadow: 0 5px 5px 0 rgba(255, 229, 229, 0.653);
  border: none;
}

.row button:hover {
  background: linear-gradient(to bottom, #e6e6e6 5%, #ffffff 100%);
  background-color: #ffffff;
}

.row button:active {
  position: relative;
  top: 2px;
}

.row button:nth-child(2) {
  background-color: rgb(255, 68, 68);
  box-shadow: 0 5px 5px 0 rgba(255, 156, 156, 0.653);
}

.theme-buttons {
  display: flex;
  justify-content: space-between;
  margin-top: 10px;
}

.theme-buttons button {
  padding: 5px 10px;
  font-size: 14px;
  background-color: #e6e6e6;
  border: none;
  border-radius: 5px;
  cursor: pointer;
}

.light-theme {
  background-color: #f2f2f2;
  color: #000;
}

.dark-theme {
  background-color: #333;
  color: #fff;
}

.pink-theme {
  background-color: #000000;
  color: #fff;
}

/* ----switch--- */

.redButton.horizTranslate2 {
  -webkit-transition: -webkit-transform 0.1s linear;
  -webkit-transform: translateX(20px);
}
.redButton.horizTranslate3 {
  -webkit-transition: -webkit-transform 0.1s linear;
  -webkit-transform: translateX(40px);
}
.redButton.horizTranslate1 {
  -webkit-transition: -webkit-transform 0.1s linear;
  -webkit-transform: translateX(0px);
}
#outerContainer {
  display: flex;
  position: relative;
  width: 25%;
  height: 98px;
  /* background-color: rgb(0, 73, 107); */
  align-items: end;
}

#text-calc {
  color: #fff;
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 2%;
}

#text-themes {
  color: #ffffff;
  margin-bottom: 2%;
  margin-left: 57%;
}

#buttonContainer {
  background-color: #2d254b;
  width: 71px;
  height: 28px;
  position: relative;
  left: 2%;
  bottom: 10%;
  border-radius: 14px;
}
.redButton {
  width: 16px;
  height: 16px;
  background-color: #db3d2b;
  border-radius: 8px;
  position: relative;
  top: 6px;
  left: 6px;
}
#legendTextContainer {
  left: 85%;
  display: inline-block;
  position: absolute;
  top: 40%;
  color: #ffffff;
  font-family: Arial;
  font-size: 10pt;
  text-align: center;
}
.legendText {
  display: inline-block;
  width: 20px;
  padding-bottom: 33px;
  cursor: default;
  user-select: none;
}
#message {
  border: 1px solid #cccccc;
  display: inline-block;
  padding: 4px;
  margin-top: 6px;
  font-family: Arial;
  font-size: 10pt;
}

@media screen and (max-width: 992px) {
  #calculator {
    width: 90%;
    height: 50%;
  }

  #display {
    width: 90%;
  }

  #buttons {
    /* padding: 10px; */
  }

  #outerContainer {
    width: 90%;
  }

  #legendTextContainer {
    left: 80%;
  }

  #text-calc {
    margin-bottom: 4%;
  }

  #text-themes {
    margin-left: 45%;
    margin-bottom: 4%;
  }
}
