/**
 * 1 = Lappier
 * 2 = Compé
 * 3 = Lappy 486
 * 4 = Compy 386
 * 5 = Tandy 400
 */

#sbemails {
  padding-top: 2rem;
}

.sbemails-style-1 {
  font-family: lores-12, monospace;
}

.sbemails-style-2 {
  font-family: lores-12, monospace;
}

.sbemails-style-3 {
  font-family: lores-12, monospace;
}

.sbemails-style-4 {
  font-family: lores-9-wide, monospace;
  font-weight: bold;
}

.sbemails-style-5 {
  font-family: bd-geminis, monospace;
}

#sbemails_container {
  border-radius: 20px;
  width: 100%;
  max-width: 1100px;
  padding-top: 72%;
  margin: 0 auto;
  position: relative;
  overflow: hidden;
  background-size: 100% 100%;
  background-image: url('/assets/sbemails/sbemail_menu_bg.png');
}

#the_man_himself {
  position: absolute;
  right: 20%;
  bottom: -20%;
  z-index: 1;
  pointer-events: none;
  max-height: 100%;
  user-select: none;
  transform-origin: bottom center;
}

#the_man_himself.talking-1 {
  animation: headWaggle 1s steps(1) infinite;
}

#the_man_himself.talking-2 {
  animation: headBob 1s steps(1) infinite;
}

#the_man_himself.talking-3 {
  animation: headWaggleAndBob 1s steps(1) infinite;
}

@keyframes headWaggle {
  0% { bottom: -20%; transform: rotate(0deg); }
  8.3% { bottom: -18%; transform: rotate(0deg); }
  16.6% { bottom: -16%; transform: rotate(0deg); }
  25% { bottom: -18%; transform: rotate(0deg); }
  33.3% { bottom: -20%; transform: rotate(0deg); }
  42.7% { bottom: -20%; transform: rotate(-2deg); }
  50% { bottom: -20%; transform: rotate(-4deg); }
  58.3% { bottom: -20%; transform: rotate(-2deg); }
  66.7% { bottom: -20%; transform: rotate(0deg); }
  75% { bottom: -20%; transform: rotate(2deg); }
  83.3% { bottom: -20%; transform: rotate(4deg); }
  92.6% { bottom: -20%; transform: rotate(2deg); }
  100% { bottom: -20%; transform: rotate(0deg); }
}

@keyframes headBob {
  0% { bottom: -20%; transform: rotate(0deg); }
  8.3% { bottom: -18%; transform: rotate(0deg); }
  16.6% { bottom: -17%; transform: rotate(0deg); }
  25% { bottom: -18%; transform: rotate(0deg); }
  33.3% { bottom: -17%; transform: rotate(0deg); }
  42.7% { bottom: -18%; transform: rotate(0deg); }
  50% { bottom: -20%; transform: rotate(0deg); }
  58.3% { bottom: -20%; transform: rotate(0deg); }
  66.7% { bottom: -20%; transform: rotate(0deg); }
  75% { bottom: -20%; transform: rotate(0deg); }
  83.3% { bottom: -20%; transform: rotate(0deg); }
  92.6% { bottom: -20%; transform: rotate(0deg); }
  100% { bottom: -20%; transform: rotate(0deg); }
}

@keyframes headWaggleAndBob {
  0% { bottom: -20%; transform: rotate(0deg); }
  8.3% { bottom: -20%; transform: rotate(-2deg); }
  16.6% { bottom: -20%; transform: rotate(-4deg); }
  25% { bottom: -20%; transform: rotate(-2deg); }
  33.3% { bottom: -20%; transform: rotate(0deg); }
  42.7% { bottom: -20%; transform: rotate(2deg); }
  50% { bottom: -20%; transform: rotate(4deg); }
  58.3% { bottom: -18%; transform: rotate(2deg); }
  66.7% { bottom: -16%; transform: rotate(0deg); }
  75% { bottom: -18%; transform: rotate(0deg); }
  83.3% { bottom: -20%; transform: rotate(0deg); }
  92.6% { bottom: -20%; transform: rotate(0deg); }
  100% { bottom: -20%; transform: rotate(0deg); }
}

#scrollzone {
  position: absolute;
  right: 0;
  top: 0;
  bottom: 0;
  width: 30px;
  background: repeating-conic-gradient(#808080 0% 25%, transparent 0% 50%) 
              50% / 6px 6px;
  cursor: pointer;
}

.sbemails-style-5 #scrollzone {
  background: repeating-conic-gradient(#00BB00 0% 25%, transparent 0% 50%) 
              50% / 6px 6px;
}

#sbemails_bg {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 2;
  pointer-events: none;
  max-width: 100%;
  height: auto;
  user-select: none;
}

#sbemails_screen {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 30;
  pointer-events: none;
  max-width: 100%;
  height: auto;
  user-select: none;
}

#sbemails_logo {
  position: absolute;
  left: 5%;
  bottom: 7.5%;
  z-index: 20;
  width: 12%;
  height: 5%;
  cursor: pointer;
  user-select: none;
}

#go_rando {
  position: absolute;
  background: black;
  top: 10.2%;
  right: 13%;
  text-align: right;
  cursor: pointer;
  user-select: none;
  color: white;
  border: none;
  font-size: 24px;
  z-index: 25;
}

.sbemails-style-5 #go_rando {
  color: #00BB00;
  background: none;
}

.sbemails-style-2 #sbemails_logo {
  left: 8.5%;
  width: 10.5%;
  bottom: 9.5%;
}

.sbemails-style-3 #sbemails_logo {
  left: 7.9%;
  bottom: 5.9%;
}

.sbemails-style-4 #sbemails_logo {
  left: 7%;
  bottom: 11.25%;
  width: 16%;
  height: 4%;
}

.sbemails-style-5 #sbemails_logo {
  left: 3%;
  bottom: 6.5%;
  width: 6%;
  height: 8.5%;
}

#sbemails_list {
  list-style: none;
  position: absolute;
  top: 11%;
  left: 7%;
  right: 10%;
  bottom: 22%;
  padding-right: 20px;
  z-index: 10;
  overflow-y: scroll;
  overflow-x: hidden;
}

#sbemails_list::-webkit-scrollbar {
  width: 30px;
}

#sbemails_list::-webkit-scrollbar-track {
  background: #777777;
  border: 2px solid white;
}

#sbemails_list::-webkit-scrollbar-thumb {
  background: #CCCCCC;
  border: 2px solid white;
}

#sbemails_list::-webkit-scrollbar-button {
  height: 40px;
}

#sbemails_list::-webkit-scrollbar-button:vertical:start:decrement {
  display: block;
  background:
      linear-gradient(120deg, white 40%, rgba(0, 0, 0, 0) 41%),
      linear-gradient(240deg, white 40%, rgba(0, 0, 0, 0) 41%),
      linear-gradient(0deg, white 30%, rgba(0, 0, 0, 0) 31%);
  background-color: #333333;
}

#sbemails_list::-webkit-scrollbar-button:vertical:end:increment {
  display: block;
  background:
      linear-gradient(300deg, white 40%, rgba(0, 0, 0, 0) 41%),
      linear-gradient(60deg, white 40%, rgba(0, 0, 0, 0) 41%),
      linear-gradient(180deg, white 30%, rgba(0, 0, 0, 0) 31%);
  background-color: #333333;
}

.sbemails-style-5 #sbemails_list::-webkit-scrollbar-track {
  background: #001100;
  border: 2px solid #00BB00;
}

.sbemails-style-5 #sbemails_list::-webkit-scrollbar-thumb {
  background: #006600;
  border: 2px solid #00BB00;
}

.sbemails-style-5 #sbemails_list::-webkit-scrollbar-button:vertical:start:decrement {
  background:
      linear-gradient(120deg, #00BB00 40%, rgba(0, 0, 0, 0) 41%),
      linear-gradient(240deg, #00BB00 40%, rgba(0, 0, 0, 0) 41%),
      linear-gradient(0deg, #00BB00 30%, rgba(0, 0, 0, 0) 31%);
  background-color: #001100;
}

.sbemails-style-5 #sbemails_list::-webkit-scrollbar-button:vertical:end:increment {
  background:
      linear-gradient(300deg, #00BB00 40%, rgba(0, 0, 0, 0) 41%),
      linear-gradient(60deg, #00BB00 40%, rgba(0, 0, 0, 0) 41%),
      linear-gradient(180deg, #00BB00 30%, rgba(0, 0, 0, 0) 31%);
  background-color: #001100;
}

#sbemails_list li {
  font-size: 24px;
}

#sbemails_list li.selected {
  background: white;
  color: black;
}

#sbemails_list li.selected button {
  color: black;
}

#sbemails_list li.selected-flash button {
  animation: selectedFlash 0.25s;
  animation-timing-function: linear;
  animation-iteration-count: 6;
}

.sbemails-style-5 #sbemails_list li.selected {
  background: #00BB00;
}

.sbemails-style-5 #sbemails_list li.selected button {
  color: white;
}

.sbemails-style-5 #sbemails_list li.selected-flash button {
  animation: selectedFlashRetro 0.25s;
  animation-timing-function: linear;
  animation-iteration-count: 6;
}

@keyframes selectedFlash {
  0% { background: none; }
  49% { background: none; color: white; }
  50% { background: white; color: black; }
  99% { background: white; color: black; }
  100% { background: none; }
}

@keyframes selectedFlashRetro {
  0% { background: none; color: #00BB00; }
  49% { background: none; color: #00BB00; }
  50% { background: #00BB00; color: white !important; }
  99% { background: #00BB00; color: white !important; }
  100% { background: none; color: #00BB00; }
}

#sbemails_list li button {
  text-align: left;
  cursor: pointer;
  color: white;
  background: none;
  border: none;
  width: 50%;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

#sbemails_list li button:focus {
  outline: 0;
}

#sbemails_list li .sbemail-buttons {
  width: 75px;
  display: inline-block;
  user-select: none;
}

#sbemails_scanlines {
  display: none;
}

.sbemails-style-2 #sbemails_list {
  bottom: 24.5%;
}
.sbemails-style-3 #sbemails_list {
  bottom: 24.5%;
}
.sbemails-style-4 #sbemails_list {
  bottom: 26%;
}
.sbemails-style-5 #sbemails_list {
  bottom: 26.5%;
}

.sbemails-style-5 #sbemails_list li button {
  color: #00BB00;
}

.sbemails-style-5 #sbemails_scanlines {
  display: block;
  pointer-events: none;
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 2;
  background: url("/assets/sbemails/monitor5_scanlines.png") repeat;
  background-position-x: 80px;
  overflow: hidden;
  animation: scanlines 12s steps(12, end) infinite;
}

@keyframes scanlines {
  0% { background-position-y: 0; }
  8.3% { background-position-y: -100px; }
  16.6% { background-position-y: -200px; }
  25% { background-position-y: -300px; }
  33.3% { background-position-y: -400px; }
  42.7% { background-position-y: -500px; }
  50% { background-position-y: -600px; }
  58.3% { background-position-y: -700px; }
  66.7% { background-position-y: -800px; }
  75% { background-position-y: -900px; }
  83.3% { background-position-y: -1000px; }
  92.6% { background-position-y: -1100px; }
  100% { background-position-y: -1200px; }
}

.sbemail-icon {
  height: 28px;
  width: auto;
  image-rendering: crisp-edges;
  user-select: none;
}

.sbemail-icon-green {
  display: none;
}

.sbemails-style-5 .sbemail-icon-green {
  display: inline-block;
}

.sbemails-style-5 .sbemail-icon-color {
  display: none;
}

#sbemails_list .sbemail-description {
  color: white;
  line-height: 1.2;
  border: 5px solid white;
  border-top: 20px solid white;
  padding: 5px 15px;
  width: 90%;
  margin: 0.25rem 0 1rem;
  box-shadow: 5px 5px black, 10px 10px white;
}

.sbemails-style-5 #sbemails_list .sbemail-description {
  color: #00BB00;
  border-color: #00BB00;
  box-shadow: 5px 5px black, 10px 10px #00BB00;
}

#sbemails_list .sbemail-description.collapsing {
  -webkit-transition: none;
  transition: none;
  display: none;
}

#sbemails_list .sbemail-description p {
  margin-bottom: 0;
}

#sbemails_list .sbemail-description .sbemail-time {
  text-align: right;
  display: block;
  width: 100%;
}

#sbemails_infobox {
  position: absolute;
  padding: 5px;
  left: 10%;
  right: 10%;
  bottom: 15%;
  z-index: 4;
  user-select: none;
  background: #BBBBBB;
  color: #777777;
  font-size: 21px;
  line-height: 1.2;
  opacity: 0.5;
}

#sbemails_mobile_infobox {
  position: relative;
  display: none;
  width: 100%;
  margin-top: 0.5rem;
  border-radius: 20px;
  padding: 5px 30px 5px 5px;
  z-index: 4;
  user-select: none;
  background: #BBBBBB;
  color: #777777;
  font-size: 16px;
  line-height: 1.1;
  opacity: 0.5;
}

#sbemails_mobile_infobox #scrollzone {
  border-top-right-radius: 20px;
  border-bottom-right-radius: 20px;
}

.sbemail-info {
  user-select: none;
  pointer-events: none;
  white-space: nowrap;
}

#sbemails_mobile_infobox .sbemail-info {
  max-width: 200px !important;
  min-width: auto !important;
}

#sbemails_infobox .sbemail-icon {
  height: 34px;
  margin: 10px;
  width: auto;
  image-rendering: crisp-edges;
  float: left;
}

#sbemails_mobile_infobox .sbemail-icon {
  height: 24px;
  margin: 5px;
  width: auto;
  image-rendering: crisp-edges;
  float: left;
}

.sbemails-style-2 #sbemails_infobox {
  bottom: 18%;
}

.sbemails-style-3 #sbemails_infobox {
  bottom: 18%;
}

.sbemails-style-4 #sbemails_infobox {
  bottom: 19%;
}

.sbemails-style-4 .sbemail-info:first-child {
  min-width: 400px !important;
}

.sbemails-style-5 #sbemails_infobox, .sbemails-style-5 #sbemails_mobile_infobox {
  color: #00BB00;
  background: none;
  border: 3px solid #00BB00;
  padding-top: 10px;
}

.sbemails-style-5 #sbemails_infobox {
  bottom: 18%;
}

.sbemails-style-5 .sbemail-info:first-child {
  min-width: 350px !important;
}

/* Breakpoints! */

@media (max-width: 1199px) {
  .sbemails-style-4 .sbemail-info {
    line-height: 1;
  }
  #sbemails_list {
    bottom: 25%;
  }
  .sbemails-style-4 #sbemails_list {
    bottom: 28%;
  }
  .sbemails-style-5 #sbemails_list {
    bottom: 28%;
  }
}
@media (max-width: 991px) {
  #sbemails_list {
    bottom: 28%;
  }
  .sbemails-style-2 #sbemails_list {
    bottom: 29%;
  }
  .sbemails-style-3 #sbemails_list {
    bottom: 29%;
  }
  .sbemails-style-4 #sbemails_list {
    bottom: 30%;
  }
  .sbemails-style-5 #sbemails_list {
    bottom: 32%;
  }
  #sbemails_list li {
    font-size: 21px;
  }
  #sbemails_list li button {
    width: 70%;
  }
  .sbemails-style-5 #sbemails_scanlines {
    background-position-x: -200px;
    background-size: 900px;
  }
  .sbemail-info {
    line-height: 1.1;
  }
  .sbemail-info:first-child {
    min-width: 300px !important;
  }
  .sbemails-style-4 .sbemail-info {
    font-size: 16px;
    line-height: 1;
    margin-top: 10px;
  }
  .sbemails-style-4 .sbemail-info .sbemail-icon {
    margin-top: 0;
  }
  .sbemails-style-4 .sbemail-info:first-child {
    min-width: 320px !important;
  }
  #go_rando {
    right: 14.5%;
    font-size: 18px;
  }
}

@media (max-width: 767px) {
  #sbemails_list {
    padding-bottom: 0;
  }
  #sbemails_list {
    padding-left: 15px;
    bottom: 12%;
  }
  .sbemails-style-2 #sbemails_list {
    bottom: 14%;
  }
  .sbemails-style-3 #sbemails_list {
    bottom: 14%;
  }
  .sbemails-style-4 #sbemails_list {
    bottom: 14.5%;
  }
  .sbemails-style-5 #sbemails_list {
    bottom: 15%;
  }
  #sbemails_list li button {
    width: 70%;
  }
  #sbemails_list li {
    font-size: 20px;
  }
  .sbemails-style-5 #sbemails_scanlines {
    background-size: 700px;
  }
  #sbemails_infobox {
    display: none;
  }
  #sbemails_mobile_infobox {
    display: block;
  }
  #go_rando {
    top: 88%;
    right: 2%;
    border-radius: 20px;
    z-index: 40;
  }
  #go_rando:hover {
    opacity: 0.8;
  }
  #go_rando:active {
    opacity: 0.7;
  }
  .sbemails-style-5 #go_rando {
    background: black;
  }
}

@media (max-width: 575px) {
  #sbemails_list {
    padding-left: 10px;
    padding-right: 0;
  }
  #sbemails_list li {
    font-size: 19px;
  }
  #sbemails_list li button {
    width: 75%;
  }
  #sbemails_list li .sbemail-buttons {
    width: 52px;
  }
  #sbemails_list .sbemail-icon {
    height: 20px;
  }
  .sbemails-style-5 #sbemails_scanlines {
    background-position-x: -50px;
    background-size: 500px;
  }
}
