* {
    box-sizing: border-box;
}

html {
    color-scheme: dark light;
    margin: 0;
}

body {
    font-family: "Inter", sans-serif;
    margin: 0;
    background-color: light-dark(#fff, #1c1b22);
}

#days_of_week {
    display: flex;
    flex-direction: row;
    flex: 1;
    overflow: auto;
    gap: 7px;
    scroll-snap-type: x mandatory;


    > div {
        flex: 1;
        position: relative;
        scroll-snap-align: start;

        > h1 {
            text-align: center;
            margin: .25em 0 .5em 0;
            font-size: 1.8em;
        }

        .lessons {
            position: relative;
        }

        &:before {
            content: "";
            background-color: light-dark(#bbb, #444);
            height: 100%;
            width: 1px;
            display: block;
            position: absolute;
            left: -4px;
        }
    }
}

.class {
    background-color: light-dark(#fff, #000);
    border-radius: 15px;
    border: 1px solid light-dark(#0003, #fff2);
    padding: 10px;
    text-align: center;
    position: absolute;
    overflow: hidden;
    box-shadow: 0 0 5px light-dark(#ccc, #0000);

    h1, h2 {
        margin: 0;
    }

    .room, .teacher {
        font-size: 1em;
        font-weight: 400;
    }

    .time {
        font-size: .8em;
        font-weight: 400;
    }

    .subject {
        font-size: 1.2em;
        text-overflow: ellipsis;
        overflow: hidden;
    }

    &:hover {
        max-height: unset !important;
        left: 0 !important;
        width: 100% !important;
        z-index: 99;
    }

    &[data-class_type="Lecture"] {
        background-color: light-dark(#ace, #337);
    }

    &[data-class_type="Excercise"] {
        background-color: light-dark(#aec, #254);
    }

    &[data-class_type="Discussion"] {
        background-color: light-dark(#fd9, #501);
    }
}

main {
    display: flex;
    flex-direction: row;
    max-width: 100%;

    #hours {
        flex: 0 0 60px;
        width: 100%;
        position: relative;

        > h1 {
            margin: .25em 0 .5em 0;
            font-size: 1.8em;
        }

        > div {
            height: 80px;
            padding-right: 5px;
            color: light-dark(#444, #bbb);
            text-align: right;

            &:before {
                content: "";
                background-color: light-dark(#bbb, #444);
                width: 100vw;
                height: 1px;
                left: 0;
                display: block;
                position: absolute;
            }
        }

        &:before {
            content: "";
            background-color: light-dark(#bbb, #444);
            height: 100%;
            width: 1px;
            display: block;
            position: absolute;
            right: 0px;
        }
    }
}

@media screen and (max-width: 1000px) {
	main {
	    padding: 0;

    	#days_of_week > div  {
        	min-width: calc(100vw - 60px);
    	}
	}

	#hours {
        > div {
            &:before {
                width: 100vw !important;
            }
        }
	}
}

.in-app-webview header {
    padding: calc(env(safe-area-inset-top) + 15px) 15px 15px 15px;
}

header {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 15px;
    padding: 15px;
    background-color: light-dark(#ddd, #2d2b36);
    border-bottom: 1px solid light-dark(#0003, #fff2);
    position: sticky;
    top: 0;
    z-index: 999;

    h1 {
        flex: 1;
        margin: 0;
    }

    select {
        border-radius: 15px;
        outline: 1px solid light-dark(#0003, #fff2);
        border: none;
        background-color: light-dark(#fff, #1c1b22);
        padding: 10px;
        font-family: inherit;
        font-size: inherit;
    }
}
