* {
    margin: 0;
    padding: 0;
    touch-action: manipulation;
}

.unselectable {
    -webkit-touch-callout: none;
    -webkit-user-select: none;
    -khtml-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
}

html {
  overflow-x: hidden;
  overflow-y: scroll;
  margin-right: calc(-1 * (100vw - 100%));
}

body {
    height: 100vh;
}

#text-to-morse {
    height: 100vh;
}

.unscrollable {
    overflow: hidden;
}

@keyframes correct-flash {
  0% { background-color: lightgreen; }
  100% { background-color: white; }
}

@keyframes fade-from-bottom {
    0% {opacity: 0; margin-top: 50px}
    100% {opacity: 1; margin-top: 0px}
}

@keyframes fade-from-right {
    0% {opacity: 0; margin-left: 50px}
    100% {opacity: 1; margin-left: 0px}
}

@keyframes fade-out-anim {
    0% {opacity: 100%}
    100% {opacity: 0%}
}

@keyframes fade-in-anim {
    0% {opacity: 0%}
    100% {opacity: 100%}
}

.fade-out {
    animation: fade-out-anim 0.1s ease;
}

.fade-in {
    animation: fade-in-anim 0.5s ease;
}

#spinner {
    position: absolute;
    top: 0;
    bottom: 0;
    left: 0;
    right: 0;
    margin: auto;
}

.is-pressed {
    background-color: #F5F5F5;
} 

.tab-caption {
    text-align: center;
}

.hidden { 
    display: none !important;
    visibility: hidden;
}

.text-display{
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    row-gap: 2em;
}


#morse-text, #translated-text {
    font-size: 50px;
    height: 50px;
}

#level-progression-screen {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    height: 200px;
    gap: 25px;
    animation: fade-from-bottom 1s ease;
}

#level-title {
    animation-name: fade-from-right;
    animation-duration: 3s;
}

#level-caption {
    animation-name: fade-from-right;
    animation-duration: 3s;
}

#input-display {
    display: flex;
    column-gap: 10px;
}

.letter-input {
    text-align: center;
    border: lightgray 3px solid;
    font-size: 50px;
    width: 75px;
    height: 75px;
    transition: border-color 0.1s ease;
}

.selected-letter {
    border-color: #0d6efd;
}

#morse-button {
    border: 2px black solid;
    border-radius: 100%;
    width: 100px;
    height: 100px;
    margin: 1em;
}

#current-word {
    font-size: 100px;
}

.correct-letter {
    color: green;
}

.incorrect-letter {
    color: red;
}

.nearly-correct-letter {
    color:  gray;
}

.correct-letter-box {
    border-color: green;
    background-color: rgba(0, 255, 0, 0.1);
}

.incorrect-letter-box {
    border-color: red;
    background-color: rgba(255, 0, 0, 0.1);
}

#morse-tooltips h6 {
    color: gray;
    text-align: center;
    white-space: nowrap;
}

.level-group {
    border-top: lightgray 1px solid;
    margin-top: 50px;
    padding-top: 25px;
}

.level-buttons {
    margin: 50px px 50px 0px;
    display: grid;
    grid-template-columns: repeat(auto-fill, 100px);
    row-gap: 25px
}

.level-buttons button {
    background-color: white;
    text-align: center;
    text-decoration: none;
    font-size: 50px;
    font-weight: lighter;
    color: darkgray;
    width: 75px;
    height: 75px;
    border-radius: 10%;
    padding: auto;
    border: lightgray 2px solid;
}

.level-buttons button:hover {
    color: #0D6EFD;
    background-color: #F0F0FF;
}

.level-buttons button:active {
    color: #0D6EFD;
    background-color: #E0E0FF;
}

.level-group p {
    color: #999999;
}

.letterHighlight {
    color: #0D6EFD;
}

#message-container {
    margin: 25px 75px 25px 75px;
    border: darkgray 2px solid;
    padding: 10px;
    height: 55vh;
    overflow-y: scroll;
    scroll-snap-type: y proximity;
    background-color: #F0F0F0;
}

.message {
    display: flex;
    align-items: center;
    border-bottom: 1px solid lightgray;
    padding-bottom: 3px;
}

.message-header {
    display: inline-block;  
    float: left;
}

.message-header h6 {
    margin: 0;
    margin-right: 5px;
    font-size: 20px;
}

.message-content {
    font-size: 20px;
    display: inline-block;  
    float: left;
}

#current-morse, current-word {
    margin: 0;
}

#currently-typing {
    background-color: #DDDDDD;
    font-size: 20px;
}

.gear-icon {
    fill: white;
}

#level-caption-text {
    margin: 0;
}

#keyboard {
    margin: 1em;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.keyboard-row {
    margin-top: 5px;
    display: flex;
    justify-content: center;
}

.key {
    font-size: 20px;
    border-radius: 5px;
    border: lightgray solid 1px;
    margin: 0px 3px 0px 3px;
    padding: 3px 15px 3px 15px;
}

.key:hover {
    background-color: lightgray;
}

.key:active {
    background-color: #BBBBBB;
}

.delete-key {
    background-color: #dc3545;
    color: white;
}

.delete-key:hover {
    background-color: #bb2d3b;
}

#chatroom-footer .btn {
    width: 20%;
}