/*
* The calculators are currently responsive in landscape mode only.
*/

* {
  margin: 0;
  padding: 0;
}

.color {
  -o-transition-duration: 0.42s;
  -o-transition-property: color, background-color, border-color, text-decoration-color, fill, stroke;
  -o-transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
  -webkit-transition-duration: 0.42s;
  -webkit-transition-property: color, background-color, border-color, fill, stroke,
    -webkit-text-decoration-color;
  -webkit-transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
  transition-duration: 0.42s;
  transition-property: color, background-color, border-color, text-decoration-color, fill, stroke;
  transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
}

body {
  -ms-flex-align: center;
  -ms-flex-pack: center;
  -webkit-box-align: center;
  -webkit-box-pack: center;
  align-items: center;
  background-color: whitesmoke;
  display: -ms-flexbox;
  display: -webkit-box;
  display: flex;
  height: 100vh;
  justify-content: center;
  width: 100vw;
}
body.dark {
  background-color: darkslategray;
}

#colorMode {
  -webkit-box-shadow: 0 0 30px 0 rgba(0, 0, 0, 0.69);
  background-color: darkslategray;
  border: none;
  border-radius: 9999px; /* Round */
  box-shadow: 0 0 30px 0 rgba(0, 0, 0, 0.69);
  height: 3vmax;
  left: 10px;
  position: absolute;
  top: 10px;
  width: 3vmax;
}
#colorMode.dark {
  -webkit-box-shadow: 0 0 30px 0 rgba(255, 255, 255, 0.69);
  background-color: whitesmoke;
  box-shadow: 0 0 30px 0 rgba(255, 255, 255, 0.69);
}
#colorMode:hover {
  -webkit-filter: none;
  filter: none;
}

#sun {
  border-radius: 9999px; /* Round */
  left: 0;
  position: absolute;
  top: 0;
  width: 100%;
}
#sun.dark {
  display: none; /* Hide */
}

#moon {
  border-radius: 9999px; /* Round */
  display: none; /* Hide */
  left: 0;
  position: absolute;
  top: 0;
  width: 100%;
}
#moon.dark {
  display: block; /* Show */
}

.container {
  -ms-flex-align: center;
  -ms-flex-pack: justify;
  -webkit-box-align: center;
  -webkit-box-pack: justify;
  display: -ms-flexbox;
  display: -webkit-box;
  display: flex;
  align-items: center;
  height: 60%;
  justify-content: space-between;
  width: 60%;
}

button {
  -o-transition: filter 0.2s ease-in-out;
  -webkit-transition: -webkit-filter 0.2s ease-in-out;
  background-color: lightgray;
  border-radius: 10px;
  font-size: 2.5vh;
  outline-offset: 2px; /* Make outline more visible for all themes */
  transition: filter 0.2s ease-in-out;
}
button.selected {
  -webkit-filter: brightness(0.8);
  filter: brightness(0.8);
}
button:hover {
  -webkit-filter: brightness(0.8);
  cursor: pointer;
  filter: brightness(0.8);
}
.action {
  background-color: deepskyblue;
}
.operator {
  background-color: darkorange;
}
.suppress {
  background-color: orangered;
}

.inout {
  background-color: white;
  border-radius: 10px;
}
.inout.dark {
  background-color: black;
  color: white;
}

.calc {
  -webkit-box-shadow: 0 0 30px 0 rgba(0, 0, 0, 0.69);
  background-color: darkslategray;
  border-radius: 10px;
  box-shadow: 0 0 30px 0 rgba(0, 0, 0, 0.69);
  height: 100%;
}
.calc.dark {
  -webkit-box-shadow: 0 0 30px 0 rgba(255, 255, 255, 0.69);
  background-color: whitesmoke;
  box-shadow: 0 0 30px 0 rgba(255, 255, 255, 0.69);
}

#num {
  -ms-flex-align: center;
  -ms-flex-direction: column;
  -ms-flex-pack: space-evenly;
  -webkit-box-align: center;
  -webkit-box-direction: normal;
  -webkit-box-orient: vertical;
  -webkit-box-pack: space-evenly;
  align-items: center;
  display: -ms-flexbox;
  display: -webkit-box;
  display: flex;
  flex-direction: column;
  justify-content: space-evenly;
  width: 40%;
}

#display {
  border: none;
  font-size: 5vh;
  height: 15%;
  padding: 1%;
  text-align: right;
  width: 80%;
}

#buttons {
  -ms-grid-columns: 1fr 2% 1fr 2% 1fr 2% 1fr;
  -ms-grid-rows: 1fr 2.5% 1fr 2.5% 1fr 2.5% 1fr 2.5% 1fr;
  display: -ms-grid;
  display: grid;
  gap: 2.5% 2%;
  grid-template-columns: repeat(4, 1fr);
  grid-template-rows: repeat(5, 1fr);
  height: 70%;
  width: 80%;
}

#graph {
  -ms-flex-align: center;
  -ms-flex-direction: column;
  -ms-flex-pack: center;
  -webkit-box-align: center;
  -webkit-box-direction: normal;
  -webkit-box-orient: vertical;
  -webkit-box-pack: center;
  align-items: center;
  display: -ms-flexbox;
  display: -webkit-box;
  display: flex;
  flex-direction: column;
  justify-content: center;
  width: 55%;
}

#function {
  border: none;
  font-size: 3vh;
  height: 10%;
  margin-bottom: 1%; /* Spacing with feedback */
  outline-offset: 2px; /* Make outline more visible for all themes */
  text-align: center;
  width: 90%;
}

#feedback {
  color: white;
  height: 4%;
  opacity: 0.8;
}
#feedback.error {
  color: #e66;
}
#feedback.dark {
  color: black;
}
#feedback.dark.error {
  color: #d00;
}

#graphContainer {
  background-color: white; /* Placeholder */
  border-radius: 10px;
  height: 75%;
  margin-top: 1%;
  width: 90%;
}
