html, body {
    margin: 0;
    height: 100vh;
}

* {
    box-sizing: border-box;
}

body {
    display: grid;
    grid-template-rows: 50px calc(100% - 50px);
    grid-template-columns: auto 1fr;
    font-family: 'Roboto', sans-serif;
}
@media only screen and (max-width: 500px) {
    body {
        grid-template-columns: 4fr 1fr;
    }
}

body.hide-menu {
    grid-template-columns: 0 1fr;
}

header {
    grid-column: span 2;
    display: flex;
    justify-content: flex-end;
    align-items: center;
    background-color: #004288;
    color: white;
    padding: 0 10px;
}

#logo {
    font-size: 30px;
    font-weight: bold;
    margin-right: auto;
}
@media only screen and (max-width: 500px) {
    #logo {
        font-size: 25px;
    }
}

header .button {
    font-size: 18px;
    white-space: nowrap;
    margin-left: 10px;
}
@media only screen and (max-width: 500px) {
    header .button {
        font-size: 14px;
    }
}

#menu {
    display: flex;
    flex-direction: column;
    background-color: #031926;
    width: 400px;
    height: 100%;
    position: relative;
    padding: 10px 10px 0 10px;
}
#menu ::-webkit-scrollbar {
    width: 15px;
    opacity: 0;
}
#menu ::-webkit-scrollbar-track {
    border-radius: 15px;
}
#menu ::-webkit-scrollbar-thumb {
    border-radius: 15px;
    background: rgba(206, 206, 206, 0.69);
}
@media only screen and (max-width: 500px) {
    #menu {
        width: 80vw;
    }
}

.menu-item {
    display: flex;
}
.menu-item:not(:last-child) {
    margin-bottom: 10px;
}

.hide-menu #menu {
    transform: translateX(-100%);
}

#menu-toggle {
    position: absolute;
    right: -40px;
    top: 0;
    width: 40px;
    height: 40px;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 30px;
    background-color: black;
    color: white;
    opacity: 0.7;
}

#search-box-container {
    min-height: 42px;
}

#search-box {
    min-width: 0;
    flex: 1;
    padding: 10px;
    font-size: 15px;
    font-family: inherit;
    color: #011627;
    border: none;
}
#search-box::placeholder {
    direction: rtl;
}

#search-category {
    padding-left: 0.4rem;
    font-size: 15px;
    font-family: inherit;
    color: white;
    background: #4183c4 none;
    border: none;
    cursor: pointer;
    border-radius: 0;
    box-shadow: none;
}
#search-category option {
    background-color: white;
    color: black;
}

#day-filter {
    display: flex;
    align-items: center;
    color: white;
}

#day-filter-selections {
    display: flex;
    justify-content: flex-end;
}

#day-filter-label {
    flex: 1;
    user-select: none;
}
#day-filter-label::after {
    content: "Filter By Day";
}
@media only screen and (max-width: 440px) {
    #day-filter-label::after {
        content: "Day";
    }
}
@media only screen and (max-width: 366px) {
    #day-filter-label::after {
        content: "";
    }
}

input[id*=day-filter-] {
    display: none;
}

input[id*=day-filter-] + label {
    padding: 0.4rem;
    cursor: pointer;
    user-select: none;
    font-family: monospace;
    text-transform: uppercase;
    box-shadow: inset 0 -3px #4183c4;
    transition: 0.18s cubic-bezier(0.4, 0, 0.2, 1);
}
input[id*=day-filter-] + label:not(:first-of-type) {
    margin-left: 0.6rem;
}
input[id*=day-filter-]:checked + label {
    box-shadow: inset 0 -30px #4183c4;
}

#course-list-shadow {
    width: 92%;
    height: 0;
    box-shadow: 0 8px 5px 7px #031926;
    z-index: 1;
    transition: width .2s ease;
}

#course-list {
    display: flex;
    flex-direction: column;
    min-height: 500px;
    position: relative;
    overflow-y: scroll;
    padding-top: 6px;
}

#course-list.loading::before {
    content: '\e839';
    font-family: fontello;
    font-size: 100px;
    color: #cccccc;
    width: 100px;
    height: 100px;
    position: absolute;
    top: 20%;
    left: calc(50% - 50px);
    -moz-animation: spin 1s infinite linear;
    -o-animation: spin 1s infinite linear;
    -webkit-animation: spin 1s infinite linear;
    animation: spin 1s infinite linear;
}

.course-entry {
    display: flex;
    flex-direction: column;
    background-color: #F0EDEE;
    max-width: 96%;
    min-height: fit-content;
    margin-bottom: 10px;
}

.course-header {
    display: flex;
    justify-content: space-between;
    padding: 10px;
}

.course-name {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.course-expand {
    margin-left: 10px;
}

.course-entry:not(.hide-info):not(.display-alone) .course-expand::before {
    content: '\e806' !important;
}

.display-alone .course-expand::before {
    content: '\e804' !important;
}

.course-entry.hide-info .course-info {
    display: none;
}

.course-info {
    padding: 0 10px 10px 10px;
    margin-top: 10px;
}

.class-cell {
    text-align: center;
}

.class-cell.interested {
    background-color: rgba(181, 247, 90, 0.5);
}

.class-cell.filled.interested {
    background-color: rgba(247, 46, 52, 0.5);
}

.class-cell.filled.interested.make-available {
    background-color: rgba(181, 247, 90, 0.5);
}

.class-cell.selection:not(.interested) {
    background-color: rgba(0, 69, 247, 0.5);
}

.course-section {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: white;
    margin-bottom: 5px;
    padding: 5px;
    cursor: pointer;
}

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

.course-section .instructor {
    font-weight: bold;
    font-size: 15px;
    margin-top: 5px;
}

.section-type {
    margin-top: 10px;
    margin-bottom: 5px;
}

.section-days {
    margin-top: 5px;
    font-family: monospace;
    font-size: 15px;
}

.course-section .section-day {
    font-size: 15px;
    color: gray;
}

.section-header {
    display: flex;
    font-family: monospace;
}

.section-group {
    display: inline-block;
    font-size: 16px;
    font-weight: bold;
    text-align: center;
    padding: 0 5px;
    height: 20px;
    line-height: 20px;
    border: 1px solid #173A6A;
}

.section-link {
    display: inline-block;
    text-decoration: none;
    font-size: 12px;
    background-color: #173A6A;
    color: white;
    text-align: center;
    cursor: pointer;
    width: 50px;
    height: 20px;
    line-height: 20px;
    transition: color 300ms ease;
}

.section-link:hover {
    color: #93f8f0;
}

.section-link::after {
    font-family: fontello;
    content: '\f14c';
    margin-left: 3px;
}

.cell-course {
    display: inline-block;
    padding: 5px;
    margin: 2px;
    color: white;
    background-color: azure;
    height: 30px;
    line-height: 20px;
    white-space: nowrap;
    width: fit-content;
    cursor: pointer;
}

.cell-course div {
    display: inline-block;
}

.remove-course {
    position: relative;
    margin-left: 5px;
    width: 15px;
    height: 15px;
    top: 3px;
    line-height: 13px;
}

.remove-course::after {
    content: '\00D7';
    font-size: 20px;
    position: absolute;
    left: 1px;
    top: 0;
    cursor: pointer;
}

.cell-course.animate .remove-course::after {
    animation: shake 100ms linear infinite alternate;
}

.section-button {
    width: 40px;
    height: 40px;
    border: 1px solid gray;
    position: relative;
    min-width: 40px;
    margin-left: 10px;
}

.course-section.selected .section-button::after {
    content: '\2714';
    left: 3px;
    top: -9px;
    font-size: 40px;
    color: yellowgreen;
    position: absolute;
}

[class*=filter-hide-] {
    display: none;
}

.display-mode .course-entry:not(.display-alone) {
    display: none !important;
}

.course-entry.display-alone {
    display: flex !important;
}

.display-mode #search-box {
    pointer-events: none;
    background-color: dimgray;
}

#main-content {
    height: 100%;
    overflow: auto;
}

#schedule {
    table-layout: fixed;
    border-spacing: 0;
    height: 100%;
    width: 100%;
    min-width: 800px;
    background-color: #F0EDEE;
}

tr:first-child {
    background-color: #6EA4BF;
    height: 30px;
}

.day-cell {
    color: white;
}

tr > td:first-child, th:first-child {
    text-align: center;
    width: 50px;
    min-width: 50px;
}

.hour-cell {
    font-weight: bold;
}

#schedule th:nth-child(even), td:nth-child(even) {
    background-color: rgba(0, 0, 0, 0.10);
}

#schedule tr:nth-child(even) {
    background-color: rgba(0, 0, 0, 0.15);
}

#notifications {
    display: flex;
    flex-direction: column-reverse;
    font-family: Consolas, sans-serif;
    width: 300px;
    height: fit-content;
    max-height: 100%;
    overflow-y: auto;
    position: fixed;
    right: 0;
    bottom: 0;
    padding: 10px;
    z-index: 99999;
}

.notification {
    display: flex;
    flex-direction: column;
    background-color: rgba(0, 0, 0, 0.85);
    color: #9ba7a7;
    min-height: fit-content;
    padding: 10px;
    margin-top: 20px;
}

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

.notification-header-text {
    font-weight: bold;
}

.notification .icon-cancel {
    position: relative;
    left: 5px;
    bottom: 2px;
}

.notification-content {
    display: flex;
    flex-direction: column;
    text-align: justify;
    margin-top: 10px;
}

.notification-content p {
    margin: 8px 0;
}

.notification-button {
    border: 1px solid currentColor;
    text-align: center;
    padding: 5px;
    margin-top: 15px;
}

#notify-copy-fail p {
    white-space: pre-line;
}

@media only screen and (max-width: 600px) {
    #notifications {
        width: 100%;
        font-size: 13px;
    }

    .notification {
        margin-top: 10px;
    }

    .notification-content p {
        margin: 5px 0;
    }
}

/* Google Calendar Extension Styles */
#google-calendar-modal div {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 1.2em;
}

.modal-button {
    padding: 0.4rem 0.9rem 0.4rem 0.6rem;
    margin-top: 0.3em;
}

#notification-area {
    height: 6rem;
    overflow-y: scroll;
    padding: 0.4em;
    align-items: flex-start !important;
    background-color: aliceblue;
    border: 1px solid #999;
    border-right: unset;
    border-left: unset;
    color: #4d4d4d;
}

#notification-area > * {
    margin: unset;
    margin-bottom: 0.4em;
}

#current-calendar-name {
    font-weight: bold;
}

/* ANIMATIONS */

@keyframes shake {
    from {
        transform: rotate(-15deg);
    }
    to {
        transform: rotate(15deg);
    }
}

/* UTILITY CLASSES */

.button {
    cursor: pointer;
}

.market {
    cursor: pointer;
}

.market-link {
    color: inherit;
    text-decoration:none;
}

.button:hover {
    color: #cccccc !important;
    border-color: currentColor !important;
}

.market:hover {
    color: #cccccc !important;
    border-color: currentColor !important;
}

.shake, .shake-on-hover:hover {
    animation: shake 100ms linear infinite alternate;
}