:root {
    --sidebar-width: 300px;
    /* --topbar-height: 60px; */
}

@font-face {
    font-family: "Digital";
    src: url("ds-digi-webfont.woff") format("woff");
}

.sidebar {
    /* position: absolute; */
    /* z-index: 9999; */
    /* min-width: var(--sidebar-width); */
    /* flex: 0 0 auto; */
    background-color: rgb(72, 72, 72);
    /* padding: 0.5rem; */
    color: #eee;
    /* transition: margin .15s; */
    /* height: 100vh; */
    /* overflow-Y: auto; */
    /* overflow-x: hidden; */
    /* position: relative; */
}

#sidebar:hover {
    min-width: var(--sidebar-width);
}

button:disabled {
    color: -internal-light-dark(rgba(16, 16, 16, 0.3), rgba(255, 255, 255, 0.3));
    pointer-events: all
}

#sidebar.hide {
    margin-left: calc(-1 * var(--sidebar-width));
}

#sidebar-title {
    font-size: 1.3rem;
    font-weight: 900;
    margin-left: 0.5rem;
    margin-bottom: 1rem;
}

#close_sidebar {
    position: absolute;
    top: 50%;
    left: var(--sidebar-width);
    cursor: pointer;
    margin-left: -2px;
    z-index: 99999;
    transition: .15s;
    width: 1.5rem;
    height: 1.5rem;
}

#close_sidebar::before {
    width: 1.5rem;
    content: "◀";
    height: 1.5rem;
    display: block;
    text-align: center;
    line-height: 1.5rem;
    font-size: .7rem;
    border-radius: 0 .5rem .5rem 0;
    background-color: #333;
    color: var(--secondary);
    font-weight: bolder;
    position: absolute;
    pointer-events: none;
    top: 0;
    left: 0;
    text-indent: -.25rem;
}

#close_sidebar .custom-checkbox {
    opacity: 0;
}

#close_sidebar * {
    cursor: pointer !important;
}

#sidebar.hide+#close_sidebar {
    transform: translateX(calc(-1 * var(--sidebar-width))) rotate(180deg);
}

#sidebar.hide+#close_sidebar::before {
    border-radius: .5rem 0 0 .5rem;
}

#topbar {
    position: fixed;
    top: 0;
    height: var(--topbar-height);
    left: 0;
    right: 0;
    background-color: #000;
    display: flex;
    padding: 0.75rem 2rem;
    z-index: 1;
}

#below_top {
    /* position: fixed; */
    /* top: var(--topbar-height); */
    left: 0;
    right: 0;
    bottom: 0;
    /* background-color: rgb(72,72,72); */
    color: #eee;
    overflow: auto
}

#brand {
    flex: 1 1 auto;
    margin-top: -0.5rem;
}

.rc-slider-mark-text.rc-slider-mark-text-active {
    color: #eee;
}

#graphs {
    background-color: rgb(52, 51, 50);
    /* background-color: #ddd; */
    height: 100%;
    overflow-Y: auto;
    overflow-x: hidden;
    /* padding: 1.5rem 0rem 0.5rem 0rem; */
    flex: 1 1 auto;
    position: relative;
}

#greeting {
    display: flex;
    font-size: 1rem;
    color: #eee;
    margin: auto 0;
    margin-right: 1rem;
}

#greeting span {
    font-weight: 900;
    margin-left: .25rem;
}

.numeric-label {
    height: 3rem;
    line-height: 3rem;
    width: 100px;
    white-space: nowrap;
}

.numeric-input {
    padding: 0 .5rem;
    margin-left: 0.5rem;
    font-family: "Digital";
    font-size: 3rem;
    color: var(--primary) !important;
    background-color: transparent;
    height: 3rem;
    line-height: 3rem;
    border: none;
    display: block;
    border-bottom: 1px solid #eee !important;
    border-radius: 3px 0 0 0;
    text-align: right;
    min-width: 0 !important;
}

.numeric-input+span {
    font-family: "Digital";
    font-size: 1.5rem;
    color: var(--primary);
    height: 3rem;
    line-height: 3rem;
    border-bottom: 1px solid #eee;
    border-radius: 0 3px 0 0;
    padding-right: 4px;
}

.numeric-input:hover,
.numeric-input:focus,
.numeric-input:hover+span,
.numeric-input:focus+span {
    background-color: rgba(255, 255, 255, 0.1) !important;
}

.inline-slider {
    transform: translateY(25px);
    margin: 0 -22px -20px -12px !important;
}

#bike_display {
    position: relative;
    height: 234px;
    /* margin-left: 50px; */
}

#wheel {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    border-radius: 100%;
    border: 10px solid #111;
    z-index: 1;
    transition: 0.25s;
}

#rotor {
    border-radius: 100%;
    background-color: var(--primary-darker);
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    transition: 0.25s;
}

.ray {
    width: 100%;
    height: 12px;
    border-top: 2px solid #000;
    border-bottom: 2px solid #000;
    position: absolute;
    top: 50%;
    left: 50%;
}

.ray:nth-child(1) {
    transform: translate(-50%, -50%) rotate(10deg);
}

.ray:nth-child(2) {
    transform: translate(-50%, -50%) rotate(40deg);
}

.ray:nth-child(3) {
    transform: translate(-50%, -50%) rotate(70deg);
}

.ray:nth-child(4) {
    transform: translate(-50%, -50%) rotate(100deg);
}

.ray:nth-child(5) {
    transform: translate(-50%, -50%) rotate(130deg);
}

.ray:nth-child(6) {
    transform: translate(-50%, -50%) rotate(160deg);
}

#sidebar_buttons {
    margin-top: 0.5rem;
}

#bike_display:hover #wheel {
    animation: turn 2s linear infinite;
}

.upload-filename {
    position: absolute;
    bottom: 2rem;
    color: #000;
    font-size: 1rem;
    left: 0;
    right: 0;
}

.icon {
    width: 18px;
    margin: 0 5px;
    filter: brightness(0) invert(1);
}


.icon-red {
    margin-right: 0.5rem;
    height: 24px;
    width: 24px;
    /* filter: brightness(0) invert(87%) sepia(11%) saturate(4222%) hue-rotate(333deg) brightness(98%) contrast(89%); */
    /* filter: brightness(0) invert(82%) sepia(20%) saturate(6562%) hue-rotate(338deg) brightness(100%) contrast(85%); #eb9c34 */
    /* filter: brightness(0) invert(70%) sepia(56%) saturate(6820%) hue-rotate(326deg) brightness(97%) contrast(111%); #ff5252 */
    /* filter: brightness(0) invert(83%) sepia(60%) saturate(316%) hue-rotate(93deg) brightness(100%) contrast(90%); */
    /* filter: invert(76%) sepia(74%) saturate(293%) hue-rotate(146deg) brightness(98%) contrast(93%); */
    /* filter: brightness(0) invert(18%) sepia(72%) saturate(1527%) hue-rotate(332deg) brightness(147%) contrast(122%); */
    filter: invert(54%) sepia(63%) saturate(504%) hue-rotate(131deg) brightness(96%)
}

.icon-sm {
    width: 20px;
    height: 20px;
    margin-right: 0;
    margin-left: 0;
}

.icon-xs {
    width: 14px;
    height: 14px;
    margin-right: 0;
    margin-left: 0;
}

.icon-lg {
    width: 32px;
    height: 32px;
    margin-right: 1rem;
    margin-left: 1rem;

}

.modal-content,
.upload-modal .modal-header,
.upload-modal .modal-body {
    border: none
}

.modal-dialog {
    width: 100%;
}

.modal-content {
    background-color: transparent;
    /* margin: 1rem; */
    width: 100%;
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 1.15) !important;
}

.modal-header {
    background-color: #333;
    color: #eee;
    border-radius: 5px 5px 0 0;
    border-bottom-color: #333;
    /* padding: 16px 16px 0; */
}

.settings-modal {
    padding: 0 !important;
    background-color: rgb(72, 72, 72);
}

.settings-card {
    background-color: rgb(72, 72, 72);
    border-top: 0px;
}

.modal-body {
    background-color: rgb(72, 72, 72);
    color: #eee;
    border-radius: 0 0 5px 5px;
    padding: 1rem 25px;
}

.modal-title {
    width: 100%;
}

.alert-bl {
    position: fixed;
    bottom: 1rem;
    left: 1rem;
    z-index: 99999;
}

.alert {
    font-weight: 900;
}

.alert:not(.alert-bl) {
    margin: 0.5rem 0;
}

.alert-danger {
    background-color: #f9471e;
    color: #333;
}

.alert-success {
    background-color: var(--secondary);
    color: #333;
}

@keyframes blink {
    0% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.25);
    }

    100% {
        transform: scale(1);
    }
}

#elevation_graph text.gtitle:hover {
    opacity: 0.5
}

#graphs b {
    font-size: 1.1rem;
    font-family: "Open Sans", verdana, arial, sans-serif;
    /* color: rgb(34, 34, 34); */
    color: #eee;
    font-variant: small-caps;
    border-bottom: 2px solid var(--secondary);
}

#topbar .btn-main {
    padding: 0 4px;
}

#settings_button img {
    margin-top: -4px;
}

.toast.detail-toast {
    position: fixed;
    left: calc(var(--sidebar-width) + 0.5rem);
    top: calc(var(--topbar-height) + 2.5rem);
    z-index: 999;
    background-color: transparent;
    border: none;
    border-radius: 5px;
    max-width: 90vh;
}

#sidebar.hide+#close_sidebar+#graphs .toast.detail-toast {
    left: 0.5rem;
}

.detail-toast .toast-header {
    background-color: var(--primary);
    color: #eee;
    font-size: 1.1rem;
    border-radius: 5px 5px 0 0;
    cursor: move;
    border-bottom: 1px solid var(--primary);
}

.detail-toast .toast-header button.btn-close {
    margin-left: .5rem;
    filter: invert(1) grayscale(100%) brightness(200%)
}

/* .detail-toast .toast-header button.btn-close:hover {
    opacity: 1 !important;
} */

.detail-toast .toast-body {
    background-color: rgb(100, 100, 100);
    color: #eee;
    border-radius: 0 0 5px 5px;
    padding: 0.5rem 1.5rem;
    min-height: 200px;
    height: 450px;
    max-height: 550px;
    resize: vertical;
    overflow: auto;
}

.summary-title>div,
.summary-value>div {
    padding: 0.1rem 0.5rem;
    white-space: nowrap;
    font-family: "Open Sans", verdana, arial, sans-serif;
    font-weight: 500;
    font-size: 0.75rem;
}

.summary-value>div {
    text-align: right;
}

.summary-title>div:nth-child(even),
.summary-value>div:nth-child(even),
.summary-unit>div:nth-child(even) {
    background-color: rgb(64, 64, 64);
}

.summary-unit>div,
.summary-value>div {
    padding: 0.1rem 0.5rem 0.1rem 0;
    margin-left: -0.33rem;
    white-space: nowrap;
    font-family: "Open Sans", verdana, arial, sans-serif;
    font-weight: 500;
    font-size: 0.75rem;
}

.stats-section {
    padding: 0.5rem;
    background-color: rgba(0, 0, 0, 0.2);
    border-radius: 4px;
    font-family: "Open Sans", verdana, arial, sans-serif;
    margin-bottom: 0.5rem;
}

.stats-title {
    font-size: 1.1rem;
    font-weight: 700;
    font-variant: small-caps;
    margin-bottom: 0.5rem;
    border-bottom: 2px solid var(--secondary);
    display: block;
    position: relative;
}

.stats-title::before {
    content: "-";
    margin-right: 0.5rem;
    background-color: rgb(100, 100, 100);
    border-radius: 3px;
    width: 16px;
    height: 16px;
    line-height: 16px;
    display: inline-block;
    text-align: center;
    font-weight: 900;
    cursor: pointer
}

.stats-title.closed::before {
    content: "+";
}

.stats-label {
    font-size: 0.85rem;
    font-variant: small-caps;
    margin-top: 1rem;
    line-height: 24px;
}

.custom-tooltip .stats-label {
    margin-top: 0.5rem;
    font-variant: unset;
    font-size: 13px;
}

.stats-value {
    font-size: 2.5rem;
    text-align: right;
    font-family: "Digital";
    margin-top: -40px;
    /* color: var(--primary); */
    color: var(--secondary);
    font-weight: 500;
}

.stats-value span {
    font-family: "Digital";
    font-size: 1.5rem;
}

.stats-rear-front {
    background: url("images/bike.svg");
    background-color: rgb(220, 220, 220);
    border-top: 10px solid rgb(220, 220, 220);
    border-bottom: 10px solid rgb(220, 220, 220);
    box-sizing: content-box;
    border-radius: 3px;
    background-size: contain;
    background-position: center;
    background-repeat: no-repeat;
    position: relative;
    height: 36px;
    filter: invert(1);
}

.custom-tooltip .stats-rear-front {
    background-color: transparent;
    width: 200px;
    border: none;
    margin-top: 12px;
}

.stats-rear,
.stats-front {
    position: absolute;
    font-size: 1.1rem;
    text-align: right;
    font-family: "Digital";
    color: var(--secondary);
    filter: invert(1);
    bottom: 16px;
    line-height: 1rem;
}

.stats-rear span,
.stats-front span {
    font-family: "Digital";
    font-size: 1rem;
}

.stats-rear {
    right: 185px;
}

.stats-front {
    left: 185px;
}

.custom-tooltip .stats-rear {
    right: 150px
}

.custom-tooltip .stats-front {
    left: 150px
}

.stats-front::before {
    content: "";
    position: absolute;
    width: 32px;
    height: 2px;
    background-color: var(--secondary);
    left: -3px;
    transform: translate(-100%, 12px) rotate(-30deg);
}

.stats-rear::after {
    content: "";
    position: absolute;
    width: 32px;
    height: 2px;
    background-color: var(--secondary);
    right: -3px;
    transform: translate(100%, 12px) rotate(30deg);
}

.slim-dropdown {
    margin-left: 8px;
}

.slim-dropdown * {
    color: #eee !important;
}

.slim-dropdown .Select-control {
    border: none;
    border-bottom: none !important;
    border-radius: 3px;
    background-color: rgba(255, 255, 255, 0.1);
    box-shadow: none !important;
    height: 24px;
}

.slim-dropdown .Select-control:hover {
    background-color: rgba(255, 255, 255, 0.2);
}

.slim-dropdown .Select-menu-outer {
    background-color: rgb(96, 96, 96);
    border-radius: 0 0 3px 3px;
    border: none;
    font-size: 14px;
}

.modal-title label.flex-shrink {
    margin: 0;
    width: 100px;
    line-height: 34px;
}

#user_modal {
    max-width: 400px;
}

#new_rider_collapse {
    margin-bottom: 8px;
}

.action {
    border-radius: 4px;
    transition: .25s;
    margin-left: 0.25rem;
    padding: 0.25rem;
    padding-top: calc(0.25rem - 2px);
    cursor: pointer;
    font-size: 0.75rem;
    background-color: transparent;
    border: none;
}

.action:hover {
    background-color: rgba(255, 255, 255, 0.075);
}

.action:disabled {
    pointer-events: auto;
    /*cursor: not-allowed;*/
}

.shader {
    position: fixed;
    width: 100vw;
    height: 100vh;
    background-color: rgba(50, 50, 50, 0.9);
    top: 0;
    left: 0;
}

.shader::after {
    content: "";
    position: absolute;
    width: calc(100vw - var(--sidebar-width) - 1rem);
    height: 50vh;
    background-color: rgba(255, 255, 255, 0.1);
    display: block;
    left: var(--sidebar-width);
    bottom: 0px;
    border: 1px solid #111;
    box-shadow: 1px 1px 16px 4px rgba(0, 0, 0, 0.5);
}

#sidebar.hide+#close_sidebar+#graphs .shader::after {
    left: 0.5rem;
    width: calc(100vw - 1.5rem);
}

#elevation_profile {
    z-index: 2;
    position: relative;
}

#elevation_title {
    position: relative;
}

.mapboxgl-control-container {
    display: none !important;
}

#detail_toast {
    width: 80%;
    max-width: 800px;
    min-width: 500px;
    box-shadow: 1px 2px 12px 3px rgba(0, 0, 0, 0.3);
}

@media (max-width: 600px) {


    .toast.detail-toast {
        left: 0.5rem;
    }

    .shader::after {
        left: 0.5rem;
        width: calc(100vw - 1.5rem);
    }

    #detail_toast {
        width: calc(100vw - 1rem);
        min-width: 0px;
        box-shadow: 1px 2px 12px 3px rgba(0, 0, 0, 0.3);
    }
}

#analysis_dropdown {
    background-color: transparent;
    border-color: transparent;
}

#analysis_dropdown>.dropdown-toggle {
    padding: 0 0.25rem;
    color: #fff;
    background-color: transparent;
    border-color: transparent;
}

#analysis_dropdown>.dropdown-item {
    color: #fff;
}

#analysis_dropdown .dropdown-item {
    color: #fff;
}

#analysis_dropdown>.dropdown-item:focus,
.dropdown-item:hover {
    color: #fff;
    background-color: transparent;
}

#ko_flags_dropdown {
    /* position: absolute;
    top: 2.75rem;
    left: 0.75rem;
    z-index: 9;
    padding: 0; */
}

#ko_flags_dropdown>.dropdown-toggle {
    padding: 0 0.25rem;
    color: #fff;
    background-color: rgba(72, 72, 72, 0.8);
    border-color: rgba(72, 72, 72, 0.8);
}

#ko_flags_dropdown .dropdown-menu.show {
    background-color: rgba(72, 72, 72, 0.8);
    border-color: rgba(72, 72, 72, 0.8);
    color: #eee;
}

#ko_flags_dropdown .dropdown-header {
    color: #fff;
    font-weight: bold;
    padding: 0 1rem 0.5rem;
}

#ko_flags {
    margin: 0 1rem;
}

#keyevents_legend {
    position: absolute;
    top: calc(2.5rem + 2px);
    right: 0.5rem;
    background-color: rgba(72, 72, 72, 0.8);
    min-height: 1rem;
    min-width: 1rem;
    z-index: 9;
    padding: 0.25rem 1rem;
}

.ko-legend-item {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    margin-right: 0.5rem;
    border: 2px solid #fff;
}

.ko-legend-label {
    font-size: 12px;
    font-weight: bold;
}