.translator-box {
  padding: 1rem;
  border: 1px solid #ddd;
  border-radius: .5rem;
  background: #f8f9fa;
  opacity: 0;
  transform: translateY(10px);
  transition: all 0.4s ease;
  min-height: 200px;
}

.translator-box.show {
  opacity: 1;
  transform: translateY(0);
}

html,
body {
  height: 100%;
}

body {
  display: flex;
  flex-direction: column;
}

main {
  flex: 1;
  /* take up all available space */
}

.spinner-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(255, 255, 255, 0.7);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 9999;
  display: none;
}

.bg-liberal {
  background-color: #499ee9;
}

.bg-conservative {
  background-color: #f25655;
}

.flex-wrapper {
  display: inline-block;
  position: relative;
}

#translatorWord {
  position: absolute;
  /* take it out of flow */
  left: 0;
  /* sit right after moralWord’s left edge */
  transition: transform 0.4s ease;
  color: #999;
}

/* Flip for moralWord */
#moralWord {
  display: inline-block;
  transition: transform 0.6s, opacity 0.6s, color 0.6s;
  color: #77447f;
}

.moralBadge {
  display: inline-block;
  transition: transform 0.6s, opacity 0.6s, color 0.6s;
	min-width: 95px;  
}


.flip-out {
  transform: rotateX(90deg);
  opacity: .1;
}

/* Nudge for translatorWord */
.nudge-text {
  display: inline-block;
  /* make it transformable */
  transition: transform 0.4s ease;
  /* smooth movement */
}

@keyframes nudgeLeft {
  0% {
    transform: translateX(0)
  }

  50% {
    transform: translateX(-10px)
  }

  100% {
    transform: translateX(0)
  }
}

@keyframes nudgeRight {
  0% {
    transform: translateX(0)
  }

  50% {
    transform: translateX(10px)
  }

  100% {
    transform: translateX(0)
  }
}

.xnudge-left {
  animation: nudgeLeft 320ms ease;
}

.xnudge-right {
  animation: nudgeRight 320ms ease;
}

@media (prefers-reduced-motion: reduce) {

  .flip-out,
  .nudge-left,
  .nudge-right {
    transition: none;
    animation: none;
  }
}

footer {
  background: #f8f9fa;
  padding: 1rem;
  border-top: 1px solid #ddd;
}

.bmc-button img {
  height: 34px !important;
  width: 35px !important;
  margin-bottom: 1px !important;
  box-shadow: none !important;
  border: none !important;
  vertical-align: middle !important;
}

.bmc-button {
  padding: 7px 10px 7px 10px !important;
  line-height: 35px !important;
  height: 51px !important;
  min-width: 217px !important;
  text-decoration: none !important;
  display: inline-flex !important;
  color: #ffffff !important;
  background-color: #5F7FFF !important;
  border-radius: 5px !important;
  border: 1px solid transparent !important;
  padding: 7px 10px 7px 10px !important;
  font-size: 28px !important;
  letter-spacing: 0.6px !important;
  box-shadow: 0px 1px 2px rgba(190, 190, 190, 0.5) !important;
  -webkit-box-shadow: 0px 1px 2px 2px rgba(190, 190, 190, 0.5) !important;
  margin: 0 auto !important;
  font-family: 'Cookie', cursive !important;
  -webkit-box-sizing: border-box !important;
  box-sizing: border-box !important;
  -o-transition: 0.3s all linear !important;
  -webkit-transition: 0.3s all linear !important;
  -moz-transition: 0.3s all linear !important;
  -ms-transition: 0.3s all linear !important;
  transition: 0.3s all linear !important;
}

.bmc-button:hover,
.bmc-button:active,
.bmc-button:focus {
  -webkit-box-shadow: 0px 1px 2px 2px rgba(190, 190, 190, 0.5) !important;
  text-decoration: none !important;
  box-shadow: 0px 1px 2px 2px rgba(190, 190, 190, 0.5) !important;
  opacity: 0.85 !important;
  color: #ffffff !important;
}
