@import url("https://fonts.googleapis.com/css2?family=Bungee&family=Share+Tech+Mono&display=swap");

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --bg-color: #f7b021;
  --border-color: #a65000;
  --btn-bg-color: #f7d59d;
  --screen-bg-color: #a6f2f7;
  --solar-bg: rgb(133 123 111);
}

body {
  display: flex;
  justify-content: center;
  align-items: center;
  height: 100vh;
}

.container {
  width: 30%;
  padding: 1em;
  background-color: var(--bg-color);
  border-radius: 20px;
  border: 7px solid var(--border-color);
  position: relative;
  overflow: hidden;
}

.topsection {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.topsection .solar {
  height: 10vh;
  width: 50%;
  background-color: gray;
  border-radius: 10px;
  display: grid;
  grid-template-columns: repeat(10, 1fr);
  overflow: hidden;
  cursor: pointer;
}

.redtype {
  background: #f74e44;
  color: white !important;
}
.bluetype {
  background: #3ebddd;
  color: white !important;
}
.greentype {
  background: #5ec28b;
  color: white !important;
}
.nborder {
  border-radius: 10px !important;
  border: 5px solid var(--border-color) !important;
}

.topsection .solar .bar {
  background-color: hsl(33, 9%, 48%, 1);
  border: 1px solid var(--border-color);
}

.topsection .solar .bar:hover {
  background-color: hsl(33, 9%, 48%, 0.1);
}

.screen {
  border: 7px solid var(--border-color);
  background-color: var(--screen-bg-color);
  width: 100%;
  margin-block: 1rem;
  display: flex;
  justify-content: right;
  padding-inline: 1em;
  height: 13vh;
}

.screen.off {
  background-color: var(--solar-bg) !important;
}

.screen input {
  width: 100%;
  height: 100%;
  background: none;
  border: none;
  outline: none;
  font-size: 4.5rem;
  font-family: "Share Tech Mono", monospace;
  text-align: right;
}

.screen p,
.single-history-item p,
.screen input::placeholder {
  font-size: 4.5rem;
  font-family: "Share Tech Mono", monospace;
}

.btns-section {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
}

.btn {
  margin: 5px;
  font-size: 3rem;
  border: 7px solid var(--border-color);
  border-radius: 15px;
  color: var(--border-color);
  transition: all 0.5s ease;
  cursor: pointer;
  font-family: "Share Tech Mono", monospace;
  display: flex;
  justify-content: center;
  align-items: center;
}

.btn.off {
  pointer-events: none;
}

.historyicn {
  transition: all 0.5s ease;
}

.rotated {
  transform: rotate(90deg);
}

.btn:active {
  transform: scale(0.9);
}

.history svg {
  cursor: pointer;
}

.history svg path {
  color: var(--border-color);
}

.clrhistorybtncontainer {
  position: sticky;
  bottom: 0;
}

.clrhistorybtncontainer .clrhistorybtn {
  font-size: 2.5rem;
  font-family: "Share Tech Mono", monospace;
  width: 100%;
  background-color: var(--border-color);
  border: none;
  outline: none;
  color: var(--bg-color);
  cursor: pointer;
}

.clrhistorybtncontainer .clrhistorybtn.invisible {
  display: none;
}

.nohistory {
  background-color: var(--bg-color);
  position: absolute;
  inset: 0;
  display: flex;
  justify-content: center;
  align-items: center;
  flex-direction: column;
}

.nohistory svg path {
  fill: var(--border-color);
}

.clrhistorybtncontainer .clrhistorybtn:active {
  background-color: var(--bg-color);
  color: var(--border-color);
}

.nohistorytext {
  font-size: 2.5rem;
  font-family: "Share Tech Mono", monospace;
  margin-top: 1rem;
  color: var(--border-color);
}

.sidebar {
  position: absolute;
  inset: 0;
  background-color: var(--bg-color);
  top: 34%;
  left: 100%;
  transition: all 0.5s ease;
  overflow-y: auto;
  scrollbar-width: none;
}

.animate-sidebar {
  left: 0;
}

.sidebar .single-history-item:first-child {
  border-top: 7px solid var(--border-color);
}

.single-history-item {
  border-bottom: 7px solid var(--border-color);
  cursor: pointer;
  padding-inline: 1em;
  overflow-x: auto;
  scrollbar-width: none;
}

.single-history-item:hover {
  background-color: var(--screen-bg-color);
}

.single-history-item p {
  text-align: right;
  color: var(--border-color);
}

.nohistory {
  display: none;
}

.sidebar:not(:has(.history-items *)) .nohistory {
  display: flex;
}

.sidebar:not(:has(.history-items *)) .clrhistorybtncontainer {
  display: none;
}
