:root {
  --clr-primary: #c4c4c4;
  --clr-secondary: #2b2b2b;
  --clr-highlight: #fcb635;
  --clr-error: #e70303;

  --clr-text: #181818;

  --fnt-header: "Roboto", sans-serif;
  --fnt-text: "Open Sans", sans-serif;
}
body,
html {
  padding: 0;
  margin: 0;
  box-sizing: border-box;
}

input[type=number]
{
  -moz-appearance: textfield;
}
input[type=number]::-webkit-inner-spin-button,
input[type=number]::-webkit-outer-spin-button
{
  -webkit-appearance: none;
}


header {
  display: flex;
  justify-content: center;
  align-items: center;
  font-family: var(--fnt-header);
}
ul{
  padding: 0;
}
small{
  align-self: flex-start;
  margin-left: 1rem;
}

.container {
  width: 90%;
  margin: auto;
  display: grid;
  grid-template-rows: 1fr;
  grid-template-columns: 1fr 1fr 1fr;
  align-items: center;
  justify-content: center;
  font-family: var(--fnt-text);
  text-transform: uppercase;
  border: 2px solid var(--clr-secondary);
  background: var(--clr-primary);
  
}

.exp-type,.exp-budget,.exp-result {
  height: 100%;
  max-height: 60vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  margin: 1rem;
}
.type-item,.btn {
  width: 60%;
  color: var(--clr-primary);
  padding: 1rem 3rem;
  border-radius: 20px;
  border: 1px solid var(--clr-secondary);
  margin: 0.5rem 0;
  cursor: pointer;
  background-color: var(--clr-secondary);
  display: flex;
  justify-content: center;
  list-style: none;
  text-transform: uppercase;
  font-size: 1rem;
  font-weight: 700;
}
.type-item:hover ,
.type-item:focus ,.btn:hover{
  background-color: var(--clr-highlight);
  color: var(--clr-text);
  transition: all 0.2s ease-in-out;
}
.type-item:active,.btn:active{
  transform: scale(0.9);
}


.type-output,
.amount-output,
.result-output {
  margin: 1rem 0;
  padding: 2rem;
  display: flex;
  justify-content: center;
  align-items: center;
  background-color: var(--clr-secondary);
  color: var(--clr-primary);
  border-radius: 20px;
  font-size: 2rem;
  font-weight: 700;
  -moz-user-select: -moz-none;
  -khtml-user-select: none;
  -webkit-user-select: none;
  -ms-user-select: none;
  user-select: none;
}
.type-output:hover,
.amount-output:hover {
  animation: shake 0.5s infinite;
}

@keyframes shake {
  0% {
    transform: translate(1px, 1px) rotate(0deg);
  }
  10% {
    transform: translate(-1px, -2px) rotate(-1deg);
  }
  20% {
    transform: translate(-3px, 0px) rotate(1deg);
  }
  30% {
    transform: translate(3px, 2px) rotate(0deg);
  }
  40% {
    transform: translate(1px, -1px) rotate(1deg);
  }
  50% {
    transform: translate(-1px, 2px) rotate(-1deg);
  }
  60% {
    transform: translate(-3px, 1px) rotate(0deg);
  }
  70% {
    transform: translate(3px, 1px) rotate(-1deg);
  }
  80% {
    transform: translate(-1px, -1px) rotate(1deg);
  }
  90% {
    transform: translate(1px, 2px) rotate(0deg);
  }
  100% {
    transform: translate(1px, -2px) rotate(-1deg);
  }
}
.amount {
  font-size: 2rem;
  border: 1px solid var(--clr-secondary);
  color: var(--clr-text);
  border-radius: 20px;
  flex: 1;
}
.amount:invalid{
  border: 1px solid var(--clr-error);
  background-color: #fcd2d2;
}


.Input {
  display: flex;
  margin-top: 1rem;
}

.amount:not(:first-child) {
  border-left: 0;
}
.amount:not(:last-child) {
  border-right: 0;
}

.input-label {
  background-color: var(--clr-secondary);
  color: var(--clr-primary);
  font-weight: 700;
  font-size: 2rem;
}

.amount,
.input-label {
  border: 1px solid var(--clr-secondary);
  padding: 0.5em 0.75em;
}
.amount:first-child,
.input-label:first-child {
  border-radius: 20px 0 0 20px;
}
.amount:last-child,
.input-label:last-child {
  border-radius: 0 20px 20px 0;
}


.result-output {
  padding: 1rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  font-size: 2rem;
  text-align: center;
}

.type-submit,
.amount-submit {
  display: inline;
}
.check{
  display: none;
  color: green;
}
.error{
  display: none;
  color: var(--clr-error);
  position: relative;
  cursor: pointer;
}
.tooltip .tooltip-text {
  visibility: hidden;
  width: 120px;
  background-color: #fcd2d2;
  color: var(--clr-error);
  font-size: 1.5rem;
  text-align: center;
  border-radius: 20px;
  padding: 5px 0;
  position: absolute;
  z-index: 1;
  bottom: 125%;
  left: 50%;
  margin-left: -60px;
  opacity: 0;
  transition: opacity 0.3s;
}

.tooltip .tooltip-text::after {
  content: "";
  position: absolute;
  top: 100%;
  left: 50%;
  margin-left: -5px;
  border-width: 5px;
  border-style: solid;
  border-color: #555 transparent transparent transparent;
}

.tooltip:hover .tooltip-text {
  visibility: visible;
  opacity: 1;
}