:root {
    --font-family: 'PP Neue Montreal', sans-serif;
}

[theme="dark"] {
    --theme-bg: rgb(53, 53, 53);
    --theme-color: rgb(203, 203, 203);
    --theme-color-lighter: rgb(200, 200, 200);
    --theme-extra: rgb(146, 146, 146);
    --theme-line-bg: rgb(99, 99, 99);
    --theme-stop-bus-name: rgb(105, 105, 105);
    --theme-stop-bus-time: rgb(127, 127, 127);
    --theme-bg-closest-stop: rgb(68, 68, 68);
    --theme-hidden-route-col: #555;
    --theme-bus-icon-inner: lightgray;
    --theme-satellite-btn: #3155c1;
    --theme-breaks-min-color: yellow;
    --theme-short-stops-color: #32f832;
    --theme-chat-recs-bg: #4d4d4d;
    --theme-chat-recs-text: #dedede;
    --theme-unselected-route-bg: #484848;
    --theme-unselected-route-text: #9fa1a5;
    --theme-stops-list-bg: #0f4c3a;
    --theme-stops-list-text: #10b981;
    --theme-link: #8ab4f8;
}

[theme="light"] {
    --theme-bg: white;
    --theme-color: black;
    --theme-color-lighter: gray;
    --theme-extra: dimgray;
    --theme-line-bg: rgb(240, 240, 240);
    --theme-stop-bus-name: rgb(60, 60, 60);
    --theme-stop-bus-time: rgb(105, 105, 105);
    --theme-bg-closest-stop: rgb(240, 240, 240);
    --theme-hidden-route-col: #d2d1d1;
    --theme-bus-icon-inner: white;
    --theme-satellite-btn: rgb(143, 171, 255);
    --theme-breaks-min-color: orange;
    --theme-short-stops-color: #29c529;
    --theme-chat-recs-bg: #f1f1f1;
    --theme-chat-recs-text: #171717;
    --theme-unselected-route-bg: #f3f4f6;
    --theme-unselected-route-text: #6b7280;
    --theme-stops-list-bg: #dcfce7;
    --theme-stops-list-text: #047857;
    --theme-link: #1a73e8;
}

@font-face {
    font-family: 'dunkin';
    src: url('../lib/Dunkin.otf') format('opentype');
}

@font-face {
    font-family: 'blockcraft';
    src: url('../lib/blockcraft.otf') format('opentype');
}

@font-face {
    font-family: 'comic-sans';
    src: url('../lib/Comic Sans MS.ttf') format('truetype');
}

body {
    margin: 0;
    height: 100dvh; /* cool unit */
    background-color: var(--theme-bg);
}

html {
    font-size: 62.5%;
}

html, body {
    overscroll-behavior-y: none;
}

* {
    -webkit-tap-highlight-color: transparent;
}

.leaflet-control-attribution {
    display: none;
}

#map {
    height: 100%;
    background-color: var(--theme-bg);
}

#fireworks {
    position: absolute;
    inset: 0;
    z-index: 401;
    pointer-events: none;
}

.bus-icon-outer {
    /* This class can be used to style the marker */
    background-color: red; /* Example color */
    border-radius: 50%; /* Make it circular */
    border-top-left-radius: 10%;
    border: 2px solid black; /* Optional: add a border */
    height: 27px;
    width: 27px;
    aspect-ratio: 1;
    display: flex;
    justify-content: center;
    align-items: center;
}



.bus-icon-inner {
    width: 13px;
    height: 13px;
    background-color: var(--theme-bus-icon-inner);
    border: 2px solid black;
    border-radius: 50%;
}

.custom-stop-icon .marker-wrapper {
    position: relative;
    width: 18px;
    height: 18px;
}

.custom-stop-icon .corner-label {
    position: absolute;
    top: -0.8rem;
    left: 1.7rem;
    background: white;
    color: black;
    font-size: 1rem;
    padding: 1px 4px;
    border-radius: 1rem;
    box-shadow: 0 1px 2px rgba(0,0,0,0.3);
    white-space: pre;
    /* border: 1px solid black; */
}

.bus-marker-wrapper {
    position: relative;
    width: 30px;
    height: 30px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.bus-marker-wrapper .bus-name-label {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: white;
    color: black;
    font-size: 1rem;
    padding: 1px 4px;
    border-radius: 1rem;
    box-shadow: 0 1px 2px rgba(0,0,0,0.3);
    white-space: nowrap;
    z-index: 1000;
    pointer-events: none;
    /* border: 1px solid black; */
}

/* Distance line marker and tooltip styling - matches ETA tooltip styling */
.custom-distance-marker .distance-marker-wrapper {
    position: relative;
    width: 12px;
    height: 12px;
}

.custom-distance-marker .distance-dot {
    width: 12px;
    height: 12px;
    background-color: #ff0000;
    border: 2px solid #ffffff;
    border-radius: 50%;
    box-shadow: 0 1px 2px rgba(0,0,0,0.3);
}

.custom-distance-marker .distance-tooltip {
    position: absolute;
    top: -2.5rem;
    left: 50%;
    transform: translateX(-50%);
    background: black;
    color: white;
    font-size: 1rem;
    padding: 1px 4px;
    border-radius: 1rem;
    box-shadow: 0 1px 2px rgba(0,0,0,0.3);
    white-space: pre;
    display: block;
    z-index: 1001;
}


.info-popup-wrapper, .route-panel-wrapper, .info-panels-wrapper, .install-pwa-wrapper, .leave-feedback-wrapper {
    width: 100%;
    position: fixed;
    /* left: 0; */
    /* right: 0; */
    z-index: 402;
}

.route-panel-wrapper {
    position: relative;
}

.info-popup-wrapper {
    pointer-events: none; /* Needed since max height to allow tall panel on desktop. Can instead set height 100% on each parent elm in mq */
}

.bus-info-popup {
    display: none;
    font-family: var(--font-family);
    margin: 1rem;
    pointer-events: all;
    position: relative; /* So appears over btns/infos like knight mover mini */
    z-index: 401;
}

.info-top-left {
    /* position: absolute; */
    left: 1rem;
}

.info-top-right {
    /* position: absolute; */
    right: 1rem;
}

.notif-popup {
    background-color: rgb(172, 53, 53);
    padding: 2rem 3rem;
    /* margin: 1rem; */
    font-family: var(--font-family);
    font-size: 1.5rem;
    border-radius: 0.5rem;
    color: rgb(246, 246, 246);
    display: none;
}

/* .getting-location-popup {
    padding: 0.5rem 1.5rem;
    background-color: rgb(255, 167, 0);
    color: white;
    border-radius: 2rem;
    font-size: 1.7rem;
    font-family: var(--font-family);
    text-align: center;
    width: fit-content;
    display: none;
    animation: pulse 1s infinite;
} */

.updating-buses, .getting-location-popup, .slow-connection {
    padding: 0.3rem 1rem;
    background-color: rgb(51, 160, 211);
    color: white;
    font-weight: 500;
    border-radius: 0.3rem;
    font-size: 1.2rem;
    font-family: var(--font-family);
    text-align: center;
    width: fit-content;
    /* display: none; */
}

.slow-connection {
    background-color: orange;
}

.install-pwa {
    padding: 0.5rem 1.7rem;
    background-color: black;
    color: white;
    border-radius: 2rem;
    font-size: 1.8rem;
    font-family: var(--font-family);
    pointer-events: all;
}

.knight-mover {
    background-color: var(--theme-bg);
    color: var(--theme-color);
    padding: 1rem 2rem;
    border-radius: 1rem;
    font-size: 1.7rem;
    font-family: var(--font-family);
    display: none;
    /* position: fixed; */
    inset: 0;
    pointer-events: all;
    height: max-content;
    user-select: none;
}

.knight-mover-mini {
    border-radius: 2rem;
    padding: 0.5rem 1.5rem;
    font-size: 1.7rem;
    font-family: var(--font-family);
    pointer-events: all;
}

.passio-messages {
    font-family: var(--font-family);
    color: var(--theme-color);
    font-size: 1.7rem;
    pointer-events: auto;
}

.passio-mini-alert {
    padding: 0.5rem;
    border-radius: 2rem;
    color: white;
    background-color: rgb(241, 92, 92);
    font-size: 1.5rem;
    font-family: var(--font-family);
    width: min-content;
    white-space: nowrap;
    display: flex;
    grid-template-columns: auto auto;
}

.passio-mini {
    pointer-events: auto;
}

.campus-switcher { pointer-events: auto; }
.campus-toggle {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    background-color: var(--theme-bg);
    border: 1px solid var(--theme-color);
    border-radius: 1rem;
    overflow: hidden;
    font-family: var(--font-family);
}
.campus-toggle-btn {
    padding: 0.5rem 0.9rem;
    color: var(--theme-color);
    text-align: center;
    font-size: 1.3rem;
}
.campus-toggle-btn.selected {
    background-color: var(--theme-color);
    color: var(--theme-bg);
}

.shared {
    border-radius: 2rem;
    font-family: var(--font-family);
    font-size: 1.5rem;
    padding: 0.5rem 1rem;
    color: white;
    background-color: black;
    cursor: pointer;
    pointer-events: auto;
}

.favs > div {
    font-family: var(--font-family);
    font-size: 1.5rem;
    border-radius: 2rem;
    padding: 0.5rem 1rem;
    background-color: var(--theme-bg);
    color: var(--theme-color);
    pointer-events: auto;
    cursor: pointer;
}

.favs span {
    margin-right: 0.25rem;
}

.feedback-sent {
    background-color: #22d832;
    padding: 0.5rem 1.5rem;
    border-radius: 15px;
    color: white;
    z-index: 402;
    font-size: 1.5rem;
    font-family: var(--font-family);
    top: 1rem;
    transform: translateX(-50%);
    left: 50%;
}



@keyframes pulse {
    0% {
        background-color: rgb(255, 167, 0);
    }
    50% {
        background-color: rgb(229, 151, 6);
    }
    100% {
        background-color: rgb(255, 167, 0);
    }
} 

.info-main {
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
}

.info-route {
    font-weight: 800;
    font-size: 3rem;
}

.info-stop-name {
    font-size: 2.5rem;
    color: var(--theme-color);
}

.stop-name-wrapper {
    line-height: 1.2;
    font-size: 2.5rem; /* idk why i need thi here and not in .info-stop-name-text */
}

.info-stop-name-text {
    color: var(--theme-color);
}

.info-stop-switch {
    display: inline-block;
    vertical-align: middle;
    margin-left: 1rem;
    position: relative;
    transform: translateY(-1.5px);
    /* float: right; */
}

.info-stop-switch > div {
    font-size: 1.7rem;
    color: var(--theme-color);
    border: 1px solid var(--theme-color);
    border-radius: 0.8rem;
    font-weight: 500;
    height: min-content;
    overflow: hidden;
    display: flex;
    align-items: center;
}

.info-stop-switch-1, .info-stop-switch-2 {
    padding: 0.1rem 0.5rem;
}

.info-campuses {
    font-size: 2.5rem;
    white-space: nowrap;
    overflow-x: hidden;
}

.info-extra, .info-overdue-break {
    font-size: 1.5rem;
    color: var(--theme-extra);
    line-height: 0.7;
}

.info-overdue-break {
    font-size: 1.3rem !important;
}

.info-capacity {
    color: var(--theme-color);
}

.bus-oos {
    padding: 0.3rem 0.8rem;
    background-color: rgb(234, 62, 62);
    display: none;
}

.bus-depot {
    padding: 0.3rem 0.8rem;
    background-color: rgb(246, 179, 10);
    display: none;
}

.bus-info-main, .info-next-stops {
    background-color: var(--theme-bg);
    /* background-color: red; */
    border-radius: 1rem;
    padding: 1.3rem 2rem;
    color: var(--theme-color);
}

.bus-info-main-left {
    background-color: blue;
}


.bus-info-main-right {
    background-color: green;
}

.info-shared-bus {
    padding: 0.4rem 1rem;
    border-radius: 2rem;
    background-color: black;
    margin-top: -0.5rem;
}

.bus-stopped-for {
    background-color: var(--theme-bg);
    border-radius: 1rem;
    padding: 1rem 2rem;
    font-size: 1.5rem;
    color: #f62929;
    display: none;
}

.info-next-stops {
    /* max-height: 35vh; */
    overflow-y: scroll;
    display: none;
}

.next-stops-grid > div {
    grid-template-columns: auto 1fr auto;
    column-gap: 2rem;
    row-gap: 1.5rem;
    align-items: center;
    margin-bottom: 1rem;
}

.closest-stop-bg {
    background-color: var(--theme-bg-closest-stop);
}

.closest-stop-circle {
    width: 10px;
    height: 10px;
    background-color: rgb(162, 162, 162);
    border-radius: 50%;
}

.closest-stop-divider {
    grid-column: 1 / -1;
}

.closest-stop-divider > hr {
    width: 50%;
    height: 1px;
    background-color: var(--theme-line-bg);
    border-radius: 1rem;
    border: none;
    opacity: 0.5;
}

.next-stop-circle {
    width: 10px;
    height: 10px;
    background-color: rgb(162, 162, 162);
    border-radius: 50%;
    position: relative;
}

.next-stop-circle::after {
    content: '';
    position: absolute;
    width: 8px;
    /* background: var(--theme-line-bg); */
    left: 50%;
    transform: translateX(-50%);
    top: 100%;
}

.next-stop-circle.connecting-line::after {
    height: var(--connecting-line-height);
    background: var(--theme-line-bg);
    top: 4px;
}

.next-stop-campus {
    font-size: 1.2rem;
    color: gray;
    font-weight: bold;
    line-height: 0.8;
}

.next-stop-closest {
    background-color: black;
    color: white;
    padding: 0.3rem 0.57rem;
    border-radius: 0.5rem;
    width: max-content;
}

.next-stop-name {
    font-size: 1.5rem;
}

.next-stop-eta {
    font-size: 1.6rem;
    /* color: rgb(57, 57, 176); */
    font-weight: bold;
}

.next-stop-time {
    font-size: 1.2rem;
    color: #656565;
}

.next-stops-text {
    color: gray;
    font-size: 1rem;
    font-weight: bold;
}

.bus-joined-service {
    /* margin-bottom: 0.5rem; find some other way to add this  */
    font-size: 1.3rem;
    color: gray;
}

.bus-data-extra {
    font-size: 1.3rem;
    color: var(--theme-color);
    margin-top: 1rem;
    overflow-x: scroll;
}


.my-location-popup {
    background-color: var(--theme-bg);
    border-radius: 1rem;
    margin: 1rem;
    padding: 1rem;
    font-family: var(--font-family);
    display: none;
    pointer-events: all;
    overflow-y: scroll;
    max-height: 40vh;
    scrollbar-width: none;
    position: relative;
}

.my-location-popup::-webkit-scrollbar {
    display: none;
}

.stop-info-popup {
    margin: 1rem;
    font-family: var(--font-family);
    display: none;
    pointer-events: all;
    position: relative; /* So appears over btns/infos like knight mover mini */
}

.stop-info-popup-inner {
    background-color: var(--theme-bg);
    border-radius: 1rem;
    overflow-y: scroll;
    max-height: 40vh;
    padding: 1rem;
}

.stop-info-back-wrapper, .bus-info-back-wrapper {
    font-size: 1.7rem;
    background-color: var(--theme-bg);
    color: var(--theme-color);
    border-radius: 1rem;
    padding: 0 1.5rem 0 1.2rem;
    display: none; /* Hidden by default */
    transition: 100ms;
    height: 3.5rem;
}

.stop-info-back-wrapper:hover {
    background-color: rgb(88, 88, 234);
    color: rgb(242, 242, 242)
}

.bus-btns, .stop-btns, .building-btns {
    position: absolute;
    right: 0;
    top: 0;
}

.bus-star, .bus-share, .bus-comment, .bus-follow, .stop-navigate, .stop-directions, .bus-history, .building-navigate, .building-directions {
    color: var(--theme-color);
    background-color: var(--theme-bg);
    font-size: 1.7rem;
    aspect-ratio: 1;
    min-height: fit-content;
    display: flex;
    justify-content: center;
    /* max-height: 100%; */
    width: 3.5rem;
    transition: 80ms;
}

.bus-info-bottom i {
    aspect-ratio: 1;
    padding: 0;
}

.bus-share > i { /* just this one? */
    aspect-ratio: 1;
}

.bus-log-wrapper {
    padding: 1.5rem 2rem;
    background-color: var(--theme-bg);
    color: var(--theme-color);
    border-radius: 1rem;
    font-size: 1.2rem;
    margin: 1rem;
    font-family: var(--font-family);
    max-height: 33vh;
    height: min-content;
    overflow-y: scroll;
    scrollbar-width: none;
    z-index: 401;
    position: fixed;
    inset: 0;
}

.bus-log-wrapper::-webkit-scrollbar {
    display: none;
}   

.bus-log {
    grid-template-columns: auto 1fr;
}

.info-stop-servicing {
    font-size: 1.5rem;
    font-weight: bold;
}

.stop-info-use-route-selectors-notice {
    border: 1px solid green;
    background-color: rgb(128 249 128);
    color: green;
}

.no-buses, .closest-stop {
    color: white;
    background-color: black;
    padding: 0.25rem 1rem;
    border-radius: 0.5rem;
}

.stop-info-buses-grid, .stop-info-buses-grid-next {
    display: grid;
    grid-template-columns: auto 1fr auto auto;
    column-gap: 0.5rem;
    margin: 1rem;
    margin-top: 0;
}

.stop-bus-route {
    font-size: 1.8rem;
    font-weight: bold;
}

.stop-bus-id {
    font-size: 1.5rem;
    color: var(--theme-stop-bus-name)
}

.stop-octagon {
    width: 2rem;
    aspect-ratio: 1;
    --o:calc(50%*tan(-22.5deg));
    clip-path: polygon(
        var(--o) 50%,50% var(--o),
        calc(100% - var(--o)) 50%,
        50% calc(100% - var(--o))
    );
    background-color: rgb(241, 70, 70);
    transform: rotate(90deg);
    display: flex;
    justify-content: center;
    align-items: center;
}

.stop-octagon > div {
    font-size: 1.7rem;
    transform: rotate(-90deg);
    font-weight: 900;
    color: white;
    font-family: 'PP Neue Montreal';
}

.stop-oos {
    color: white;
    padding: 0.25rem 0.8rem;
    font-size: 1.18rem;
    font-weight: 500;
    background-color: rgb(218, 49, 49);
    border-radius: 0.5rem;
}

.stop-depot {
    color: white;
    padding: 0.25rem 0.8rem;
    font-size: 1.18rem;
    font-weight: 500;
    background-color: rgb(246, 179, 10);
    border-radius: 0.5rem;
}

.stop-bus-eta {
    font-size: 1.8rem;
    font-weight: bold;
    color: var(--theme-color)
    /* text-align: right; */
}

.stop-bus-time {
    font-size: 1.5rem;
    color: var(--theme-stop-bus-time) /* #616161; */
}

.stop-info-avg-wait, .stop-info-show-next-loop, .always-show-next-loop {
    font-size: 1.3rem;
    color: gray;
    margin: 0 1rem 1rem 1rem;
}


.my-location-popup {
    padding-bottom: 2rem;
    padding-top: 1.5rem;
}

.closest-stops-list {
    grid-template-columns: 1fr auto;
    width: 90%;
}

.my-location-popup .you {
    color: var(--theme-color);
}

.my-location-popup .stops {
    border-radius: 0.5rem;
    padding: 0.25rem 1rem;
    background-color: black;
    /* color: var(--theme-color-lighter); */
    color: white;
}

.my-location-popup .name {
    color: var(--theme-color-lighter);
    font-size: 1.6rem;
}

.my-location-popup .dist {
    color: var(--theme-color);
    font-size: 1.7rem;
}

.dist {
    display: flex;
    align-items: center;
}

.route-here {
    border-radius: 0.5rem;
    padding: 0.25rem 1rem;
    color: white;
    font-size: 1.3rem;
    font-weight: 500;
}


.route-panel {
    background-color: var(--theme-bg);
    font-family: var(--font-family);
    /* margin: 1rem; */
    height: 100vh;
}

.route-name {
    font-weight: bold;
    font-size: 2.5rem;
}

.route-campuses {
    font-size: 2rem;
    color: var(--theme-color)
}

.color-circle {
    border-radius: 5rem;
    background-color: red;
    aspect-ratio: 1 / 1;
    height: 100%;
}

.route-header {
    display: grid;
    grid-template-columns: 1fr auto;
    /* align-items: center;
    column-gap: 1rem; */
}

.color-circle-select {
    border-radius: 50%;
    height: 100%;
    aspect-ratio: 1;
    display: flex;
    justify-content: center;
    align-items: center;
}

.color-selection-modal {
    background-color: var(--theme-bg);
    position: fixed;
    inset: 0;
    z-index: 402;
    height: 100vh;
    width: 100%;
    overflow-y: scroll;
    font-family: var(--font-family);
    color: var(--theme-color);
    white-space: pre;
    overflow: hidden;
}

.color-select-grid {
    scrollbar-width: none;
}

.color-select-grid::-webkit-scrollbar {
    display: none;
}

.color-select-btns > div {
    padding: 1rem;
    border-radius: 3rem;
    color: white;
}

.route-active-buses {
    font-size: 1.5rem;
    color: var(--theme-color-lighter);
}

.route-bus-name {
    font-size: 1.7rem;
    color: var(--theme-extra)
}

.route-bus-speed {
    font-size: 1.5rem;
    color: var(--theme-color-lighter)
}

.rbfs-bn {
    color: var(--theme-extra);
}

.route-stops-grid {
    display: grid;
    grid-template-columns: auto 1fr;
    column-gap: 2rem;
    row-gap: 3rem;
    align-items: center;
    margin-top: 2rem;
    padding: 1rem;
    overflow-y: scroll;
    margin-bottom: 8rem;
    padding-bottom: 18rem;
    scrollbar-width: none; /* Firefox */
}
.route-stops-grid::-webkit-scrollbar {
    display: none; /* Chrome, Safari, Opera */
}

.route-stop-name {
    font-size: 1.75rem;
    color: var(--theme-color)
}

.route-buses-for-stop {
    display: grid;
    grid-template-columns: auto auto 1fr;
    font-size: 1.5rem;
    column-gap: 1rem;
}

.route-buses-for-stop {
    color: var(--theme-color)
}

.buses-panel-wrapper {
    background-color: var(--theme-bg);
    font-family: var(--font-family);
    /* padding: 1rem; */
    display: none;
    /* overflow-y: scroll; */
    height: min-content;
    width: 100%;
}

/* Show buses panel when it's the active panel */
.subpanel.buses-panel .buses-panel-wrapper {
    display: block !important;
}


.live-overview {
    padding: 0.2rem 1.3rem;
    font-size: 1.3rem;
    color: white;
    background-color: #2adb2a;
    border-radius: 0.5rem;
}

.wait-times {
    font-size: 1.4rem;
    color: var(--theme-color);
    margin: 1rem;
    column-count: 2;
}

.wait-times > div {
    background-color: var(--theme-bg-closest-stop);
    break-inside: avoid;
    margin-bottom: 1rem;
    border-radius: 1rem;
    padding: 1rem 1.8rem;
}


.bottom {
    position: absolute;
    flex-direction: column;
    display: flex;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 402;
    /* padding: 0.5rem; */
    padding-bottom: 0.7rem;
    /* row-gap: 1rem; */
    width: 100%;
    row-gap: 0.8rem;
    pointer-events: none;
    box-sizing: border-box;
}

.panout, .centerme, .fly-closest-stop, .shoot-fireworks, .satellite-btn, .info-panels, .search-btn, .buildings-btn {
    background-color: var(--theme-bg);
    padding: 1.7rem;
    border-radius: 5rem;
    font-size: 2.5rem;
    /* width: min-content; */
    color: var(--theme-color);
    display: flex;
    justify-content: center;
    align-items: center;
    aspect-ratio: 1;
    pointer-events: all;
    cursor: pointer;
    transition: background-color 0.15s ease, color 0.15s ease;
}

.btn-feedback-active {
    background-color: var(--theme-satellite-btn) !important;
    color: white !important;
}

.btn-pulse {
    animation: btn-pulse 1.5s ease-in-out infinite;
}

@keyframes btn-pulse {
    0%, 100% {
        background-color: var(--theme-satellite-btn);
    }
    50% {
        background-color: #5a7ce8;
    }
}

.panout > i, .centerme > i, .fly-closest-stop > i, .shoot-fireworks > i, .info-panels > i, .chat-btn > i, .search-btn > i, .building-directions > i, .buildings-btn > i {
    font-size: 2rem;
}

.panout {
    color: rgb(185, 185, 185);
}

.satellite-btn {
    background-color: var(--theme-bg);
    transition: background-color 0.2s ease;
}

.satellite-btn.active {
    background-color: var(--theme-satellite-btn);
    color: white;
}

.buildings-btn {
    transition: background-color 0.2s ease;
}

.buildings-btn.active {
    background-color: var(--theme-satellite-btn);
    color: white;
}

.buildings-btn.loading {
    opacity: 0.6;
    cursor: not-allowed;
    pointer-events: none;
}

.buildings-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.centerme-wrapper {
    display: none;
}

.centerme {
    height: min-content;
}

.centerme-bottom-right {
    position: absolute;
    bottom: 2rem;
    right: 0.5rem
}

.right-btns-bottom {
    position: absolute;
    bottom: 2rem;
    right: 2rem
}

.shoot-fireworks {
    transition: 0.2s ease;
}

.fa-gear {
    padding: 1rem;
}

.route-selectors {
    display: flex;
    font-family: var(--font-family);
    font-weight: bold;
    column-gap: 0.5rem;
    user-select: none;
    width: min-content;
    overflow-x: scroll;
    touch-action: pan-x;
    padding-top: 1rem;
    /* margin-left: -1rem; */
    padding-left: 2rem;
    padding-bottom: 1rem;
    scrollbar-width: none;
    pointer-events: all;
    line-height: 1.6;
    padding-right: 1rem;
}

/* Hide scrollbar for WebKit browsers */
.route-selectors::-webkit-scrollbar {
    display: none;
}

.route-selector {
    font-size: 2rem;
    color: white;
    border-radius: 4rem;
    padding: 0.5rem 2rem;
    white-space: pre;
    /* pointer-events: none; */
}

/* iOS Safari */
@supports (-webkit-touch-callout: none) {
    .route-selector {
        margin-bottom: 1rem;
    }
}

.route-selector:last-child {
    margin-right: 2rem;
}


.settings-btn {
    background-color: black;
    padding: 0 !important;
    aspect-ratio: 1;
    height: 100%;
    max-height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    line-height: 1;
    box-sizing: border-box;
    /* margin-left: 1rem; */
}

/* Remove margin when settings button is at the end */
.settings-btn:last-child {
    margin-left: 0;
}

.info-speed-wrapper {
    line-height: 1;
    text-align: center;
}

.info-speed {
    font-size: 2rem;
}

.info-mph {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--theme-color-lighter);
}


.settings-panel {
    /* height: 100vh; */
    background-color: #f4f4f4;
    display: none;
    font-family: var(--font-family);
    padding: 2rem;
    z-index: 402;
    position: fixed;
    inset: 0;
    overflow-y: scroll;
}

.settings-main-heading {
    /* color: black; */
    font-size: 1.8rem;
    /* font-weight: bold; */
}

.settings-heading {
    font-size: 1.5rem;
    margin-left: 0.5rem;
    margin-bottom: 0.2rem;
    color: gray;
    /* user-select: none; */
}

.settings-options {
    border-radius: 0.5rem;
    border: 1px solid rgb(185, 185, 185);
    font-size: 1.8rem;
    background-color: white;
    /* text-align: center; */
    user-select: none;
}

.marker-style-inner-grid {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    width: 100%;
    height: 100%;
}

.marker-option-cell {
    border-bottom: 1px solid rgb(185, 185, 185);
}

.marker-option-cell:nth-child(n+3) {
    border-bottom: none;
}

.marker-option-cell:nth-child(even) {
    border-left: 1px solid rgb(185, 185, 185);
}

.settings-option {
    padding: 0.5rem;
    display: flex;
    justify-content: center;
    align-items: center;
    color: rgb(54, 54, 54);
    cursor: pointer;
}

.marker-style-grid .settings-option {
    border-bottom: 1px solid rgb(185, 185, 185);
}

.marker-style-grid .settings-option:nth-child(odd) {
    border-right: none;
}

.marker-style-grid .settings-option:nth-child(even) {
    border-left: none;
}

.marker-style-grid .settings-option:nth-child(n+7) {
    border-bottom: none;
}

.dev-settings-option {
    transition: background-color 0.15s ease;
}

.dev-settings-option:active {
    background-color: rgb(210, 210, 255);
}

.settings-selected {
    background-color: rgb(210, 210, 255);
    /* color: white; */
}

.settings-option:not(:first-child) {
    border-left: 1px solid rgb(185, 185, 185);
}

.marker-style-grid .settings-option:not(:first-child) {
    border-left: 1px solid rgb(185, 185, 185);
}

.marker-option-cell .settings-option:not(:first-child) {
    border-left: none;
}

.marker-option-cell:nth-child(even) {
    border-left: 1px solid rgb(185, 185, 185);
}

.marker-style-inner-grid .settings-option:nth-child(2) {
    justify-content: flex-start;
}

.marker-style-inner-grid .settings-option:nth-child(1) {
    justify-content: flex-end;
    padding-right: 1rem;
}

.settings-close > div, .events-close, .feedback-x, .chat-ui-close {
    background-color: rgb(208, 77, 77);
    position: fixed;
    bottom: 1rem;
    right: 0;
    height: 4rem;
    width: 4rem;
    color: white;
    font-family: Arial;
    font-size: 2rem;
    border-radius: 50%;
    margin: 1rem;
    z-index: 402;
    cursor: pointer;
}

.info-panels-close {
    background-color: rgb(208, 77, 77);
    border-radius: 50%;
    cursor: pointer;
    aspect-ratio: 1;
}

.span-i {
    padding: 0.7rem;
    color: white;
    background: rgb(200, 200, 200);
    border-radius: 50%;
    aspect-ratio: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1.4rem;
    font-style: italic;
    min-height: max-content;
    margin-left: 0.7rem;
}


.marker.small-marker {
    height: 20px;
}

.small-marker > .passio-marker-circle {
    height: 18px;
}

.marker.medium-marker {
    height: 27px;
}

.medium-marker > .passio-marker-circle {
    height: 22px;
}

.marker.big-marker {
    height: 35px;
    margin: 0.3rem;
}

.passio-marker.big-marker {
    margin: 0.3rem;
}

.big-marker > .passio-marker-circle {
    height: 26px;
}

/* Make duck marker preview icons blue in settings */
.duck-marker {
    color: rgb(68, 151, 239);
}

.marker {
    border-radius: 50%;
    border-top-left-radius: 10%;
    background-color: rgb(68, 151, 239);
    border: 2px solid black;
    aspect-ratio: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    /* transform: rotate(90deg); */
}

.marker > div {
    background-color: white;
    border-radius: 50%;
    border: 2px solid black;
    aspect-ratio: 1;
}

.settings-marker-style .small-marker {
    background-color: rgb(68, 151, 239);
}

.settings-marker-style .duck-marker {
    color: rgb(68, 151, 239);
}

.passio-marker {
    position: relative;
    display: block;
}

.passio-marker-circle {
    border-radius: 50%;
    background-color: rgb(246, 246, 246);
    border: 1px solid rgb(68, 151, 239);
    aspect-ratio: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative; /* Enable positioning context for child */
}

.passio-marker-arrow-out {
    position: absolute;
    aspect-ratio: 1;
    margin: 1px;
}

.passio-marker-arrow-in {
    background-color: rgb(68, 151, 239);
    border-radius: 1px;
    aspect-ratio: 1;
}

.big-marker .passio-marker-arrow {
    top: 55%;
}

.medium-marker .passio-marker-arrow {
    top: 60%;
}

.small-marker .passio-marker-arrow {
    top: 70%;
}

.passio-marker img {
    width: 35%;
}

.passio-bus-icon {
    width: 35%;
    transform-origin: center;
}

.rider-marker {
    border-radius: 50%;
    background-color: rgb(68, 151, 239);
    border: 3px solid white;
    color: white;
    aspect-ratio: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 3px;
    box-shadow: 0 0 3px rgba(0, 0, 0, 0.3);
}

.rider-marker > i {
    text-shadow: 0 0px 2px rgba(0, 0, 0, 0.8);
    transform: rotate(-45deg);
}

.rider-marker.small-marker {
    font-size: 0.7rem;
}

.rider-marker.medium-marker {
    font-size: 1.2rem;
}

.rider-marker.big-marker {
    font-size: 1.8rem;
}

.duck-marker {
    display: flex;
    justify-content: center;
    align-items: center;
    border-radius: 50%;
    transition: all 0.2s ease;
}

.duck-marker i {
    font-size: 16px;
    text-shadow:
        -1px -1px 0 #fff,
        1px -1px 0 #fff,
        -1px 1px 0 #fff,
        1px 1px 0 #fff,
        -1px 0 0 #fff,
        1px 0 0 #fff,
        0 -1px 0 #fff,
        0 1px 0 #fff;
    transform: scaleX(-1);
}


.duck-marker.small-marker i {
    font-size: 12px;
}

.duck-marker.medium-marker i {
    font-size: 16px;
}

.duck-marker.big-marker i {
    font-size: 20px;
}

/* Make duck marker preview icons blue in settings */
.marker .duck-marker {
    color: rgb(68, 151, 239);
}

.small-marker > div {
    height: 8px;    
}

.medium-marker > div {
    height: 13px;    
}

.big-marker > div {
    height: 19px;    
}

.settings-toggle {
    display: flex;
    align-items: center;
    user-select: none;
}

.toggle-input {
    display: none; /* Hide the default checkbox */
}

.toggle-label {
    cursor: pointer;
    width: 50px;
    height: 24px;
    background-color: #ccc;
    border-radius: 50px;
    position: relative;
    transition: background-color 0.3s;
}

.toggle-slider {
    position: absolute;
    top: 2px;
    left: 2px;
    width: 20px;
    height: 20px;
    background-color: white;
    border-radius: 50%;
    transition: transform 0.3s;
}

.toggle-input:checked + .toggle-label {
    background-color: #4caf50;
}

.toggle-input:checked + .toggle-label .toggle-slider {
    transform: translateX(26px); /* Move the slider when checked */
}

.settings-rubus {
    display: grid;
    grid-template-columns: 1fr 3fr;
    margin-top: 1rem;
    padding-top: 2rem;
    border-top: 2px solid rgb(214, 214, 214);
    column-gap: 0.5rem;
}

.settings-rubus-logo {
    background-image: url('../img/rubus-favicon-autumn.png');
    background-repeat: no-repeat;
    background-size: contain;
    background-position: center center;
}

.settings-rubus-attribution {
    font-size: 1.25rem;
}

.footer-selected {
    font-weight: bold;
    text-decoration: underline;
    color: black;
}

.rubus-ai {
    display: grid;
    grid-template-columns: 1fr 5fr;
    column-gap: 2rem;
    padding: 1.5rem;
    border-radius: 2rem;
    background: linear-gradient(135deg, #2e003e, #4c1a57, #7a14ce);
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.rubus-ai::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(
        120deg,
        rgba(255, 255, 255, 0) 25%,
        rgba(255, 255, 255, 0.3) 50%,
        rgba(255, 255, 255, 0) 75%
    );
    background-size: 200% 100%;
    background-position: -100% 0;
    animation: shimmer-overlay 5s linear infinite;
    z-index: 2;
    pointer-events: none;
}

@keyframes shimmer-overlay {
    0% {
        background-position: -100% 0;
    }
    100% {
        background-position: 100% 0;
    }
}



.pulsate {
    animation: pulsate 1.5s infinite;
}

@keyframes pulsate {
    0% { opacity: 1; }
    50% { opacity: 0.5; }
    100% { opacity: 1; }
}