.calc * {
    box-sizing: border-box;
}

.calc {
    position: absolute;
    left: calc(100% - 250px);
    background-color: #fff;
    z-index: 2000;
}

.calc-header {
    height: 2em;
    background-color: #4d4d4d;
    cursor: move;
    touch-action: none;
}

.calc-draggable-icon {
    text-align: center;
    padding-top: 4px;
}

.calc-draggable-icon span {
    width: 4px;
    height: 4px;
    position: relative;
    margin-right: 1px;
    border-radius: 50%;
    display: inline-block;
    background-color: #888;
}

.calc-close-btn {
    background: none;
    border: none;
    right: 0;
    top: 7px;
    position: absolute;
    margin-right: 2px;
    color: #888;
    font-size: 16px;
}

.calc-close-btn:hover {
    cursor: default;
    color: #fff;
}

.calc-content {
    position: relative;
    border: 2px solid #4d4d4d;
    background: #ddd;
    display: flex;
    flex-direction: column;
    height: 312px;
    justify-content: space-between;
}

.calc-row {
    display: flex;
    flex-direction: row;
    width: 246px;
    justify-content: space-between;
}

.calc-btn {
    border: none;
    width: 60px;
    height: 60px;
    padding: 0;
    outline: none;
    font-size: 17px;
    background-color: #fbfbfb;
}

.calc-btn-accent {
    background-color: #e8e8e8;
}

.calc-btn:hover {
    cursor: pointer;
    background-color: #ddd;
}

.calc-btn:focus {
    -webkit-box-shadow: inset 0 0 0 1px #52a8ec;
    box-shadow: inset 0 0 0 1px #52a8ec;
}

.calc-btn:active {
    -webkit-box-shadow: inset 0 0 0 1px #52a8ec, inset 0 2px 12px #888;
    box-shadow: inset 0 0 0 1px #52a8ec, inset 0 2px 12px #888;
}

.calc-result {
    top: 0;
    right: 0;
    z-index: 1;
    background: #fff;
    line-height: 3.3;
    padding-left: 10px;
    padding-right: 10px;
    width: 184px;
    height: 60px;
    text-align: right;
    color: dimgray;
    border: none;
    cursor: auto;
    border-radius: 0;
    font-size: 18px;
    font-weight: 300;
    white-space: nowrap;
    overflow: scroll;
}