body {
    margin: 0;

    background-color: var(--background) !important;
    color: var(--text-color);

    --hue: 200;

    display: flex;
    height: 100vh;

    font-family: "Roboto", sans-serif;
}

button, input, select {
    font-family: "Roboto", sans-serif;
}

.dark-theme {
    --text-color: #fff;
    --invert-icons: 1;

    --background: hsl(var(--hue), 10%, 10%);
    --primary: hsl(var(--hue), 100%, 50%);
    --primary-dark: hsl(var(--hue), 100%, 45%);

    --bg-hover: hsl(var(--hue), 10%, 15%);
    --bg-hover-inv: hsl(calc(180 + var(--hue)), 10%, 85%);

    --textbtn-bg-hover: hsla(var(--hue), 100%, 50%, 10%);

    --bg-btn-selected: hsl(var(--hue), 10%, 20%);

    --text-faint: hsl(var(--hue), 5%, 50%);

    --slight-red: rgb(50, 0, 0);
    --slight-green: rgb(0, 50, 0);
    --slight--light-green: rgb(25, 50, 25);
    --slight-yellow: rgb(50, 50, 0);

    --surface-05: hsl(var(--hue), 20%, 12%);
    --surface-07: hsl(var(--hue), 30%, 14%);
    --surface-1: hsl(var(--hue), 40%, 15%);
    --surface-2: hsl(var(--hue), 40%, 20%);
    --surface-3: hsl(var(--hue), 40%, 25%);
    --surface-4: hsl(var(--hue), 40%, 30%);
    --surface-5: hsl(var(--hue), 40%, 35%);

    --dialog-bg: hsl(var(--hue), 50%, 10%);
}

.light-theme {
    --text-color: #000;
    --invert-icons: 0;

    --background: hsl(var(--hue), 5%, 95%);
    --primary: hsl(var(--hue), 100%, 50%);
    --primary-dark: hsl(var(--hue), 100%, 55%);

    --bg-hover: hsl(var(--hue), 10%, 85%);
    --bg-hover-inv: hsl(calc(180 + var(--hue)), 10%, 85%);

    --textbtn-bg-hover: hsla(var(--hue), 100%, 50%, 10%);

    --bg-btn-selected: hsl(var(--hue), 10%, 80%);

    --text-faint: hsl(var(--hue), 5%, 50%);

    --slight-red: rgb(255, 200, 200);
    --slight-green: rgb(200, 255, 200);
    --slight--light-green: rgb(230, 255, 230);
    --slight-yellow: rgb(255, 255, 200);

    --surface-05: hsl(var(--hue), 30%, 80%);
    --surface-07: hsl(var(--hue), 40%, 78%);
    --surface-1: hsl(var(--hue), 50%, 77%);
    --surface-2: hsl(var(--hue), 50%, 74%);
    --surface-3: hsl(var(--hue), 50%, 69%);
    --surface-4: hsl(var(--hue), 50%, 64%);
    --surface-5: hsl(var(--hue), 50%, 59%);

    --dialog-bg: hsl(var(--hue), 50%, 90%);
}


.theme {
    --text-color: #fff;
    --invert-icons: 1;

    --background: hsl(var(--hue), 10%, 10%);
    --primary: hsl(var(--hue), 100%, 50%);
    --primary-dark: hsl(var(--hue), 100%, 45%);

    --bg-hover: hsl(var(--hue), 10%, 15%);
    --bg-hover-inv: hsl(calc(180 + var(--hue)), 10%, 85%);

    --textbtn-bg-hover: hsla(var(--hue), 100%, 50%, 10%);

    --bg-btn-selected: hsl(var(--hue), 10%, 20%);

    --text-faint: hsl(var(--hue), 5%, 50%);

    --slight-red: rgb(50, 0, 0);
    --slight-green: rgb(0, 50, 0);
    --slight--light-green: rgb(25, 50, 25);
    --slight-yellow: rgb(50, 50, 0);

    --surface-05: hsl(var(--hue), 20%, 12%);
    --surface-07: hsl(var(--hue), 30%, 14%);
    --surface-1: hsl(var(--hue), 40%, 15%);
    --surface-2: hsl(var(--hue), 40%, 20%);
    --surface-3: hsl(var(--hue), 40%, 25%);
    --surface-4: hsl(var(--hue), 40%, 30%);
    --surface-5: hsl(var(--hue), 40%, 35%);

    --dialog-bg: hsl(var(--hue), 50%, 10%);
}

@media (prefers-color-scheme: light) {
    .theme {
        --text-color: #000;
        --invert-icons: 0;
    
        --background: hsl(var(--hue), 5%, 95%);
        --primary: hsl(var(--hue), 100%, 50%);
        --primary-dark: hsl(var(--hue), 100%, 55%);
    
        --bg-hover: hsl(var(--hue), 10%, 85%);
        --bg-hover-inv: hsl(calc(180 + var(--hue)), 10%, 85%);
    
        --textbtn-bg-hover: hsla(var(--hue), 100%, 50%, 10%);
    
        --bg-btn-selected: hsl(var(--hue), 10%, 80%);
    
        --text-faint: hsl(var(--hue), 5%, 50%);
    
        --slight-red: rgb(255, 200, 200);
        --slight-green: rgb(200, 255, 200);
        --slight--light-green: rgb(230, 255, 230);
        --slight-yellow: rgb(255, 255, 200);
    
        --surface-05: hsl(var(--hue), 30%, 80%);
        --surface-07: hsl(var(--hue), 40%, 78%);
        --surface-1: hsl(var(--hue), 50%, 77%);
        --surface-2: hsl(var(--hue), 50%, 74%);
        --surface-3: hsl(var(--hue), 50%, 69%);
        --surface-4: hsl(var(--hue), 50%, 64%);
        --surface-5: hsl(var(--hue), 50%, 59%);
    
        --dialog-bg: hsl(var(--hue), 50%, 90%);
    }
}

.sidebar {
    background-color: var(--surface-1);
    height: calc(100% - 2rem);

    padding: 1rem;

    display: flex;
    flex-direction: column;
    justify-content: space-between;

    position: fixed;
    left: 0;
    top: 0;

    width: 16rem;

    z-index: 20;
}

.sidebar .category {
    display: flex;
    flex-direction: column;
    gap: .5rem;
}

.sidebar .category button {
    background-color: transparent;
    color: var(--text-color);

    border: none;
    cursor: pointer;
    border-radius: 3rem;

    height: 3rem;
    width: 16rem;

    display: flex;
    align-items: center;
    gap: .5rem;
    padding: 1rem;

    font-family: "Roboto", sans-serif;
    font-size: .9rem;
    font-weight: 500;
}

.sidebar .category button > img {
    filter: invert(var(--invert-icons));

    height: 1.5rem;
}

.sidebar .category button:hover {
    background-color: var(--surface-2);
}

.sidebar .category button.selected {
    background-color: var(--surface-3);
    font-weight: 700;
}

#pages {
    width: 100%;
    height: 100%;
}

body > .right-items {
    width: 100%;
    position: relative;
}

.topbar {
    width: calc(100% - 20rem);
    height: 4rem;
    background-color: transparent;

    position: fixed;
    top: 0;

    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 1rem 0 1rem;

    transition-duration: 100ms;
    transition-property: background-color;

    z-index: 1;
}

.topbar .title {
    font-size: 1.5rem;
    margin: 0;
}

.topbar > div {
    display: flex;
    gap: 1rem;
    align-items: center;
}

#content.scroll .topbar {
    background-color: var(--surface-1);
}

.topbar button {
    background-color: transparent;
    border: none;
    padding: .5rem;
    border-radius: 2rem;

    cursor: pointer;

    display: flex;
    justify-content: center;
    align-items: center;
}

.topbar button:hover {
    background-color: var(--bg-hover);
}

#content.scroll .topbar button:hover {
    background-color: var(--surface-2);
}

.topbar button > img {
    height: 1.5rem;
    filter: invert(var(--invert-icons));
    pointer-events: none;
}

.topbar [cid="open-sidebar"] {
    display: none;
}

.sidebar-spacer {
    width: 18rem;
    flex-shrink: 0;
}

.topbar-spacer {
    height: 4rem;
    flex-shrink: 0;
}

#schedule-time-subpage {
    padding: 1rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    flex-grow: 1;
}

#schedule-time-subpage .time {
    display: flex;
    flex-direction: column;
    align-items: center;
}

#schedule-text {
    font-size: 1.5rem;
    font-weight: 700;
    margin: 0;
}

#schedule-time {
    font-size: 4rem;
    font-weight: 900;
    margin: 0;
}

#schedule-next-subjects {
    display: flex;
    justify-content: space-evenly;
    align-items: center;
    flex-grow: 1;
    width: 100%;
    flex-wrap: wrap;
    gap: 1rem;
}

#schedule-page {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

#schedule-page .subject {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: fit-content;
    border-radius: 1rem;
    padding: 1rem;
}

#schedule-page .subject.changed {
    background-color: var(--slight-red);
}

#schedule-page .subject > p {
    margin: 0;
}

#schedule-page .subject .group {
    font-weight: 500;
    font-size: 1.5rem;
}

#schedule-page .subject .title {
    font-weight: 900;
    font-size: 2rem;
    text-align: center;
}

#schedule-page .subject .description {
    font-weight: 400;
    font-size: 1rem;
    color: var(--text-faint);
    margin-top: .25rem;
}

.segmented-buttons {
    display: flex;
}

.segmented-buttons button {
    color: var(--text-color);
    font-size: 1rem;
    height: 3rem;
    border: 1px solid var(--text-faint);
    border-radius: 0;
    padding: .5rem 1rem .5rem 1rem;
}

.segmented-buttons button > img {
    display: none;
    height: 1.5rem;
}

.segmented-buttons button.selected {
    background-color: var(--bg-btn-selected);
}

.segmented-buttons button.selected > img {
    display: block;
}

.segmented-buttons button:first-of-type {
    border-top-left-radius: 2rem;
    border-bottom-left-radius: 2rem;
}

.segmented-buttons button:last-of-type {
    border-top-right-radius: 2rem;
    border-bottom-right-radius: 2rem;
}

.schedule-view {
    display: flex;
    justify-content: center;
    margin: 1rem;
}

.schedule-view .day-view {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    max-width: 50rem;
}

.schedule-view .day-view .controls {
    display: flex;
    width: 100%;
    justify-content: space-between;
    align-items: center;
}

.schedule-view .day-view .controls > img {
    filter: invert(var(--invert-icons));
    height: 1.5rem;
    padding: .5rem;
    border-radius: 50%;
    cursor: pointer;
    z-index: 0;
}

.schedule-view .day-view .controls > img.disabled {
    filter: invert(var(--invert-icons)) brightness(50%);
    pointer-events: none;
}

.schedule-view .day-view .controls > img:hover {
    background-color: var(--bg-hover-inv);
}

.schedule-view .day-view .hours {
    margin-top: 1rem;
    width: 100%;
}

.schedule-view .day-view .hour {
    display: flex;
    border-bottom: 1px solid var(--text-faint);
    width: calc(100% - 1rem);
    justify-content: space-between;
    padding: 1rem .5rem 1rem .5rem;
}

.schedule-view .day-view .hour.change {
    background-color: var(--slight-red);
}

.schedule-view .day-view .hour.guard {
    background-color: var(--slight-green);
}

.schedule-view .day-view .hour.guard .left-items > div, .schedule-view .day-view .hour.guard .right-items {
    gap: 0;
}

.schedule-view .day-view .hours > :first-child {
    border-top: 1px solid var(--text-faint);
}

.schedule-view .day-view .hour p {
    margin: 0;
}

.schedule-view .day-view .hour .left-items {
    display: flex;
    align-items: center;
}

.schedule-view .day-view .hour .left-items .group {
    font-weight: 500;
}

.schedule-view .day-view .hour .left-items > div {
    display: flex;
    flex-direction: column;
    gap: .5rem;
}

.schedule-view .day-view .hour .left-items .subject {
    font-weight: 700;
}

.schedule-view .day-view .hour .left-items .teacher {
    color: var(--text-faint);
}

.schedule-view .day-view .hour .right-items {
    display: flex;
    flex-direction: column;
    gap: .5rem;
    text-align: right;
}

.schedule-view .day-view .multi-holder {
    border-bottom: 1px solid var(--text-faint);
}

.schedule-view .day-view .multi-holder .hour {
    border-bottom: none;
}

.schedule-view .day-view .nohour {
    border-top: none !important;
    text-align: center;
    color: var(--text-faint);
}

#grades-page {
    height: 100%;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.input-field {
    position: relative;
}

.input-field > input {
    background-color: transparent;
    border: 1px solid var(--text-faint);
    height: 2.25rem;
    width: 15rem;
    max-width: calc(100vw - 3rem);
    border-radius: 4px;
    color: var(--text-color);
    font-size: 1rem;
    outline: none;
    padding: .5rem;
}

.input-field > p {
    position: absolute;
    top: 50%;
    left: .25rem;
    transform: translateY(-50%);
    margin: 0;
    color: var(--text-faint);
    background-color: var(--background);
    padding: .25rem;

    transition-duration: 250ms;
    pointer-events: none;
}

.input-field.selected > p {
    top: 0;
    font-size: .8rem;
}

.btn {
    border: none;
    background-color: var(--primary-dark);
    padding: .5rem 2rem .5rem 2rem;
    border-radius: 4rem;
    height: 2.5rem;
    color: var(--text-color);
    font-size: 1rem;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    font-weight: 500;
}

.btn:hover {
    background-color: var(--primary-dark);
}

.expander {
    border-radius: .5rem;
    width: 40rem;
    max-width: calc(100% - 4rem);
}

.expander > div {
    display: flex;
    width: 40rem;
    max-width: calc(100% - 4rem);
    gap: 1rem;
    padding: .5rem;
    cursor: pointer;
}

.expander > div > p {
    margin: 0;
}

.expander > div > img {
    filter: invert(var(--invert-icons));
    transition-duration: 100ms;
    transition-property: transform;
}

.expander.expanded > div > img {
    transform: rotateZ(-180deg);
}

.expander > span {
    text-align: justify;
    padding: .5rem;
    display: none;
}

.expander.expanded > span {
    display: block;
}

#settings-page {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
}

#settings-page .list {
    width: 100%;
    max-width: 50rem;
}

.list {
    display: flex;
    flex-direction: column;
}

.list .item {
    display: flex;
    width: calc(100% - 1rem);
    justify-content: space-between;
    align-items: center;
    height: 3rem;
    border-bottom: 1px solid var(--text-faint);
    cursor: pointer;
    padding: .5rem;
}

.list .item.spacer {
    height: 4rem;
}

.list .item:hover {
    background-color: var(--bg-hover);
}

.list .item.unselectable, .list .item.spacer {
    cursor: default;
}

.list .item.unselectable:hover, .list .item.spacer:hover {
    background-color: transparent;
}

.list .item:first-of-type {
    border-top: 1px solid var(--text-faint);
}

.list .item p {
    margin: 0;
}

.list .item .title {
    font-size: 1rem;
    font-weight: 700;
}

.list .item img {
    filter: invert(var(--invert-icons));
    height: 1.5rem;
    margin: .5rem;
}

.list .item .title-icon {
    margin-right: 1rem;
}

.list .item > div {
    display: flex;
    align-items: center;
}

#settings-page .about {
    display: flex;
    align-items: center;
}

#settings-page .about > .title {
    font-size: 4rem;
    display: flex;
    margin-top: .5rem;
}

#settings-page .about > .title > span {
    margin-left: .75rem;
    font-size: 3rem;
}

#setpage-security > p {
    margin: 1rem;
}

.dialog {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translateX(-50%) translateY(-50%);
    background-color: var(--dialog-bg);
    padding: 1rem;
    border-radius: 1rem;
    width: 18rem;
    max-width: calc(100vw - 4rem);
    max-height: calc(100vh - 12rem);
    z-index: 20;
}

.dialog-content > .list {
    max-height: calc(100vh - 21rem);
    overflow: scroll;
}

.dialog-content > .list > .item {
    flex-shrink: 0;
}

.dialog-content > .list > .item:hover {
    background-color: var(--surface-1);
}

.dialog > h1 {
    margin-top: 0;
    margin-bottom: .5rem;
}

.dialog > .buttons {
    margin-top: .5rem;
    display: flex;
    justify-content: end;
    gap: 1rem;
}

.dialog > .buttons > button {
    background-color: transparent;
    border: none;
    color: var(--primary);
    font-size: .85rem;
    font-weight: 500;
    padding: .5rem;
    border-radius: 2rem;
    cursor: pointer;
}

.dialog > .buttons > button:hover {
    background-color: var(--textbtn-bg-hover);
}

.dialog .search-field {
    display: flex;
    gap: .5rem;
    border-bottom: 1px solid var(--text-faint);
}

.dialog .search-field > img {
    filter: invert(var(--invert-icons));
}

.dialog .search-field > input {
    background-color: transparent;
    border: none;
    outline: none;
    font-size: 1rem;
    color: var(--text-color);
    width: 100%;
    height: 3rem;
}

.dialog .search-field > input::placeholder {
    color: var(--text-faint);
}

#dialog-bus {
    width: 28rem;
}

.switch {
    background-color: #919191;
    width: 4rem;
    height: 2rem;
    border-radius: 2.5rem;
    border: .25rem solid #646464;
    position: relative;
    cursor: pointer;
}

.switch > div {
    height: 1.5rem;
    width: 1.5rem;
    background-color: #646464;
    border-radius: 50%;
    position: absolute;
    top: 50%;
    left: .3rem;
    transform: translateY(-50%);
    display: flex;
    justify-content: center;
    align-items: center;
    transition-duration: 250ms;
}

.switch > div > img {
    opacity: 0;
    height: 1.1rem;
    transition-duration: 200ms;
}

.switch.active {
    background-color: var(--primary);
    border: .25rem solid var(--primary);
}

.switch.active > div {
    height: 2rem;
    width: 2rem;
    background-color: #fff;
    left: 1.9rem;
}

.switch.active > div > img {
    opacity: 1;
    height: 1.8rem;
    filter: invert(0);
}

@keyframes loading-anim {
    0% {
        margin-left: 0;
        width: 0;
    }
    50% {
        margin-left: 0%;
        width: 100%;
    }
    90% {
        margin-left: 100%;
        width: 0;
    }
    100% {
        margin-left: 100%;
        width: 0;
    }
}

#progress-bar {
    position: fixed;
    top: 0;
    left: 0;
    height: .3rem;
    width: 100vw;
    background-color: var(--primary);
    z-index: 20;
    animation: loading-anim 1.2s linear infinite;
}

#current-school-text {
    width: calc(100vw - 35rem);
    max-width: 27rem;
    text-overflow: ellipsis;
    overflow: hidden;
    text-wrap: nowrap;
    text-align: end;
}

.select-field {
    position: relative;
    width: fit-content;
}

.select-field > select {
    color: var(--text-color);
    background-color: transparent;
    border: 1px solid var(--text-faint);
    padding: .5rem;
    border-radius: 4px;
    height: 3rem;
    width: 20rem;
    font-size: 1rem;
    appearance: none;
}

.select-field > p {
    margin: 0;
    position: absolute;
    top: 50%;
    left: .5rem;
    transform: translateY(-50%);
    color: var(--text-faint);
    pointer-events: none;
    background-color: var(--background);
    padding: .2rem;
    transition-duration: 100ms;
}

.select-field.selected > p {
    top: 0;
    font-size: .8rem;
}

.select-field > img {
    height: 1.5rem;
    filter: invert(var(--invert-icons));
    position: absolute;
    top: 50%;
    right: .5rem;
    transform: translateY(-50%);
}

.food-subpage {
    width: calc(100% - 2rem);
    margin: 1rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

.food-subpage .foods {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

.food-subpage .day {
    max-width: 40rem;
    width: calc(100% - 2rem);
    background-color: var(--surface-05);
    padding: 1rem;
    border-radius: 1rem;
    display: flex;
    flex-direction: column;
    gap: .5rem;
}

.food-subpage .day > h1 {
    margin: 0;
}

.food-subpage .day > div p {
    display: flex;
    align-items: center;
    gap: .5rem;
    width: fit-content;
    margin: 0;
    padding: .5rem .5rem;
    border-radius: .5rem;
}

.food-subpage .day > div p.clickable {
    cursor: pointer;
}

.food-subpage .day > div p.clickable:hover {
    background-color: var(--surface-2);
}

.bus-search-subpage {
    display: flex;
    gap: 2rem;
    transform: translate3d(0, 0, 0);
}

.bus-search {
    display: flex;
    gap: .5rem;
}

.bus-search > div {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.img-btn {
    height: 1.5rem;
    filter: invert(var(--invert-icons));
    padding: .5rem;
    border-radius: 50%;
    cursor: pointer;
}

.img-btn:hover {
    background-color: var(--bg-hover-inv);
}

.img-icon {
    height: 1.5rem;
    filter: invert(var(--invert-icons));
}

.auto-invert {
    filter: invert(var(--invert-icons));
}

#search-bus-btn {
    background-color: var(--primary);
    border: none;
    padding: .5rem;
    border-radius: 50%;
    display: flex;
    cursor: pointer;
}

#search-bus-btn:hover {
    background-color: var(--primary-dark);
}

.time-search-components {
    display: flex;
    justify-content: space-between;
}

#swap-dest-btn {
    margin-top: 2.5rem;
}

#bus-search-results {
    display: flex;
    flex-direction: column;
    width: 100%;
    max-width: 30rem;
}

.bus-results {
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.bus-results .item:last-of-type {
    border-bottom: 1px solid var(--text-faint);
}

.bus-results .item {
    border-top: 1px solid var(--text-faint);
    padding: .5rem;
}

.bus-results .item > p {
    margin: 0;
}

.bus-results .item .content {
    display: flex;
}

.bus-results .item .stations {
    display: flex;
    flex-direction: column;
    width: 100%;
    flex-shrink: 0;
}

.bus-results .item .stations > div {
    display: flex;
    flex-direction: column;
    align-items: center;
    height: 4rem;
    justify-content: space-evenly;
    width: calc(100% - 7rem);
}

.bus-results .item .stations > div p {
    margin: 0;
    text-align: center;
    width: calc(100% - 1rem);
    text-overflow: ellipsis;
    overflow: hidden;
}

.bus-results .item .stations > div .time {
    font-weight: 500;
}

.bus-results .item .buses > div {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .5rem;
    height: 4rem;
    width: 7.5rem;
}

.bus-results .item .buses > div:first-of-type {
    margin-top: 2rem;
}

.bus-results .item .buses > div img {
    filter: invert(var(--invert-icons));
    transform: rotateX(180deg) rotateY(180deg);
    height: 4rem;
}

#bus-search-results .bus-number {
    font-weight: 700;
    width: 3rem;
    margin: 0;
    font-size: 1.5rem;
    display: flex;
    justify-content: center;
    background-color: var(--surface-1);
    cursor: pointer;
    border-radius: .2rem;
}

#bus-search-results .bus-number.nobg {
    background: none;
    cursor: default;
}

#bus-search-results .bus-number img {
    transform: none;
    height: 2rem;
}

.input-field .autofill {
    position: absolute;
    top: 100%;
    bottom: 0;
    width: 100%;
    display: none;
    flex-direction: column;
    height: fit-content;
    z-index: 1;
    background-color: var(--surface-05);
    overflow: hidden;
    border-radius: 4px;
}

.input-field:focus-within .autofill {
    display: flex;
}

.input-field .autofill .item {
    width: calc(100% - 2rem);
    padding: 1rem;
    cursor: pointer;
    text-overflow: ellipsis;
    overflow: hidden;
}

.input-field .autofill .item:hover {
    background-color: var(--surface-1);
}

.secondary-input-field > input {
    background-color: var(--surface-07);
    border: none;
    outline: none;
    font-size: 1rem;
    color: var(--text-color);
    appearance: textfield;
    padding: .25rem .5rem;
    border-bottom: 2px solid var(--surface-3);
    transition-duration: 12ms;
    transition-property: border-bottom;
}

.secondary-input-field:focus-within > input {
    border-bottom: 2px solid var(--primary-dark);
}

.two-number-input > input {
    width: 1.3rem;
    text-align: center;
}

#search-time-settings {
    display: flex;
    gap: 1rem;
    justify-content: space-around;

    margin: .25rem;
}

#search-time-settings p {
    margin: 0;
    margin-bottom: .5rem;
}

.search-time-category {
    display: flex;
    gap: .25rem;
    align-items: center;
}

#bus-no-results {
    align-self: center;
    display: none;
    color: var(--text-faint);
}

.energit-dev {
    /*
    position: absolute;
    bottom: 1rem;
    right: 1rem;
    height: 5rem;
    */
    margin-top: .5rem;
    height: 4rem;
    cursor: pointer;
    filter: invert(calc(1 - var(--invert-icons)));
}

#dialog-bus-content > .general-info > table {
    width: 100%;
}

#dialog-bus-content > .general-info .gps {
    display: flex;
    align-items: center;
    gap: .5rem;
}

#dialog-bus-content > .general-info > table td {
    padding-bottom: .5rem;
}

#dialog-bus-content > .general-info > table td:first-child {
    font-weight: 700;
    padding-right: .5rem;
}

#dialog-bus-content > .stops {
    display: flex;
    flex-direction: column;
    margin-top: .5rem;
    overflow-y: scroll;
    max-height: calc(100vh - 22rem);
}

#dialog-bus-content > .stops > .stop {
    width: calc(100% - 1.6rem);
    padding: .5rem;
    height: 3rem;
    border-bottom: 1px solid var(--text-faint);
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-shrink: 0;
}

#dialog-bus-content > .stops > .stop:first-of-type {
    background-color: var(--slight-green);
    font-weight: 700;
    border-top: 1px solid var(--text-faint);
}

#bus-map {
    width: calc(100vw - 41rem);
    height: calc(100vh - 4rem);
}

#bus-sidepanel {
    overflow: scroll;
    padding-top: .5rem;
    height: calc(100vh - 4.5rem);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem ;
}

.leaflet-control-zoom {
    border: none !important;
    display: flex;
    flex-direction: column;
    gap: .25rem;
}

.leaflet-control-zoom-in {
    border: none !important;
    border-radius: 999rem !important;
    background-color: var(--background) !important;
    color: var(--text-color) !important;
    width: 2.5rem !important;
    height: 2.5rem !important;
    display: flex !important;
    align-items: center;
    justify-content: center;
}

.leaflet-control-zoom-in:hover {
    background-color: var(--surface-1) !important;
}

.leaflet-control-zoom-out {
    border: none !important;
    border-radius: 999rem !important;
    background-color: var(--background) !important;
    color: var(--text-color) !important;
    width: 2.5rem !important;
    height: 2.5rem !important;
    display: flex !important;
    align-items: center;
    justify-content: center;
}

.leaflet-control-zoom-out:hover {
    background-color: var(--surface-1) !important;
}

.leaflet-popup-content-wrapper {
    box-shadow: none !important;
    background-color: var(--background) !important;
    color: var(--text-color) !important;
    border-radius: .5rem !important;
}

.leaflet-popup-tip {
    display: none !important;
}

.leaflet-popup-close-button {
    color: var(--text-faint) !important;
    display: none !important;
}

.leaflet-popup-content {
    margin: 1rem !important;
    font-family: "Roboto", sans-serif !important;
    font-size: 1rem !important;
}


.leaflet-popup-content > div {
    display: flex;
    flex-direction: column;
    gap: .5rem;
    align-items: center;
}

.leaflet-popup-content table tr td:first-of-type {
    font-weight: 700;
}

.leaflet-fade-anim .leaflet-popup {
    transition: none !important;
}

#bus-open-search {
    display: none;
}

#food-picture-dialog {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;

    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

#food-picture-img {
    max-width: calc(100vw - 2rem);
    max-height: calc(100vh - 8rem);
    border-radius: 1rem;
}

.food-picture-controls {
    display: flex;
    margin-top: 1rem;
    align-items: center;
    gap: 1rem;
}

#food-picture-close-btn {
    position: absolute;
    top: 1rem;
    right: 1rem;
}

@media screen and (max-width: 1280px) {
    #bus-map {
        width: calc(100vw - 18rem);
    }

    #bus-sidepanel {
        display: none;
        position: absolute;
        top: 0;
        left: 0;
        background-color: var(--background);
        width: 100%;
        z-index: 1000;
        overflow: auto;
    }

    #bus-sidepanel.show {
        display: flex;
    }

    #bus-open-search {
        display: flex;
    }
}


@media screen and (max-width: 720px) {
    #schedule-page .subject {
        width: 100%;
    }

    .topbar {
        width: calc(100% - 2rem);
    }

    .sidebar {
        width: 20rem;
        max-width: calc(100vw - 5rem);
        transform: translateX(0);

        border-top-right-radius: 1rem;
        border-bottom-right-radius: 1rem;
        z-index: 1;
    }

    .sidebar .category button {
        width: 100%;
    }

    .sidebar.closed {
        transform: translateX(-100%);
    }

    .sidebar.smooth {
        --smooth-speed: 150ms;
        transition-duration: var(--smooth-speed);
        transition-timing-function: linear;
        transition-property: transform;
    }

    #content.sidebar-open {
        filter: brightness(50%);
    }

    .topbar [cid="open-sidebar"] {
        display: flex;
    }

    .sidebar-spacer {
        width: 0;
    }

    #current-school-text {
        width: calc(100vw - 15rem);
        text-overflow: ellipsis;
        overflow: hidden;
        text-wrap: nowrap;
    }

    #bus-map {
        width: 100vw;
    }
}

@media screen and (min-width: 721px) {
    .sidebar {
        transform: translateX(0) !important;
    }
}
