
/* Pop up */
.chess-area .board-table .top-controls {
    position: relative;
    display: flex;
    display: -webkit-flex;
    justify-content: center;
    -webkit-justify-content: center;
    font-family: Arial;
    font-size: 12px;
    text-align: center;
}

.chess-area .board-table .top-controls .popup {
    position: absolute;
    box-sizing: border-box;
    z-index: 1;
    top: 155px;
    height: 140px;
    width: 310px;
    padding: 11px;
    display: flex;
    display: -webkit-flex;
    flex-direction: column;
    -webkit-flex-direction: column;
    align-items: center;
    -webkit-align-items: center;
    justify-content: center;
    -webkit-justify-content: center;
    background: #d5d5d5;
    border-radius: 2px;
}

.chess-area .board-table .top-controls .popup .game-menu {
    box-sizing: border-box;
    display: flex;
    display: -webkit-flex;
    flex-wrap: wrap;
    -webkit-flex-wrap: wrap;
    width: 100%;
    min-height: 105px;
    padding: 5px 0 10px 5px;
}

.chess-area .board-table .top-controls .popup label {
    width: 100%;
    margin: -5px 0 5px 0;
    font: bold 14px Arial;
    text-align: left;
}
.chess-area .board-table .top-controls .popup textarea {
    width: 100%;
    height: calc(100% - 50px);
    box-sizing: border-box;
    padding: 5px 5px;
    font: normal 13px Arial;
}
.chess-area .board-table .top-controls .popup button {
    width: 100%;
    height: 30px;
    margin: 2px 0 0 0;
    font: bold 13px Arial;
}
.chess-area .board-table .top-controls .popup button:hover {
    cursor: pointer;
    opacity: 0.7;
}

.chess-area .board-table .popup .close {
    position: absolute;
    width: 18px;
    height: 18px;
    right: 8px;
    top: 5px;
    background-color: silver;
    border-radius: 100%;
    background-image: url('../img/icons/close.svg');
    background-repeat: no-repeat;
    background-position: center;
    background-size: 70%;
}
.chess-area .board-table .popup .close:hover {
    cursor: pointer;
    opacity: 0.8;
}


/**** New Game **************/
.chess-area .board-table .top-controls .popup .label-choose-side {
    width: 100%;
    margin: 5px;
    font: bold 14px Arial;
}


.chess-area .board-table .top-controls .popup .game-white-side {
    background-image: url('../img/icons/choose-white.svg');
    background-color: #444546;
}
.chess-area .board-table .top-controls .popup .game-black-side {
    background-image: url('../img/icons/choose-black.svg');
    background-color: #444546;
}

.chess-area .board-table .top-controls .popup .icon {
    display: block;
    width: 105px;
    height: 51px;
    margin: 5px 5px 0px 5px;
    border: 3px solid #fff;
    border-radius: 5px;
    background-size: 30%;
    background-repeat: no-repeat;
    background-position: center;
}

.chess-area .board-table .top-controls .popup .icon:hover {
    border-radius: 6px;
    border: 4px solid #68ba3a;
    cursor: pointer;
    opacity: 1.0;
}

.chess-area .board-table .top-controls .popup .icon.selected {
    border: 3px solid #78ca4a;
}

.chess-area .board-table .top-controls .popup .icon.locked {
    opacity: 0.5;
    cursor: default;
}

/********** Promotion *****************/
.chess-area .board-table .top-controls .promotion {
    box-sizing: border-box;
    display: flex;
    display: -webkit-flex;
    flex-wrap: wrap;
    -webkit-flex-wrap: wrap;
    width: 80%;
    min-height: 50px;
    padding: 2px;
}


.chess-area .board-table .promotion {
    position: absolute;
    z-index: 1;
    top: 155px;
    height: 80px;
    width: 310px;
    display: flex;
    display: -webkit-flex;
    align-items: center;
    -webkit-align-items: center;
    justify-content: center;
    -webkit-justify-content: center;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 4px;
}

.chess-area .board-table .promotion span {
    width: 70px;
    height: 70px;
    margin: 3px;
    display: flex;
    display: -webkit-flex;
    align-items: center;
    -webkit-align-items: center;
    justify-content: center;
    -webkit-justify-content: center;
    background: #fff;
    color: #333;
    font-weight: bold;
}

.chess-area .board-table .promotion span:hover {
    cursor: pointer;
    opacity: 0.8;
    text-decoration: underline;
}
.chess-area .board-table .promotion span.active {
    background: #dcdcdc;
}
.chess-area .board-table .promotion.hidden {
    display: none;
}


.chess-area .board-table .top-controls .popup .wQueen {
    background-image: url('../img/pieces/wQ.svg');
    background-color: #444546;
}

.chess-area .board-table .top-controls .popup .wBishop {
    background-image: url('../img/pieces/wB.svg');
    background-color: #444546;
}

.chess-area .board-table .top-controls .popup .wKnight {
    background-image: url('../img/pieces/wN.svg');
    background-color: #444546;
}

.chess-area .board-table .top-controls .popup .wRook {
    background-image: url('../img/pieces/wR.svg');
    background-color: #444546;
}

.chess-area .board-table .top-controls .popup .pieces {
    display: block;
    width: 80px;
    height: 80px;
    margin: 2px;
    border: 3px solid #fff;
    border-radius: 5px;
    background-size: 80%;
    background-repeat: no-repeat;
    background-position: center;
}

.chess-area .board-table .top-controls .popup .pieces:hover {
    border-radius: 8px;
    border: 2px solid #68ba3a;
    cursor: pointer;
    opacity: 1.0;
}

/********* Game difficulty ******************/
.chess-area .board-table .top-controls .game-difficulty {
    display: flex;
    display: -webkit-flex;
    flex-direction: row;
    -webkit-flex-direction: row;
    justify-content: center;
    -webkit-justify-content: center;
    flex-wrap: wrap;
    -webkit-flex-wrap: wrap;
    box-sizing: border-box;
    width: calc(100% - 2px);
    min-height: 150px;
    margin: 0;
    background: #fff;
    border-bottom: 2px solid #d5d5d5;
}
.chess-area .board-table .top-controls .game-difficulty .label {
    box-sizing: border-box;
    width: calc(100% - 25px);
    padding: 6px 6px 3px 8px;
    font: bold 13px Arial;
}

.chess-area .board-table .top-controls .game-level {
    display: flex;
    display: -webkit-flex;
    align-items: center;
    -webkit-align-items: center;
    justify-content: space-between;
    -webkit-justify-content: space-between;
    width: 80px;
}

.chess-area .board-table .top-controls .game-difficulty .values {
    display: flex;
    display: -webkit-flex;
    flex-wrap: wrap;
    -webkit-flex-wrap: wrap;
    justify-content: center;
    -webkit-justify-content: center;
    padding: 3px;
}
.chess-area .board-table .top-controls .game-difficulty .values span {
    display: flex;
    display: -webkit-flex;
    align-items: center;
    -webkit-align-items: center;
    justify-content: center;
    -webkit-justify-content: center;
    box-sizing: border-box;
    width: 22px;
    height: 22px;
    margin: 3px;
    padding: 3px;
    border-radius: 12px;
    background: silver;
    font: normal 12px Arial;
    color: #333;
}
.chess-area .board-table .top-controls .game-difficulty .values span:hover {
    cursor: pointer;
    opacity: 0.7;
}
.chess-area .board-table .top-controls .game-difficulty .values span.selected {
    color: #333;
    background: #fff;
    border: 1px solid silver;
}
.chess-area .board-table .top-controls .game-difficulty select {
    width: 95%;
    margin: 5px;
    cursor: pointer;
    font-size: 100%;
}


/*** Close ************/
.chess-area .board-table .top-controls .popup .close {
    position: absolute;
    width: 18px;
    height: 18px;
    right: 8px;
    top: 5px;
    background-color: silver;
    border-radius: 100%;
    background-image: url('../img/icons/close.svg');
    background-repeat: no-repeat;
    background-position: center;
    background-size: 70%;
}
.chess-area .board-table .top-controls .popup .close:hover {
    cursor: pointer;
    opacity: 0.8;
}

/* Popup Control Options */
.chess-area .board-table .top-controls .popup .control-list {
    display: block;
    position: relative;
    padding: 5px;
    margin: 5px;
    width: 300px;
    height:100px;
}

.chess-area .board-table .top-controls .popup .control-option {
    display: block;
    position: relative;
    margin: 5px;
    padding: 5px;
}

.chess-area .board-table .top-controls .popup .control-name {
    position: relative;
    margin: 55px;
    font: 13px Arial;
}

.chess-area .board-table .top-controls .popup .control-name.selected {
    font: bold 13px Arial;
}


/* The switch - the box around the slider */
.switch {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 24px;
}

/* Hide default HTML checkbox */
.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

/* The slider */
.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    -webkit-transition: .4s;
    transition: .4s;
    width: 50px;
}

.slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 2px;
    right: 2px;
    bottom: 2px;
    background-color: white;
    -webkit-transition: .4s;
    transition: .4s;
}

input:checked + .slider {
    background-color: #2196F3;
}

input:focus + .slider {
    box-shadow: 0 0 1px #2196F3;
}

input:checked + .slider:before {
    -webkit-transform: translateX(26px);
    -ms-transform: translateX(26px);
    transform: translateX(26px);
}

/* Rounded sliders */
.slider.round {
    border-radius: 50px;
}

.slider.round:before {
    border-radius: 50%;
}