@import "./notification.css";

body:not(.edit-mode) .edit-mode-only {
    display: none !important;
}

body:not(.view-mode) .view-mode-only {
    display: none !important;
}

article.dashboard {
    position: relative;
    background-color: white;
    width: 100%;
    min-height: 100vh;
    padding: calc(var(--unit)) 0 calc(var(--unit) + 100px) 0;
    display: flex;
    flex-direction: column;
    gap: var(--unit);
    align-items: flex-start;
    box-sizing: border-box;
    opacity: 0;
    transition: opacity 0.5s;
    top: 0;
}

article.dashboard h2 {
    display: none;
    margin-top: 0;
    color: var(--dark);
    text-align: center;
    width: 100%;
}

article.dashboard.active {
    opacity: 1;
}

footer {
    font-size: 0.7rem;
    text-align: center;
    padding: var(--unit);
    background-color: var(--darkblue);
    color: white;
    width: 100%;
    padding-bottom: calc(7 * var(--unit));
    box-sizing: border-box;
}

article.dashboard .dashboard-item {

    position: relative;
    margin: 0 auto;

}

article.dashboard .edit-controls {
    display: flex;
    position: absolute;
    background-color: #FFFD;
    z-index: 10;
    width: 100%;
    height: 100%;
    align-items: center;
    justify-content: center;
}

main>header {
    text-align: center;
}

main>header>.controls a {
    background-color: var(--blue);
    padding: var(--unit);
    color: white;
    min-width: calc(6 * var(--unit));
    text-align: center;
    border-radius: 5px;
    display: flex;
    align-items: center;
    gap: var(--unit);
    position: fixed;
    top: var(--unit);
    right: var(--unit);
    z-index: 20;
}

main>header>.controls a::before {
    content: " ";
    display: block;
    width: calc(1.5 * var(--unit));
    height: calc(1.5 * var(--unit));
    background-size: cover;
    background-repeat: no-repeat no-repeat;
    background-position: center center;
}

.controls .do-edit::before {
    background-image: url("./configure.svg");
}

.controls .do-view::before {
    background-image: url("dashboard.svg");
}

main:not(.empty) .only-on-empty,
main.empty .not-on-empty {
    display: none;
}


aside.only-on-empty {
    padding: calc(var(--unit) * 10) 0;
    text-align: center;
    font-weight: 300;
    font-size: 1.5rem;
}

@media screen and (min-width: 1000px) {

    body.home>header {
        position: absolute;
    }

    main.dashboard {
        position: relative;
        max-width: 100vw;
        padding: var(--unit);
        margin: 0;
        margin-top: calc(6 * var(--unit));
    }

    article.dashboard {
        height: auto;
        width: auto;
        min-height: 80vh;
        box-sizing: border-box;
        border-radius: calc(0.5 * var(--unit));
        padding-top: 0;
        min-width: 900px;
        overflow: hidden;
        display: grid;
        grid-template-columns: repeat(auto-fit, calc(40* var(--unit)));

        grid-auto-rows: min-content;
        padding: calc(2 * var(--unit));
        gap: var(--unit);
    }

    article.dashboard>header {
        padding: 0;
        align-self: middle;
        height: calc(30 * var(--unit));
        box-shadow: rgba(0, 0, 0, 0.13) 3px 3px 7px;
        border-radius: calc(0.5 * var(--unit));
    }

    article.dashboard h2 {
        display: block;
    }

    footer {
        position: fixed;
        bottom: 0;
        font-size: 1rem;
        padding-bottom: var(--unit);
        z-index: 9999;
    }

    main>header>.controls a {
        top: calc(6 * var(--unit));
        right: var(--unit);
    }

}
