/* region colors */
:root {
    --background-color: #f5f5f5;
    --text-color: #171717;
    --hover-text-color: rgb(33, 143, 208);
    --text-color-link: rgba(23, 23, 23, 0.71);
    --hover: rgb(33, 143, 208);
    --light-transparency: 0.5;

    /* Subject 1 */
    --subject1-lecture: hsl(349, 83%, 66%, var(--light-transparency));
    --subject1-practice: hsl(349, 86%, 73%, var(--light-transparency));

    /* Subject 2 */
    --subject2-lecture: hsla(180, 67%, 45%, var(--light-transparency));
    --subject2-practice: hsl(180, 43%, 60%, var(--light-transparency));

    /* Subject 3 */
    --subject3-lecture: hsl(235, 67%, 63%, var(--light-transparency));
    --subject3-practice: hsl(235, 57%, 64%, var(--light-transparency));

    /* Subject 4 */
    --subject4-lecture: hsl(43, 93%, 61%, var(--light-transparency));
    --subject4-practice: hsl(39, 90%, 64%, var(--light-transparency));

    /* Subject 5 */
    --subject5-lecture: hsl(281, 72%, 64%, var(--light-transparency));
    --subject5-practice: hsl(281, 75%, 70%, var(--light-transparency));

    --border-color: rgba(214, 214, 214, 0.36);
    --border-stronger-color: rgba(182, 182, 182, 0.36);

    --border: thin solid var(--border-color);
}




/* endregion */

body {
    font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
    color: var(--text-color);
    background-color: var(--background-color);
}

.header {
    display: flex;
    justify-content: space-between;
}

.header .titles {

}

.header .title {
    display: block;
    font-size: 3ex;
}

.header .subtitle {
    display: block;
    font-size: 2ex;
}

.header .aside {
    font-size: small;
}

.grid-container {
    margin: 3ex 0.5em;
}


.grid-day {
    grid-row: day-row-start / day-row-end;
    align-self: center;
    justify-self: center;
}

@media (max-width: 35em) {
    .grid-day {
        font-size: 1.5ex;
    }
}

@media (max-width: 30em) {
    .grid-day {
        font-size: 1.3ex;
    }
}

.grid-hour {
    grid-column: hour-column-start / hour-column-end;
    align-self: center;
    justify-self: center;
}

.grid-entry {
    background-color: rgb(0, 208, 239);
    border-radius: 3px;

    /* needed for the hover to be absolutely positioned relative to the parent */
    position: relative;

    /* make horizontal lines have the same item padding as vertical ones */
    margin-top: 2px;
    margin-bottom: 2px;

    /* top-bottom alignment, in conjunction with below */
    display: flex;
}

.grid-entry .description {
    margin: 3px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.grid-entry .description .top-aligned {
}

.grid-entry .description .bottom-aligned {
}

.grid-entry .description .row {
    display: block;
}

.grid-complete-row {
    grid-column: 1 / -1;

    /* this makes lines line up nicely */
    margin: -0.5px;
    border: var(--border);
}


.grid-complete-row:hover {
    border: thin solid var(--hover);
    border-radius: 5px;
}

.entry-hover {
    display: none;
    position: absolute;
    bottom: 80%;
    left: 5em;
    width: 16rem;
    padding: 5px;
    margin: 5px;
    z-index: 100;
    color: black;
    background: rgba(255, 255, 255, 0.95);
    border: thin solid #1d1d1d;
    border-radius: 10px;
    font-size: 10px;
    text-align: center;
}

.grid-day-column {
    border-left: thin solid var(--border-stronger-color) !important;
}

a.link-subject:hover ~ .entry-hover, .entry-hover:hover {
    display: block;
    pointer-events: auto;
}

a {
    color: var(--text-color);
    text-decoration: none;

    /* we want this to react to pointer events (e.g. hovering), previously disabled */
    pointer-events: auto;
}

a:hover {
    color: var(--hover-text-color);
}

a.link-subject {
    display: inline-block;
    font-size: larger;
    font-weight: 600;
}

.entry-type {
    display: inline-block;
    color: var(--text-color);
}

a.link-classroom {
    font-size: large;
}

a.link-teacher {
    font-style: italic;
    font-size: small;
}

@media (max-width: 35em) {
    a.link-teacher {
        font-size: 1.2ex;
    }
}

a.link-group {
    font-size: x-small;
    color: var(--text-color-link)
}


@media (max-width: 35em) {
    a.link-group {
        display: none;
    }
}

a.link-management {
}

.group-list {
    font-size: x-small;
}

#dark-mode-toggle {
    padding-right: 10px;
}

@media (max-width: 600px) {
    .grid-container {
        grid-template-columns: 1fr;
    }
    .grid-container {
        display: flex;
        flex-wrap: wrap;
        margin: 3ex 0.5em;
        overflow-x: auto; /* Add this line to make the overflow scrollable */
    }

    .grid-entry {
        flex: 1 0 auto; /* This will allow the grid entries to shrink if there is not enough space */
        /* Rest of your CSS rules */
    }
}




body.dark-mode {
    --background-color: #171717;
    --text-color: #f5f5f5;
    --hover-text-color: rgb(30, 30, 30);
    --text-color-link: rgba(255, 255, 255, 0.71);
    --light-transparency: 0.8;

    /* Subject 1 */
    --subject1-lecture: hsl(348, 90%, 61%, var(--light-transparency));
    --subject1-practice: hsl(349, 66%, 62%, var(--light-transparency));

    /* Subject 2 */
    --subject2-lecture: hsl(180, 100%, 36%, var(--light-transparency));
    --subject2-practice: hsl(180, 56%, 54%, var(--light-transparency));

    /* Subject 3 */
    --subject3-lecture: hsl(235, 57%, 55%, var(--light-transparency));
    --subject3-practice: hsl(235, 57%, 62%, var(--light-transparency));

    /* Subject 4 */
    --subject4-lecture: hsl(45, 100%, 49%, var(--light-transparency));
    --subject4-practice: hsl(45, 88%, 55%, var(--light-transparency));

    /* Subject 5 */
    --subject5-lecture: hsl(281, 90%, 65%, var(--light-transparency));
    --subject5-practice: hsl(281, 93%, 71%, var(--light-transparency));

    --border-stronger-color: rgba(255, 255, 255, 0.49);
}



