:root {
  --calc-global-font-family: 'Poppins';
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  font-family: var(--calc-global-font-family), sans-serif;
  font-weight: 500;
  background-color: rgb(28, 27, 31);
}

.calculator {
  display: flex;
  flex-direction: column;
  width: 320px;
  background: #2e2e2e;
  box-shadow: 0px 1px 3px 1px rgba(0, 0, 0, 0.15), 0px 1px 2px rgba(0, 0, 0, 0.3);
  border-radius: 32px;
  transition: height 480ms cubic-bezier(0.4, 0, 0.2, 1);
  overflow: hidden;
  z-index: 10;
}

.calculator__io {
  display: flex;
  flex-direction: column;
  width: 100%;
  height: 180px;
  background: #424242;
  border-radius: 32px;
  z-index: 12;
}
.calculator__io-element,
.calculator__io-preview {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  width: 100%;
  text-align: right;
  word-wrap: break-word;
  word-break: break-all;
  overflow-y: auto;
}
.calculator__io-element {
  padding: 24px;
  height: 70%;
  font-size: 2rem;
  color: #fff;
}
.calculator__io-preview {
  padding: 0 24px;
  height: 30%;
  font-size: 1rem;
  color: #aaaaaa;
}

::-webkit-scrollbar {
  width: 0px;
  background: transparent;
}

.calculator__keyboard {
  display: flex;
  flex-wrap: wrap;
  padding: 4px;
  width: 100%;
  transition: margin-top 480ms cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 11;
}
.calculator__keyboard[hidden] {
  margin-top: calc(-100% - 8px);
}

.key-showing {
  display: flex;
  gap: 8px;
  position: absolute;
  right: 16px;
  bottom: 16px;
  padding: 0 16px;
  min-width: 64px;
  height: 48px;
  display: flex;
  justify-content: center;
  align-items: center;
  color: #fff;
  background-color: rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  pointer-events: none;
  user-select: none;
}
.code {
  font-weight: 700;
}
.times {
  font-weight: 500;
  opacity: 0.6;
}
.times::after {
  content: '×';
}
