/* .best-results * {
    border: 1px solid red;
} */


.best-results {
    position: fixed;
    inset: 0;
    z-index: 9001;
    /* border: 5px solid red; */
}

#best-results.best-results-hidden {
    display: none;
}

.best-results-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    z-index: 9000;
    /* border: 5px solid red; */
}

.best-results-window {
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    margin: 10vh auto;
    background: var(--color-background-main);
    padding: 25px;
    width: 90%;
    z-index: 9002;
    max-width: 560px;
    max-height: 85vh;
    border: 6px solid var(--color-background-around);
    border-radius: var(--radius);
    box-shadow: var(--main-shadow-inset);
    overflow-y: auto;
    scrollbar-width: none;  /* Firefox */
    -ms-overflow-style: auto;
    /* border: 1px solid red; */
}

.best-results-window::-webkit-scrollbar {
    display: none; /* Chrome, Safari, Edge */
}
.best-results-close {
    position: absolute;
    top: 1rem;
    right: 1.2rem;
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--color-text);
}

.best-results-section {
    min-width: 100%;
}

.best-results-table {
    min-width: 100%;
    border-collapse: collapse;
    margin-top: 10px;
    /* font-size: 16px; */
    /* border: 1px solid red; */
}

.best-results-table  th,
.best-results-table  td {
    padding: 1px 5px;
    border-bottom: 1px solid var(--color-table-line);
    /* border: 1px solid var(--color-table-line); */
}

.best-results-section:first-child {
    margin-bottom: 50px;
}

.best-results-table th:nth-child(1) {
    text-align: left;
}

.best-results-table th:nth-child(1),
.best-results-table td:nth-child(1) {
    width: auto;
}

.best-results-table th:nth-child(2),
.best-results-table td:nth-child(2),
.best-results-table th:nth-child(3),
.best-results-table td:nth-child(3) {
    width: 90px;
}

.best-results-table td:nth-child(2),
.best-results-table td:nth-child(3) {
    text-align: right;
}

.best-results-table th:nth-child(4),
.best-results-table td:nth-child(4) {
    width: 40px;
    text-align: center;
}

.best-results-table th:nth-child(5),
.best-results-table td:nth-child(5) {
    padding-left: 10px;
    width: 20px;
    text-align: center;
    color: var(--color-warning);
    border-bottom: none;
}

.clear-result {
    position: relative;
    cursor: pointer;
    /* border: 1px solid red; */
}

/* .clear-result::after { */
.clear-result:hover::after {
    content: "Cleare this score";
    white-space: nowrap;
    position: absolute;
    left: -6.5rem;
    top: -2.3rem;
    background: var(--color-dialog-backgroud);
    color: var(--color-text-dialog);
    padding: 6px 10px;
    border-radius: 6px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
    font-size: 0.8rem;
    /* display: none; */
}

/* .clear-result.active::after {
    display: block;
} */

@media (hover: none) {
    .clear-result::after {
        display: none !important;
    }
}


@media (max-width:480px) {
    .best-results-table th:nth-child(2),
    .best-results-table td:nth-child(2),
    .best-results-table th:nth-child(3),
    .best-results-table td:nth-child(3) {
        width: 75px;
    }
    
    .best-results-table th:nth-child(4),
    .best-results-table td:nth-child(4) {
        width: 35px;
    }
}

@media (max-height:900px) {
    .best-results-window {
        margin: 2vh auto;
    }
    
    .best-results-table {
        font-size: 0.85rem;
    }
}