@import '../../../../assets/scss/abstracts/variables';
@import '../../../../assets/scss/abstracts/mixins';

.rdg-blocks .rdg-leader-board {
    width: calc(var(--vw, 1vw) * 100);
    position: relative;
    left: 50%;
    right: 50%;
    margin-left: -50vw;
    margin-right: -50vw;
    max-width: 99.55vw;

    .container.content {
        width: 100%;
        display: flex;
        flex-direction: column;
        padding-left: 20px;
        padding-right: 20px;

        #wait {
            display: none;
            position: fixed;
            z-index: 1000;
            top: 0;
            left: 0;
            height: 100%;
            width: 100%;
            background: rgba( 255, 255, 255, .8 ) url('../../assets/images/spinner.gif') 50% 50% no-repeat;
        }

        @include title;

        .table {
            border-radius: 1rem;
            background-color: var(--color-white);

            .table-menu {
                display: flex;

                .menu {
                    padding: 1rem;
                    width: 100%;
                    margin: 0;
                    display: flex;
                    justify-content: space-between;

                    li {
                        text-align: center;
                        width: 100%;
                        list-style: none;
                        font-weight: 600;

                        i {
                            font-size: .8rem;
                            font-weight: 600;
                            color: var(--color-primary-dark-light);
                        }

                        .unactive {
                            color: var(--color-black);
                        }
                    }
                }
            }

            .table-filter {
                padding: .8rem;
                background-color: var(--color-primary-dark-light);
                min-height: 3.5rem;

                .filter {
                    width: 100%;
                    margin: 0;
                    display: flex;
                    justify-content: space-between;
                    color: var(--color-white);

                    li {
                        width: 100%;
                        display: flex;
                        align-items: center;
                        list-style: none;
                        font-weight: 600;

                        span {
                            width: 45%;
                            text-align: right;
                            padding-right: .5rem;
                        }

                        span.init {
                            text-align: left;
                        }

                        select {
                            width: 55%;
                            margin-right: .5rem;
                        }
                    }
                }
            }
        }

        .sortable {
            border-spacing: 0;
            border: none;

            th {
                cursor: pointer;
                border: none;

                &.no-sort {
                    pointer-events: none;
                }

                &::after, &::before {
                    transition: color 0.1s ease-in-out;
                    font-size: 1.2em;
                    color: transparent;
                }

                &::after {
                    margin-left: 3px;
                    content: "▸";
                }

                &:hover::after {
                    color: var(--color-primary-dark-light);
                }

                &.dir-d::after {
                    color: var(--color-primary-dark-light);
                    content: "▾";
                }

                &.dir-u::after {
                    color: var(--color-primary-dark-light);
                    content: "▴";
                }

                &.indicator-left::after {
                    content: "";
                }

                &.indicator-left::before {
                    margin-right: 3px;
                    content: "▸";
                }

                &.indicator-left:hover::before {
                    color: inherit;
                }

                &.indicator-left.dir-d::before {
                    color: var(--color-primary-dark-light);
                    content: "▾";
                }

                &.indicator-left.dir-u::before {
                    color: var(--color-primary-dark-light);
                    content: "▴";
                }
            }

            th {
                background: rgb(248, 248, 248);
                color: var(--color-black);
                font-weight: 600;
                text-align: center;
                text-transform: capitalize;
                vertical-align: baseline;
                white-space: nowrap;
            }

            td, th {
                padding: .8rem .3rem;
                border-left: none;
                border-right: none;
                border-top: none;
                text-align: center;
            }

            .w-1 {
                width: 7%;
            }

            .w-2 {
                width: 25%;
            }

            .w-3 {
                width: 10%;
            }

            td.name {
                color: var(--color-rdg-leader-board-name);
            }
        }
    }
}

.acf-block-preview {
    .rdg-leader-board {
        width: 100%;
        left: 0;
        right: 0;
        margin-left: 0;
        margin-right: 0;

        .table {
            .table-menu {
                a {
                    text-decoration: none;
                }
            }
        }
    }
}
