/* 8-bit font */
@font-face {
  font-family: 'Press Start 2P';
  font-style: normal;
  font-weight: 400;
  src: url('../fonts/press-start-2p-v8-latin-regular.eot'); /* IE9 Compat Modes */
  src: local('Press Start 2P Regular'), local('PressStart2P-Regular'),
       url('../fonts/press-start-2p-v8-latin-regular.eot?#iefix') format('embedded-opentype'), /* IE6-IE8 */
       url('../fonts/press-start-2p-v8-latin-regular.woff2') format('woff2'), /* Super Modern Browsers */
       url('../fonts/press-start-2p-v8-latin-regular.woff') format('woff'), /* Modern Browsers */
       url('../fonts/press-start-2p-v8-latin-regular.ttf') format('truetype'), /* Safari, Android, iOS */
       url('../fonts/press-start-2p-v8-latin-regular.svg#PressStart2P') format('svg'); /* Legacy iOS */
}
/* Stop selection on the page as it interferes with touch on the controller */
body {
  -webkit-touch-callout: none;
  -webkit-user-select: none;
  -khtml-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
}

@media(max-width: 768px) {
  body {
    font-size: 12px;
  }
  .title {
    font-size: 14px;
  }
}

@media(max-width: 560px) {
  body {
    font-size: 10px;
  }
  .title {
    font-size: 12px;
  }
}

/* Main page layout */
#main {
  display: table;
  height: 100%;
  width: 100%;
}
#controller-svg-div {
  display: table-row;
  height: 0;
}
#below-controller-content {
  height: auto;
  display: none;
}

/* Buttons at the top */
#header-buttons {
  margin: 10px 0px;
  text-align: center;
  white-space: nowrap;
}

#button-connect,
#button-settings,
#button-hex {
  width: -moz-calc(33% - 14px);
  width: -webkit-calc(33% - 14px);
  width: -o-calc(33% - 14px);
  width: calc(33% - 14px);
  margin: 0;
  white-space: nowrap;
}

@media(max-width: 560px) {
  #header-buttons {
    margin: 8px 0px;
  }
  #button-connect,
  #button-settings,
  #button-hex {
    width: -moz-calc(33% - 10px);
    width: -webkit-calc(33% - 10px);
    width: -o-calc(33% - 10px);
    width: calc(33% - 10px);
    padding: 3px 3px;
  }
}

/* Controller */
#controller-svg {
  width: 100%;
  height: auto;
}

.controller-buttons:hover {
  /* cursor: pointer; */
}
.controller-buttons:active {
  transform: translateY(0.2%);
}

#controller-outer-box {
  stroke: #1a1a1a;
  stroke-width: 1px;
  stroke-opacity: 0.2;
}

#full-screen-icon {
  z-index: 2;
  position: absolute;
  height: 40px;
  margin-top: 1%;
  right: 3%;
  opacity: 0.7;
}

/* Commands area */
#commands-log {
  height: -moz-calc(100vh - 190px);
  height: -webkit-calc(100vh - 190px);
  height: -o-calc(100vh - 190px);
  height: calc(100vh - 190px);
  overflow-x: hidden;
  overflow-y: scroll;
  margin: 1rem !important;
}
.data-list {
  margin-top: 12px;
}
#below-controller-content > .title {
  position: absolute;
  left: -moz-calc(50% - 50px);
  left: -webkit-calc(50% - 50px);
  left: -o-calc(50% - 50px);
  left: calc(50% - 50px);
  z-index: 10;
  display: table;
  margin: 0rem auto 0rem;
  padding: 0px 15px;
  line-height: 0.5rem;
  font-size: 1rem;
  background-color: #fff;
}
#commands-log > p {
  padding: 0;
  margin: 0;
}

@media(max-width: 768px) {
  .nes-container {
    padding: 1.5rem 1rem;
  }
}

/* Settings modal */
#settings-modal {
  position: absolute;
  height: 100%;
  width: 100%;
  margin: 0;
  padding: 0;
  background-color: #000000AA;
  z-index: 1000;
  display: none;
}

#settings-modal > .nes-dialog {
  background-color: white;
  border: 4px solid black;
  max-height: 90%;
  width: 90%;
  margin: 5%;
  overflow-y: scroll;
  overflow-x: hidden;
}

.nes-field {
  margin: 25px 10px;
}
.nes-select {
  margin: 0px 0px 0px 10px;
}

#settings-close {
  position: absolute;
  float: right;
  margin: 5% 5% 0 0;
  padding: 0;
  right: 36px;
  top: 24px;
}

/* Install Banner */
#install-banner {
  align-content: center;
  justify-content: center;
  max-width: 100%;
  padding: 15px 5px 5px 5px;
  margin: -15px 15px 15px 15px;
  line-height: 2rem;
  display: none;
}
@media(max-width: 560px) {
  #install-banner {
    line-height: 2.5rem;
  }
}

#install-banner > button {
  line-height: 1rem;
  padding: 3px 6px;
  float: right;
  margin-right: 15px;
}

#install-banner > a {
   float: right;
}

#install-banner > a > i {
  padding: 0px 0px 0px 0px;
  margin: 0px 0px 0px 0px;
}
