html,
body,
#app,
#main {
  height: 100%;
  margin: 0;
  padding: 0;
}

html {
  -webkit-text-size-adjust: 100%;
  -moz-text-size-adjust: none;
  -ms-text-size-adjust: 100%;
}

body {
  background-color: #f5f5f5;
  color: #333;
  font-family: 'Roboto', sans-serif;
  font-weight: 300;
  font-size: 20px;
  line-height: 1.45;
  touch-action: none;
  overflow-x: hidden;
  -webkit-user-select: none;  /* Chrome all / Safari all */
  -moz-user-select: none;     /* Firefox all */
  -ms-user-select: none;      /* IE 10+ */
  user-select: none;          /* Likely future */    
}

body.rtl {
  direction: rtl;
}

@media screen and (min-width: 900px) and (max-width: 1140px) {
    #formulaDisplay {
        margin: 16px 80px 16px 80px !important;
        font-size: 16px !important;
    }
}

@media screen and (orientation: portrait) {
  #flip {
    display: block;
  }

  .tour-backdrop,
  .tour-tour {
    display: none !important;
  }
}

#flip h3 {
  margin-bottom: 48px;
}

#flip > .errorBody > div {
  white-space: nowrap;
}

#flip i {
  font-size: 200%;
}

#flip i {
  margin: 0 32px;
}

#main {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  justify-content: flex-start;
  height: 100%;
}

#header {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  padding: 10px;
}

#formulaDisplay {
  margin: 16px 150px 16px 150px;
}

#formulaDisplay > * {
  display: block;
  margin: auto;
}

#formulaDisplay > img {
  background: #fff;
  padding: 8px;
  margin-top: 10px;
  border: 1px solid #ccc;
  z-index: 1;
}

#handWrapper {
  direction: ltr;
  width: 100%;
  flex-grow: 1;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

#handContainer {
  width: 4000px;
  flex-grow: 1;
}

body.rtl #handContainer {
  direction: rtl;
}

#footer {
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  align-items: center;
  border-top: 1px solid #778e9a;
}

#footer > :first-child {
  flex-grow: 1;
}

#footer > :first-child > * {
  display: block;
  margin: auto;
  margin: 16px auto;
}

#footer > :first-child > div {
  text-align: center;
}

#footer > :first-child > div > * {
  vertical-align: middle;
  display: inline-block;
  margin: 0 8px;
}

#footer > :first-child > div > i {
  font-size: 200%;
}

#footer > :first-child > span {
  font-size: 11px;
  padding: 0 8px;
}

#controls {
  margin: 0 24px;
  white-space: nowrap;
}

#controls > button {
  margin: 8px;
  padding: 16px 32px;
}

#message {
  position: fixed;
  background: #fff;
  padding: 16px;
  left: 8px;
  bottom: 0;
  width: 260px;
  z-index: 100;
  font-size: 14px;
  text-align: center;
  box-shadow: 0px 11px 15px -7px rgba(0, 0, 0, 0.3), 0px 24px 38px 3px rgba(0, 0, 0, 0.3), 0px 9px 46px 8px rgba(0, 0, 0, 0.3);
  border-top-left-radius: 8px;
  border-top-right-radius: 8px;
  transition: transform 0.225s cubic-bezier(0, 0, 0.2, 1), box-shadow 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

body.rtl #message {
  left: auto;
  right: 8px;
}

#message.closed {
  transform: translateY(100%);
  box-shadow: none;
}

#message > * {
  display: block;
  margin-bottom: 8px;
}

#message > button {
  position: absolute;
  right: 8px;
  top: 8px;
  padding: 8px;
  background: transparent;
  border: none;
  box-shadow: none;
  color: #333;
}

body.rtl #message > button {
  right: auto;
  left: 8px;
}

.cover {
  background-color: #f5f5f5;
  display: none;
  position: fixed;
  left: 0;
  right: 0;
  top: 0;
  bottom: 0;
  z-index: 1000;
}

@keyframes spin {
  100% {
    transform: rotate(360deg);
  }
}

.rotating {
  animation: spin 4s linear infinite;
}

.errorBody {
  width: 80%;
  margin: auto;
  text-align: center;
}

.errorBody a {
  font-size: 150%;
  text-decoration: none;
  display: block;
  overflow: auto;
}

.errorBody > * {
  display: block;
  margin-bottom: 24px;
}

.title {
  width: 200px;
  padding: 16px 24px;
}

.title > a > img {
  width: 200px;
}

.title > h2 {
  text-align: center;
  font-size: 18px;
  margin: 0;
}

input {
  border: 1px solid #ccc;
  padding: 8px;
  background: #fff;
}

input[type=email] {
  width: 150px;
}

input[type=radio] {
  margin: 8px;
  vertical-align: middle;
}

button {
  font-size: inherit;
  border: 1px solid #f04a5e;
  background: #f04a5e;
  color: #fff;
  padding: 8px 16px;
  font-weight: 500;
  border-radius: 4px !important;
  cursor: pointer;
  box-shadow: 0 1px 3px rgba(0,0,0,0.12), 0 1px 2px rgba(0,0,0,0.24);
  -webkit-appearance: none;
  outline: none;
}

button.outlined {
  color: #f04a5e;
  background: none;
}

button.small {
  font-size: 14px;
}


/* Hand tweaks. */

.wrs_hand .wrs_toolbar {
  z-index: 1;
  position: sticky;
  width: 70px !important;
  left: 0;
}

.wrs_hand .wrs_toolbar .wrs_button {
  display: inline-block;
  width: 40px !important;
  height: 40px !important;
  margin-top: 20px !important;
}

.wrs_hand .wrs_toolbar .wrs_button img:not(.wrs_image) {
  width: 42px !important;
}

.wrs_hand .wrs_toolbar .wrs_button:last-child {
  display: none;
}

body.rtl .btn-group > .btn,
body.rtl .btn-group-vertical > .btn {
  float: right;
}

body.rtl .btn-group > .btn:first-child:not(:last-child):not(.dropdown-toggle) {
  border-bottom-left-radius: 0;
  border-top-left-radius: 0;
  border-bottom-right-radius: 4px;
  border-top-right-radius: 4px;
}

body.rtl .btn-group > .btn:last-child:not(:first-child),
body.rtl .btn-group > .dropdown-toggle:not(:first-child) {
  border-bottom-right-radius: 0;
  border-top-right-radius: 0;
  border-bottom-left-radius: 4px;
  border-top-left-radius: 4px;
}

.popover-navigation {
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  align-items: center;
}

body.rtl .popover[class*="tour-"] .popover-navigation *[data-role="end"] {
  float: left;
}

body.rtl .popover.top > .arrow:after,
body.rtl .popover.bottom > .arrow:after {
  margin-right: -10px;
}

#mathFormula {
    max-height: 65px;
}

.link {
  color: #000000;
  text-decoration: underline;
}

.primary-btn {
  color: #ffffff !important;
  background-color: #000000 !important;
  margin-right: 5px;
}