.keyboard {
    padding-left: 10%;
    width: 40%;
    width: calc(40% - 8px);
    margin-top: 20px;
}

.keyboard-line {
    display: flex;
    justify-content: center;
    flex-shrink: 1;
    margin-right: -5px;
}

.keyboard .button {
    position: relative;
    padding-top: 7px;
    padding-bottom: 7px;
    font: inherit;
    color: inherit;
    border: none;
    border-radius: 4px;
}

.keyboard .button::before {
    content: "";
    position: absolute;
    z-index: -1;
    padding: 1px;
    width: 100%;
    height: 100%;
    top: -1px;
    left: -1px;
    border-radius: 5px;
    background-image: linear-gradient(to bottom, #1a2133, #222c44);
}

.keyboard .button.clear {
    margin-left: auto;
    padding-left: 15px;
    padding-right: 15px;
}

.keyboard .key {
    margin-right: 5px;
    margin-bottom: 5px;
    padding-left: 0;
    padding-right: 0;
    flex-grow: 1;
    font-size: 24px;
    line-height: 26px;
}

.keyboard .space {
    height: 40px;
}

.keyboard .key.enter {
    width: 20%;
}

.keyboard .key.enter.not-opposite-only {
    width: 10%;
}

.keyboard .button:focus {
    outline: 3px solid rgba(252, 230, 239, 0.3);
    outline-offset: 1px;
}

.keyboard .button:hover {
    background: #fff;
}

.keyboard .button:active {
    background-color: #d9d9d9;
}

.ts-action-button, .ts-action-button:hover {
    right: 2px;
}

.ts-action-button a, .ts-action-button a:hover {
    display: inline-block;
    color: #27c79a;
    font-size: 14px;
    text-decoration: none;
    margin-left: 5px;
    cursor: pointer;
    padding: 3px 10px;
    border-radius: 4px;
}

.ts-action-button a.active, .ts-action-button a:hover {
    background: #27c79a;
    color: #fff;
}

.key[disabled] {
    cursor: not-allowed;
    background: #ccc;
    opacity: .5;
    color: #000;
}

.key.active, .key.active:hover {
    background: #1a2133;
    color: #fff;
}

.key::after {
    content: attr(data-shift);
    position: absolute;
    font-size: 50%;
    top: -5px;
    right: 5px;
    opacity: .7;
}

.key.shifted::after {
    content: "";
}


.keyboard .mobile-visible {
    display: none;
}

@media only screen and (max-width: 690px) {
    .keyboard {
        width: auto;
        padding: 20px 2%;
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        background: #fff;
        box-shadow: 0px 0px 20px -5px rgb(0 0 0 / 40%);
    }
    
    .keyboard .mobile-hidden {
        display: none!important;
    }
    
    .keyboard .mobile-visible {
        display: initial;
    }
    
    .keyboard .space {
        width: 75%;
    }
}