:root {
    --base-color-1: #3f134d;
    --base-color-2: #58585a;
    --base-color-3: #ffac0b;
    --base-color-4: #cfc4d3;
    --base-color-5: #ffffff;
}

html, body {
    min-height: 100vh;
}

body {
    margin: 0;
    background-color: var(--base-color-4);
    font-family: 'Raleway', sans-serif;
    display: flex;
    flex-flow: column;
}

.header {
    background-color: var(--base-color-5);
    display: flex;
    flex-flow: column;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
}

.title {
    font-size: 2em;
}

.weekNumber {
    font-size: 1.5em;
}

.logout {
    a {
        color: var(--base-color-1);
    }
}

.schedule {
    flex-grow: 1;
    display: grid;
    grid-template-rows: repeat(7, auto); /* 7 rows */
    gap: 15px; /* spacing between rows */
    padding: 10px;
    background-color: var(--base-color-5)
}

.schedule--row {
    border-radius: 8px;
    overflow: hidden; /* keeps child cells inside rounded corners */
}

.schedule--slots {
    display: flex;
    flex-flow: column;
    gap: 2px; /* gap between slots */

    > * {
        flex: 1 1 0;
    }
}

.schedule--contents {
    display: grid;
    grid-template-columns: 1fr 1fr;

    > * {
        grid-column: 1 / -1;
        grid-row: 1 / -1;
    }
}


.schedule--slots > div, .schedule--day {
    display: flex;
    flex-flow: column;
    align-items: center;
    justify-content: center;
    padding: 8px;

}

.schedule--services {
    pointer-events: none;
    position: relative;
    z-index: 1;
    display: flex;
    --pos: ;
    --size: ;
}

.schedule--service {
    position: absolute;
    /*top: 0;*/
    /*bottom: 0;*/
    left: 0;
    right: 0;
    z-index: 1;

    top: var(--pos);
    height: var(--size);

    > div {
        z-index: 1;
        position: absolute;
        left: 0;
        top: 0;
        right: 0;
        bottom: 0;
        padding: 8px;
        border-radius: 8px;
        background-color: rgba(63, 19, 77, 0.5);
        color: #fff;

        > :last-child {
            font-size: 0.9em;
        }

    }

    &[data-type="p"] {
        > div {
            background-color: #9a9b9c;
        }
    }
}

.schedule--day {
    background: var(--base-color-1);
    color: var(--base-color-5);
}

.schedule--weekday {
    opacity: .7;
    font-size: 1.1em;
}

.schedule--date {
    font-weight: bold;
}

.schedule--slot {
    min-height: 5em;
    background: #F5F3F4;

    &[data-available="1"] {
        background: #e2dce4;
        cursor: pointer;

        &:hover {
            background: #cabfce;
        }
    }
}

@media (min-width: 500px) {
    .header {
        flex-flow: row;
    }
    .schedule--row {
        display: grid;
        grid-template-columns: 17ch 1fr;
        gap: 3px;
    }

    .schedule--slots {
        flex-flow: row;
    }

    .schedule--service {
        top: auto;
        height: 100%;
        left: var(--pos);
        width: var(--size);
        min-width: 200px;

        > div {
            margin-block: 16px;
        }
    }
}

