@layer reset, ui, theme;

:root {
    --phthalo: hsl(150.9 49.3% 13.9%);
    --phthalo-90: color-mix(in oklch, var(--phthalo) 90%, white);
    --phthalo-75: color-mix(in oklch, var(--phthalo) 75%, white);
    --phthalo-50: color-mix(in oklch, var(--phthalo) 50%, white);
    --phthalo-25: color-mix(in oklch, var(--phthalo) 25%, white);
    --phthalo-12: color-mix(in oklch, var(--phthalo) 12%, white);
}

@layer reset {
    html {
        height: 100%;
    }
    body {
        margin: 0;
        height: 100%;
    }
    ul, ol {
        list-style: none;
        padding: 0;
    }
    ul ul {
        padding-left: 30px;
    }
    * {
        box-sizing: border-box;
    }
}

@layer ui {
    html {
        font-family: 'Inconsolata', sans-serif;
        font-size: 18px;
    }
    body {
        color: var(--phthalo-90);
    }
    form {
        display: flex;
        flex-direction: column;
        align-items: flex-start;
        gap: 5px;
    }
    form.horizontal {
        flex-direction: row;
    }
    label {
        display: flex;
        flex-direction: row;
        gap: 5px;
    }
    .clickable {
        cursor: pointer;
    }
    h1 {
        padding-bottom: 10px;
        margin: 30px 0 10px;
        border-bottom: 1px solid var(--phthalo-25);
    }
}

@layer theme {
    .calendar {
        padding: 10px;
        height: 100%;
        display: grid;
        grid-template-columns: repeat(7, 1fr);
        grid-auto-rows: 1fr;
        gap: 10px;
    }
    .day {
        border: 1px solid var(--phthalo-12);
    }
    .day.past {
        background-color: lightgray;
    }
    .day.today .date {
        background-color: var(--phthalo);
        color: var(--phthalo-25);
    }
    .day .date {
        display: flex;
        flex-direction: column;
        align-items: center;
    }

    nav {
        display: flex;
        flex-direction: column;
    }
    .login {
        height: 100%;
        display: grid;
        grid-template-columns: 1fr minmax(min-content, 300px) 1fr;
        grid-template-rows: 1fr min-content 4fr;
    }
    .login form {
        grid-column: 2/3;
        grid-row: 2/3;
    }
    .login button {

    }

    .logged {
        display: grid;
        height: 100%;

        @media (width >= 600px) {
            grid-template-columns: 200px 1fr;

            nav {
                grid-column: 1/2;
            }
        }

        @media (width < 600px) {
            grid-template-columns: 7fr 1fr;

            nav {
                grid-row: 1/2;
                grid-column: 1/2;
                z-index: 2;
                display: none;

                background-color: white;
            }
            .content {
                z-index: 1;
                grid-row: 1/2;
                grid-column: 1/3;
            }
        }

    }

    .workout textarea {
        width: 300px;
        height: 200px;
    }
    .workout button {
        align-self: flex-start;
    }

    .sets {
        display: flex;
        flex-direction: row;
        gap: 6px;

        li {
            display: flex;
            flex-direction: column;
            align-items: center;
        }
        .completed .reps {
            color: white;
            background-color: green;
        }

        .reps {
            display: inline-flex;
            align-items: center;
            justify-content: center;
            border: 1px solid black;
            width: 24px;
            height: 24px;
            line-height: 24px;
            border-radius: 50%;
        }

        .weight {
            font-size: 0.75em;
        }

        form.add-set {
            input {
                width: 4rem;
            }
            display: flex;
            flex-direction: row;
            gap: 6px;
        }
    }

    .completed {
        text-decoration: line-through;
    }
}
