@use 'mixins';

/*
.dashboard {
    .dashboard-top {
        display: flex;
        justify-content: space-between;
        align-items: center;
        margin-bottom: var(--gap);
        .dashboard-name {
            font-size: var(--fs-2xl);
        }
        @include mixins.mobile {
            padding: 0 var(--gap);
        }
    }
    .dashboard-wrap {
        position: relative;
        display: grid;
        grid-template-columns: 210px 1fr;
        background-color: #fff;
        border-radius: var(--border-radius);
        width: 100%;
        min-height: 400px;
        > * {
            padding: var(--gap);
        }
        @include mixins.mobile {
            display: flex;
            flex-direction: column;
            &.is-menu-visible {
                &::after {
                    z-index: 100;
                    content: '';
                    position: absolute;
                    left: 0;
                    right: 0;
                    top: 0;
                    bottom: 0;
                    background-color: rgba(var(--base-5), 0.075);
                }
                .sidebar {
                    z-index: 1000;
                    display: flex;
                    position: absolute;
                    background-color: #fff;
                    border-top: var(--seperator);
                    // box-shadow: 0px 5px 0px 0px rgba(230, 230, 230, 1);
                }
                .dashboard-content {
                    border-top-left-radius: 0;
                }
            }
        }
    }
    .sidebar {
        width: 100%;
        background-color: lightgray;
        border-top-left-radius: var(--border-radius);
        border-bottom-left-radius: var(--border-radius);
        @include mixins.mobile {
            // display: flex;
            // position: fixed;
            // top: var(--navbar-height);
            // left: 0;
            // right: 0;
            // z-index: 10000;
            // opacity: 0;
            border-radius: 0;
        }
    }
    .dashboard-content {
        border-top-right-radius: var(--border-radius);
        border-bottom-right-radius: var(--border-radius);
        display: grid;
        grid-template-rows: max-content 1fr;
        @include mixins.mobile {
            border-radius: 0;
        }
        .dashboard-page {
            overflow-y: auto;
        }
    }
    .dashboard-page-title {
        font-size: var(--fs-xl);
        font-weight: 600;
        border-bottom: var(--seperator);
        padding-bottom: 8px;
        margin-bottom: var(--gap);
    }
}

.page-dashboard {
    display: grid;
    .dashboard {
        display: grid;
        grid-template-rows: max-content 1fr;
        margin-bottom: var(--gap);
        @include mixins.mobile {
            margin-bottom: 0;
        }
    }
}
*/

.page-dashboard {
    --head-section-height: 60px;
    display: grid;
    padding: 0;
    .inner-wrap {
        padding-left: var(--gap);
        padding-right: var(--gap);
    }
    .page-dashboard-head {
        position: fixed;
        background-color: var(--color-bg);
        box-shadow: var(--box-shadow-navbar);
        height: var(--head-section-height);
        top: var(--navbar-height);
        left: 0;
        right: 0;
        z-index: 20;
        .inner-wrap {
            width: 100%;
            height: 100%;
            display: flex;
            flex-direction: row;
            align-items: center;
            justify-content: space-between;
        }
        h1 {
            font-size: var(--fs-2xl);
        }
    }
    .page-dashboard-wrap {
        display: grid;
        // grid-template-columns: var(--sidebar-left-width) 1fr;
        .sidebar-left {
            position: fixed;
            top: calc(var(--navbar-height) + var(--head-section-height));
            max-height: calc(100vh - var(--navbar-height) - var(--head-section-height));
        }
        .page-dashboard-content {
            margin-top: var(--head-section-height);
            margin-left: var(--sidebar-left-width);
            // margin-left: var(--gap);
            // margin-bottom: calc(2 * var(--gap));
            // margin-left: var(--gap);
            @include mixins.tablet {
                margin-left: 0;
            }
        }
    }
    .sidebar-left {
        background-color: rgba(var(--base-fg), 0.05);
        height: calc(100vh - var(--navbar-height) - var(--head-section-height));
        // border-radius: var(--border-radius);
        padding: var(--gap);
        @include mixins.tablet {
            &.is-menu-visible {
                display: flex;
                background: var(--color-bg);
                left: 0;
                right: 0;
                width: auto;
                height: max-content;
                box-shadow: var(--box-shadow-navbar);
                z-index: 10;
            }
        }
    }
    .page-dashboard-content {
        // background-color: #fff;
        // border-radius: var(--border-radius);
        padding: var(--gap);
    }
    .dashboard-page-title {
        font-size: calc(var(--fs-xl) * 1.4);
        border-bottom: var(--seperator);
        padding-bottom: 8px;
    }
}

.dashboard-page-comments,
.dashboard-page-users {
    .dashboard-page-content {
        display: flex;
        flex-direction: column;
        .is-more-button {
            margin-top: var(--gap);
        }
    }
}

.dashboard-page-comments {
    .simple-feed {
        > * {
            margin-bottom: var(--gap);
            &:last-child {
                margin-bottom: 0;
            }
        }
    }
}

.dashboard-page-settings {
    height: 100%;
    display: grid;
    grid-template-rows: max-content 1fr;
    .dashboard-settings-form {
        display: flex;
        flex-direction: column;
        justify-content: space-between;
        height: 100%;
        > * {
            margin-bottom: var(--gap);
            &:last-child {
                margin-bottom: 0;
            }
        }
        .checkbox {
            display: grid;
            grid-template-columns: 1fr max-content;
            input {
                grid-row: 1/2;
                grid-column: 2/3;
            }
            label {
                grid-row: 1/2;
                grid-column: 1/2;
            }
        }
    }
}

.dashboard-page-analytics {
    @include mixins.mobile() {
        .table {
            width: 1200px;
        }
        .table-wrap {
            width: 345px;
            overflow: auto;
        }
    }
}

.modal {
    .modal-users-list {
        .modal-card-content {
            overflow-y: auto;
            @include mixins.not-mobile {
                max-height: 70vh;
            }
        }
    }
}

.dashboard-page-ipblocks {
    .dashboard-page-title {
        display: flex;
        justify-content: space-between;
        button,
        .button {
            font-size: var(--fs-normal);
        }
    }
    .table {
        .table-column-usernames {
            display: flex;
            flex-direction: column;
        }
    }
}
