* {
  box-sizing: border-box;
}

body {
  height: 100vh; /* Fallback for browsers that do not support Custom Properties */
  height: calc(var(--vh, 1vh) * 100);
  overflow: hidden;
  width: 100vw;
  display: flex;
  background-color: black;
  position: relative;
  /* font-family: Helvetica; */
  font-family: 'dystopian', Courier, monospace;
  color: white;
}

h1 {
  /* font-family: Helvetica; */
  font-family: 'dystopian', Courier, monospace;
  font-weight: bold;
  font-size: 40px;
  margin-bottom: 20px;
  color: white;
  hyphens: manual;
}

p,
a {
  font-size: 22px;
  line-height: 30px;
}

.container {
  /* padding: 100px; */
  overflow-y: scroll;
  max-width: 600px;
  margin: 0 auto;
  width: 100%;
  display: flex;
  flex-direction: column;
  height: 100%;
  position: relative;
}

.wrapper {
  width: 100%;
  display: flex;
  align-items: flex-start;
  padding: 45px 45px;
}

.morse-translation {
  color: white;
  font-size: 23px;
  line-height: 40px;
  font-weight: 400;
  font-family: 'dystopian';
  hyphens: auto;
}

.morse-translation span {
  display: inline-block;
}

form {
  /* height: 100%; */
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

/* BORDER */
/**********/
.turning-text>div {
  display: flex;
  align-items: center;
  padding: 0 40px;
}

.top-bar {
  height: 40px;
  position: absolute;
  top: 0;
  right: 0;
  left: 0;
  transform: rotate(180deg);
  transform-origin: center;
}

.bottom-bar {
  height: 40px;
  position: absolute;
  bottom: 0;
  right: 0;
  left: 0;
}

.right-bar {
  width: 100vh;
  width: calc(var(--vh, 1vh) * 100);
  height: 40px;
  position: absolute;
  right: 20px;
  top: -20px;
  transform: rotate(-90deg);
  transform-origin: right;
}

.left-bar {
  width: 100vh;
  width: calc(var(--vh, 1vh) * 100);
  height: 30px;
  position: absolute;
  left: 20px;
  top: -20px;
  transform: rotate(90deg);
  transform-origin: left;
}

.rotation {
  line-height: 1.2;
  overflow: hidden;
  position: relative;
  white-space: nowrap;
  width: 100%;
}

.rotation__line__wrapper {
  position: relative;
  width: 100%;
}

.rotation__line {
  display: inline-block;
  animation: marquee 50s linear infinite;
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
  padding: 0 0.25rem 0 0;
  will-change: transform;
  padding-left: 0;
  margin-left: 0;
}

.rotation__line__wrapper+.rotation__line__wrapper .rotation__line {
  animation-direction: reverse;
}

.rotation__line+.rotation__line {
  animation: marquee-duplicate 50s -25s linear infinite;
}

/* .rotation__line a {
  text-decoration: none;
  transition: color 0.5s cubic-bezier(0.165, 0.84, 0.44, 1);
}

.rotation__line a::before {
  content: "";
  display: block;
  position: absolute;
  top: 100%;
  left: -5px;
  right: -5px;
  bottom: 0;
  background-color: #000000;
  z-index: -99;
  transition: top 0.5s cubic-bezier(0.165, 0.84, 0.44, 1);
}

.rotation__line a:hover {
  color: #fff;
}

.rotation__line a:hover::before {
  top: 0;
} */

.rotation__line li {
  display: inline-block;
  position: relative;
  margin-right: 55px;
  margin-left: 10px;
  text-align: -webkit-match-parent;
  font-size: 20px;
  font-size: 2rem;
  font-family: Helvetica, Arial, Verdana, sans-serif;
  font-weight: 300;
  font-weight: 200;
  color: white;
  text-transform: uppercase;
}

.rotation__line li::after {
  content: "";
  display: block;
  position: absolute;
  top: 50%;
  right: -55px;
  -ms-transform: translateY(50%);
  transform: translateY(50%);
  width: 45px;
  height: 1px;
  border-bottom: 1px solid white;
  background-color: transparent;
}

/* @media (min-width: 768px) {
    .rotation__line li {
      font-size: 30px;
      font-size: 3rem;
      margin-right: 85px;
      margin-left: 10px;
    }
    .rotation__line li::after {
      right: -85px;
      width: 75px;
    }
  } */

@keyframes marquee {
  0% {
    transform: translate3d(-100%, 0, 0);
  }

  to {
    transform: translate3d(100%, 0, 0);
  }
}

@keyframes marquee-duplicate {
  0% {
    transform: translate3d(-200%, 0, 0);
  }

  to {
    transform: translateZ(0);
  }
}

/* @keyframes marquee-ie {
  0% {
    transform: translateX(-100%);
  }

  to {
    transform: translateX(100%);
  }
}

@keyframes marquee-duplicate-ie {
  0% {
    transform: translateX(-200%);
  }

  to {
    transform: translateX(0);
  }
} */

/**************/


fieldset {
  position: relative;
}

textarea {
  width: 100%;
  /* height: 100%; */
  /* font-family: Helvetica; */
  font-family: 'dystopian', Courier, monospace;
  font-size: 23px;
  border: none;
  background-color: transparent;
  color: white;
}

textarea:focus {
  outline: none !important;
  border: none;
  box-shadow: none;
}

input[type="submit"],
a.button {
  background-color: white;
  color: black;
  border: none;
  border-radius: 0px !important;
  appearance: none;
  -webkit-border-radius: 0px;
  -webkit-appearance: none;
  font-family: 'dystopian', Courier, monospace;
  padding: 20px;
  font-weight: bold;
  font-size: 20px;
  line-height: 20px;
  align-self: flex-start;
  text-decoration: none;
  display: inline-block;
  position: relative;
  z-index: 99;
}

input[disabled="disabled"] {
  user-select: none;
  background-color: grey;
}

.button-submit {
  display: flex;
  align-items: flex-end;
}

.button-submit label {
  margin-left: 10px;
  color: grey;
  opacity: 1;
  transition: all 0.5s ease;
}

.button-submit label.invisible {
  opacity: 0;
}

#typewriter {
  height: 30px;
  border-bottom: 2px solid white;
  width: 10px;
  display: inline-block;
  position: absolute;
  top: 7px;
  left: 2px;
  display: none;
}

@media (min-width: 480px) {
  h1 {
    font-size: 40px;
    margin-bottom: 20px;
  }

  .morse-translation {
    font-size: 40px;
  }

  /* .sending-animation {
      top: 80px;
      left: 80px;
      bottom: 80px;
      right: 80px;
    } */
  .wrapper {
    padding: 50px 50px;
  }

  .top-bar {
    height: 45px;
  }

  .bottom-bar {
    height: 45px;
  }

  .right-bar {
    height: 50px;
    right: 25px;
    top: -25px;
  }

  .left-bar {
    height: 50px;
    left: 25px;
    top: -25px;
  }

  .mobile-split {
    display: none;
  }

  .mobile-split+span {
    display: inline;
  }

  .turning-text>div {
    padding: 0 40px;
  }

  .rotation__line li {
    font-size: 24px;
    font-size: 2.4rem;
  }

  input[type="button"] {
    font-size: 30px;
    line-height: 30px;
  }
}

/* FLASHING DOT */

.dot-flashing {
  position: relative;
  width: 10px;
  height: 10px;
  border-radius: 5px;
  background-color: white;
  color: white;
  animation: dot-flashing 1s infinite linear alternate;
  animation-delay: 0.5s;
  margin-left: 10px;
  display: inline-block;
  line-height: 30px;
}

.dot-flashing::before,
.dot-flashing::after {
  content: "";
  display: inline-block;
  position: absolute;
  top: 0;
}

.dot-flashing::before {
  left: -15px;
  width: 10px;
  height: 10px;
  border-radius: 5px;
  background-color: white;
  color: white;
  animation: dot-flashing 1s infinite alternate;
  animation-delay: 0s;
}

.dot-flashing::after {
  left: 15px;
  width: 10px;
  height: 10px;
  border-radius: 5px;
  background-color: white;
  color: white;
  animation: dot-flashing 1s infinite alternate;
  animation-delay: 1s;
}

@keyframes dot-flashing {
  0% {
    background-color: white;
  }

  50%,
  100% {
    background-color: rgba(255, 255, 255, 0.2);
  }
}

.sending-animation {
  position: absolute;
  top: 0;
  left: 0;
  bottom: 0;
  right: 0;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  user-select: none;
  z-index: 0;
  overflow: hidden;
}

.skybar {
  background-image: url('../images/arrow.svg');
  background-size: 100% auto;
  opacity: 1;
  min-width: 60px;
  padding: 0 5px;
  height: 0;
  transition: height 1.2s ease-out, opacity 0.7s ease-out 0.5s;
}

.skybar.shooting {
  opacity: 0;
  height: 100%;
}

.morse-container {
  opacity: 1;
  transform: translateY(0);
  transition: all 1s ease;
  position: relative;
  z-index: 1;
}

.fadeUp {
  opacity: 0;
  transform: translateY(-50px) !important;
}

.spacer {
  height: 20px;
}

.send-container {
  opacity: 0;
  transform: translateY(50px);
  transition: all 1s ease;
  position: relative;
  z-index: 1;
}

.send-container.fadeDown,
.share-container.fadeDown {
  opacity: 1;
  transform: translateY(0);
}

.noPageSpace {
  position: absolute !important;
}

.share-container {
  opacity: 0;
  transform: translateY(50px);
  transition: all 1s ease;
  position: relative;
  z-index: 1;
}

.share-text {
  color: white;
  font-family: 'dystopian';
  font-weight: 400;
  font-size: 24px;
  line-height: 32px;
}

.share-text a {
  color: white;
  text-decoration: underline;
}