body {
    margin: 0;
    padding: 0;
    font-family: Arial, Helvetica, sans-serif;
    box-sizing: border-box;
}

html, body {
    overscroll-behavior: none;
    /* Disable blue highlight boxes on chrome mobile */
    -webkit-tap-highlight-color: transparent;
    -webkit-tap-highlight-color: rgba(0, 0, 0, 0);
}

* {
    box-sizing: border-box;
}

#map {
    position: fixed;
    left: 0px;
    top: 0px;
    width: 100%;
    height: 100%;
}

body, .mapboxgl-map {
    font-family: 'Arial', sans-serif;
}



/* define colors globally */
:root {
    /* primary color for ui elements like buttons, ... */
    --color-primary: #3d4f63;
    /* bit less dominant ui color for other features */
    --color-secondary: #e0eaf4;
    /* background color for bigger areas and standard sheets */
    /* --color-background: rgb(244,244,244); */
    --color-background: #eff2f9;
    /* color for slightly shaded smaller sheets and content of content boxes */
    --color-surface: #fff;

    /* color for main text */
    --color-text: #000;
    /* color for text which is less highlighted */
    --color-text-lite: #666;


    /* default animation time */
    --animation-duration: 0.2s;

    /* border radius for bottom sheets on mobile */
    --default-border-radius: 15px;


    /* TODO: missing:
        - default abstände (margin und co...)
        - .mobile klasse für body
        - Redundante Fenster entfernen


    /* font sizes */
    --font-size-factor: 1rem;
    --font-size-title: (calc(var(--font-size-factor) * 1.8))
    --font-size-subtitle: (calc(var(--font-size-factor) * 1.2))
    /* TODO: implementieren */
  }

  /* color set for dark theme */
  @media (prefers-color-scheme: dark) {
    :root {
        /* primary color for ui elements like buttons, ... */
        --color-primary: #233456;
        /* bit less dominant ui color for other features */
        --color-secondary: #cae1ff;
        /* background color for bigger areas and standard sheets */
        --color-background: #000;
        /* color for slightly shaded smaller sheets and content of content boxes */
        --color-surface: #222;

        /* color for main text */
        --color-text: #fff;
        /* color for text which is less highlighted */
        --color-text-lite: #999;
    }
  }
  


/* make space for the navbar */
@media only screen and (max-width: 768px) {
    #map {
        height: calc(100% - 50px);
    }
}



/* Standard UI components */


/* Standard desktop box (POI, bookmarks, etc... */
.standard_window {
    position: fixed;
    background: var(--color-background);
    /* backdrop-filter: blur(20px); */
    box-sizing: border-box;
}

@media only screen and (min-width: 768px) {
    .standard_window {
        left: 30px;
        top: 110px;
        width: 400px;
        border-radius: 20px;
        box-shadow: 2px 2px 5px -2px #666;
        padding: 20px;
        height: auto;
        transition: all var(--animation-duration) ease-in;
        max-height: calc(100vh - 110px - 30px);
        overflow: scroll !important;
    }
}

@media only screen and (max-width: 768px) {
    .standard_window {
        bottom: 0px;
        top: auto;
        left: 0px;
        width: 100%;
        border-radius: 10px;
        height: 40%;
        padding: 15px;
    }

}


/* marker icons */
.marker-icon {
    background: #fff;
    color: #fff;
    font-size: 12px;
    height: 23px;
    width: 23px;
    border-radius: 100px;
    display: flex;
    justify-content: center;
    align-items: center;
}
.marker-navigation {
    background: #fff;
    color: #222;
    font-size: 18px;
    height: 35px;
    width: 35px;
    border-radius: 100px;
    display: flex;
    justify-content: center;
    align-items: center;
    border: 2px solid #222;
}
.marker-search {
    background: url("marker.svg") 50% 50% no-repeat;
    background-size: contain;
    color: #fff;
    font-size: 10px;
    height: 32px;
    width: 28px;
    border-radius: 0px;
    display: flex;
    justify-content: center;
    align-items: center;
}
.marker-search.light-icon {
    background: #db422e;
    height: 14px;
    width: 14px;
    border: 2px solid white;
    border-radius: 100px;
}




/* Smaller ui components (Buttons, snackbar, etc...) */

.green_text {
    color: #4b7556;
}

.red_text {
    color: #a34333;
}

#snackbar {
    visibility: hidden;
    min-width: 250px;
    transform: translate(-50%);
    background-color: #222;
    color: #fff;
    text-align: center;
    border-radius: 5px;
    padding: 16px;
    position: fixed;
    z-index: 1;
    left: 50%;
    bottom: 30px;
    font-size: 1em;
}

#snackbar.show {
    visibility: visible;
    -webkit-animation: fadein 0.5s, fadeout 0.5s 2.5s;
    animation: fadein 0.5s, fadeout 0.5s 2.5s;
}

@-webkit-keyframes fadein {
    from {
        bottom: 0;
        opacity: 0;
    }

    to {
        bottom: 30px;
        opacity: 1;
    }
}

@keyframes fadein {
    from {
        bottom: 0;
        opacity: 0;
    }

    to {
        bottom: 30px;
        opacity: 1;
    }
}

@-webkit-keyframes fadeout {
    from {
        bottom: 30px;
        opacity: 1;
    }

    to {
        bottom: 0;
        opacity: 0;
    }
}

@keyframes fadeout {
    from {
        bottom: 30px;
        opacity: 1;
    }

    to {
        bottom: 0;
        opacity: 0;
    }
}














/* Infobox for POI, saved, etc... */


/* POI sheet */

.sheet-content {
    position: fixed;
    display: flex;
    flex-direction: column;
    transition: all var(--animation-duration) ease;
    /* Adjust to only transform transition */
    overflow-y: hidden;
    /* Handle scrolling within the content itself */
}


.sheet-body {
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
}

/* desktop sheet */
@media only screen and (min-width: 768px) {

    /* backdrop-filter: blur(20px); */
    .sheet-header {
        display: none;
    }

    .sheet-content {
        margin: 0px;
        display: none;
    }
}

.sheet-body h2 {
    font-size: var(--font-size-title);
}

.sheet-body p {
    margin-top: 20px;
    font-size: 1.05rem;
}

@media only screen and (max-width: 768px) {
    .sheet-content {
        left: 0;
        width: 100%;
        max-width: 1150px;
        /* Keep max-width if needed */
        max-height: 100vh;
        /* Full viewport height */
        padding: 0 25px 25px 25px;
        transform: translateY(100%);
        border-radius: var(--default-border-radius) var(--default-border-radius) 0 0;
        box-shadow: 0 10px 20px rgba(0, 0, 0, 0.03);
    }

    .sheet-content.show {
        transform: translateY(0%);
    }

    .sheet-content.dragging {
        transition: none;
    }

    .sheet-header {
        display: flex;
        justify-content: center;
    }

    .drag-icon {
        cursor: grab;
        user-select: none;
        padding: 15px;
        margin-top: 0px;
    }

    .drag-icon span {
        height: 4px;
        width: 40px;
        display: block;
        background: #C7D0E1;
        border-radius: 50px;
    }

    .sheet-body {
        height: calc(100% - 40px);
        /* adjust height considering header */
        padding: 0 0 0px;
        box-shadow: 0px 0px 0px 0px #666;
    }

    .sheet-body::-webkit-scrollbar {
        width: 0;
    }
}

.accordion {
    margin-left: 0px;
    padding-left: 0px;
}

.accordion-header {
    cursor: pointer;
    margin: 0px;
    padding: 0px;
    user-select: none;
}

.sheet-content .accordion-content {
    margin-left: 30px;
}

.accordion-content {
    margin-top: 20px;
    padding: 10px;
    border-radius: 5px;
    background: #eee;
    display: none;
    /* Initially hidden */
    overflow: hidden;
}


/* info window / info sheet */

#infoWindow {
    position: fixed;
    top: 0px;
    left: 0px;
    width: 100vw;
    height: 100%;
    background: var(--color-background);
    display: none;
    flex-direction: column;
    padding: 20px;
    z-index: 150;
    transition: all var(--animation-duration);
    transform: translateY(105%);
    box-sizing: border-box;
    overflow: scroll;
    scrollbar-width: none;
}

#infoWindow {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity var(--animation-duration) ease-in-out, transform var(--animation-duration) ease-in-out;
}

#infoWindow.show {
    opacity: 1;
    transform: translateY(0);
}


#infoWindow h3 {
    margin-bottom: 40px;
    color: var(--color-text);
    font-size: 1.2em;
}

#infoWindow h4 {
    color: var(--color-text-lite);
    font-size: 1.2em;
    margin-top: 35px;
    margin-bottom: 12px;
}

#infoWindow h3 i {
    margin-right: 15px;
}

#infoWindow span {
    margin-top: 25px;
}

#infoWindow i {
    margin-right: 20px;
    font-size: 1em;
}

@media only screen and (min-width: 768px) {

    #infoWindow {
        position: fixed;
        top: 5%;
        left: calc(50vw - 250px);
        width: 500px;
        height: 90%;
        padding: 20px;
        border-radius: 20px;
        /* backdrop-filter: blur(20px); */
        overflow: scroll;
        z-index: 180;
        display: none;
    }

    .cover {
        display: none;
    }
}




#infoWindow a i {
    margin-right: 0px;
}


#infoWindow .close {
    font-size: 1.8em;
    position: absolute;
    top: 20px;
    right: 15px;
}

#infoWindow h2 {
    margin-top: 0px;
}



/* more sheet */
#more {
    position: fixed;
    bottom: 0px;
    left: 0px;
    width: 100%;
    background: var(--color-surface);
    display: flex;
    flex-direction: column;
    padding: 20px;
    z-index: 150;
    user-select: none;
    transition: all var(--animation-duration);
    transform: translateY(100%);
}

#more span {
    margin-top: 25px;
}

#more i {
    margin-right: 20px;
    font-size: 1em;
}

@media only screen and (min-width: 768px) {
    #more {
        display: none;
    }

    .cover {
        display: none;
    }
}


.cover {
    position: fixed;
    background: #000;
    opacity: 0;
    top: 0px;
    left: 0px;
    width: 100%;
    height: 100%;
    box-sizing: border-box;
    z-index: 150;
    display: none;
    transition: opacity var(--animation-duration) ease;
    cursor: pointer;
    backdrop-filter: blur(20px);
}

.text_bubble {
    background: #d2e4f7;
    color: #233456;
    border-radius: 10px;
    padding: 15px;
}

.text_bubble a {
    color: #233456;
}

.grey_bubble {
    background: #eee;
}

#more a i {
    margin-right: 0px;
}



/* navbar / navigation bar */
#navbar {
    position: fixed;
    background: var(--color-surface);
}


@media only screen and (min-width: 768px) {

    #navbar {
        position: fixed;
        right: 10px;
        bottom: 100px;
        width: 53px;
        overflow: hidden;
        display: flex;
        flex-direction: column;
        transition: all var(--animation-duration);
        background: var(--color-surface);
        border-radius: 5px;
        padding: 5px;
        box-shadow: 2px 2px 5px -2px #666;
        /* border-radius: 100px; */
    }

    #navbar span {
        width: 145px;
        height: 40px;
        border-radius: 3px;
        border: 0px solid #fff;
        background: var(--color-surface);
        /* box-shadow: 2px 2px 5px -2px #666; */
        margin-top: 0px;
        display: flex;
        flex-direction: row;
        align-items: center;
        justify-content: flex-start;
        cursor: pointer;
        overflow: hidden;
        font-size: 0.9em;
        padding: 15px;
        overflow: hidden;
        transition: all var(--animation-duration);
    }

    #navbar:hover {
        width: 155px;
        border-radius: 5px;
    }

    #navbar span:hover {
        background: #eee;
    }

    #navbar span i {
        margin-right: 22px;
    }
}

@media only screen and (max-width: 768px) {
    #navbar {
        position: fixed;
        bottom: 0px;
        left: 0px;
        height: 50px;
        width: 100%;
        background: white;
        display: flex;
        flex-direction: row;
        align-items: center;
        -webkit-user-select: none;
        /* Safari */
        -ms-user-select: none;
        /* IE 10 and IE 11 */
        user-select: none;
        /* Standard syntax */
    }

    #navbar span {
        width: 25%;
        margin: 0px;
        box-sizing: border-box;
        display: flex;
        flex-direction: column;
        align-items: center;
        font-size: 0.8em;
        color: var(--color-primary);
        cursor: pointer;
    }

    #navbar i {
        padding: 6px;
        font-size: 1.1em;
    }
}


@media only screen and (min-width: 768px) {
    .hide_desktop {
        display: none !important;
    }
}
@media only screen and (max-width: 768px) {
    .hide_mobile {
        display: none !important;
    }
}


/* bookmark sheet / bookmarks sheet */
#saved_container {
    z-index: 10;
    overflow: hidden;
    transition: height 0.5s ease-out;
    display: block;
    color: var(--color-text-lite); /* was #555 */
    font-size: 0.9em;
    line-height: 1.3lh;
    display: none;
    overflow: scroll;
    background: var(--color-surface);
}

@media only screen and (max-width: 768px) {
    #saved_container {
        max-height: 100vh;
        height: 100vh;
        padding-top: 0px !important;
        padding: 20px;
        overflow: hidden;
        z-index: 200;
    }

    #saved_container:not(.dragging) {
        transition: all var(--animation-duration);
    }
}


#saved_container h2 {
    margin: 0;
    margin-bottom: 20px;
}

#saved_container h3 {
    margin: 0px;
    color: var(--color-text);
    font-weight: 500;
}

#saved_container .icon_button {
    padding: 10px;
    border-radius: 100px;
    background: #fff;
    transition: all var(--animation-duration);
    margin: 5px;
}

#saved_container .icon_button:hover {
    background: #ddd;
}


.saved_folder {
    padding: 10px;
    margin: 5px 0px;
    display: flex;
    flex-direction: row;
    align-items: center;
    cursor: pointer;
    transition: all var(--animation-duration);
    border-radius: 8px;
    background: #eee;
}

.saved_folder:hover,
.saved_folder.active {
    background: #eee;
}

.saved_logo {
    font-size: 1.15em;
    padding: 0px;
    border-radius: 50px;
    margin: 5px 30px 5px 10px;
}

.saved_logo_list {
    font-size: 1em;
    padding: 14px;
    border-radius: 50px;
    margin: 5px 30px 5px 10px;
    color: #fff;
    background: #4b7556;
}

.saved_folder span {
    display: flex;
    flex-direction: column;
    margin-right: auto;
}

.hidden {
    display: none;
}


.saved_folder_content {
    display: none;
    flex-direction: column;
    overflow: hidden;
    transition: all var(--animation-duration);
}

.single_place {
    padding: 10px;
    margin: 3px;
    margin-left: 40px;
    display: flex;
    flex-direction: row;
    align-items: center;
    cursor: pointer;
    transition: all var(--animation-duration);
    border-radius: 8px;
}

.single_place:hover {
    background: #eee;
}

.single_place span {
    margin-right: auto;
}

.folder_content_settings {
    margin-left: 40px;
    border-radius: 8px;
    padding: 10px;
    background: #eee;
}


.red_logo {
    color: #da452b;
}

.blue_logo {
    color: #456ab4;
}

.add_new_list {
    background: #cae1ff
}

.add_new_list:hover {
    background: #bad1ef
}

#content_first {
    padding-top: 0px;
}






/* add new bookmark */
#bookmark_save_container {
    position: fixed;
    top: 0px;
    left: 0px;
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 150;
    background: transparent;
    transition: all var(--animation-duration);
    display: none;
}


#bookmark_save_selection {
    width: 500px;
    background: var(--color-background);
    border-radius: 10px;
    padding: 20px;
    z-index: 150;
    display: flex;
    flex-direction: column;
    transition: all var(--animation-duration);
}

@media only screen and (max-width: 768px) {
    #bookmark_save_selection {
        width: 90%;
        left: 5%;
    }
}

#bookmark_save_selection h3 {
    margin-bottom: 30px;
    color: var(--color-text);
    font-size: 1.2em;
}

#bookmark_save_selection h4 {
    color: var(--color-text-lite); /* was #444 */
    font-size: 1.2em;
    margin-top: 35px;
    margin-bottom: 12px;
}

#bookmark_save_selection h3 i {
    margin-right: 15px;
}


#bookmark_save_cover {
    backdrop-filter: blur(20px);
    position: fixed;
    background: rgba(0, 0, 0, 0.4);
    opacity: 1;
    top: 0px;
    left: 0px;
    width: 100%;
    height: 100%;
    z-index: 150;
    display: none;
    cursor: pointer;
    backdrop-filter: blur(10px);
    transition: opacity 0.15s ease-in-out;
}

#bookmark_save_folders {
    margin-top: 5px;
    margin-bottom: 5px;
}

#bookmark_save_selection label {
    background: var(--color-surface);
    color: var(--color-text-lite);
    font-weight: 400;
    font-size: 0.9rem;
    border-radius: 0px;
    /* box-shadow: 2px 2px 5px -2px rgba(200, 200, 200, 0.6); */
    padding: 15px;
    margin: 0 5px;
    /* padding-left: 50px; */
    cursor: pointer;
    display: flex;
    flex-direction: row;
    align-items: center;
    border-bottom: 1px solid #eee;
}

#bookmark_save_selection label:first-of-type {
    border-top-left-radius: 10px;
    border-top-right-radius: 10px;
}

#bookmark_save_selection label:last-of-type {
    /* Stil für das erste und letzte Label */
    border-bottom-left-radius: 10px;
    border-bottom-right-radius: 10px;
    border-bottom: 0px solid #eee;
}

#bookmark_save_selection label i {
    padding: 10px;
    background: #E57373;
    color: #fff;
    font-size: 0.8rem;
    border-radius: 100px;
    margin-right: 20px;
}

#bookmark_save_selection label .title {
    margin-bottom: 5px;
    color: var(--color-text);
    font-weight: 550;
    font-size: 1rem;
}

/* #bookmark_save_selection .left-label i {
    margin-left: -36px;
    margin-right: 24px;
} */

#bookmark_save_selection h3 {
    margin-top: 0px;
}

.save_buttons {
    margin-top: 20px;
    width: 100%;
    text-align: center;
}

.save_buttons button {
    margin: auto 10px;
}


/* checkmark styling */

/* The container */
.container {
    display: block;
    position: relative;
    padding-left: 35px;
    margin-bottom: 12px;
    cursor: pointer;
    user-select: none;
}

/* Hide the browser's default checkbox */
.container input {
    position: absolute;
    opacity: 0;
    cursor: pointer;
    height: 0;
    width: 0;
}

/* Create a custom checkbox */
.checkmark {
    position: absolute;
    margin-top: 0px;
    margin-bottom: 3px;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    height: 25px;
    width: 25px;
    background-color: #eee;
    border-radius: 5px;
}

/* On mouse-over, add a grey background color */
.container:hover input~.checkmark {
    background-color: #ccc;
}

/* When the checkbox is checked, add a blue background */
.container input:checked~.checkmark {
    background-color: var(--color-primary);
}

/* Create the checkmark/indicator (hidden when not checked) */
.checkmark:after {
    content: "";
    position: absolute;
    display: none;
}

/* Show the checkmark when checked */
.container input:checked~.checkmark:after {
    display: block;
}

/* Style the checkmark/indicator */
.container .checkmark:after {
    left: 9px;
    top: 5px;
    width: 5px;
    height: 10px;
    border: solid white;
    border-width: 0 3px 3px 0;
    -webkit-transform: rotate(45deg);
    -ms-transform: rotate(45deg);
    transform: rotate(45deg);
}




/* add bookmark (list) */

#bookmark_add_list {
    position: fixed;
    top: 0px;
    left: 0px;
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 150;
    background: transparent;
    transition: all var(--animation-duration);
    display: none;
}


#bookmark_add_list_content {
    width: 250px;
    background: var(--color-background);
    border-radius: 10px;
    padding: 20px;
    z-index: 150;
    display: flex;
    flex-direction: column;
    transition: all var(--animation-duration);
}

@media only screen and (max-width: 768px) {
    #bookmark_add_list_content {
        width: 90%;
        left: 5%;
    }
}

#bookmark_add_list_cover {
    position: fixed;
    top: 0px;
    left: 0px;
    height: 100%;
    width: 100%;
    background: #000;
    opacity: 0.4;
    z-index: 150;
    cursor: pointer;
    /* display: none; */
}


#bookmark_add_list_content label {
    background: #fff;
    border-radius: 10px;
    box-shadow: 2px 2px 5px -2px rgba(200, 200, 200, 0.6);
    padding: 10px;
    margin: 4px;
    padding-left: 50px;
}

#bookmark_add_list_content h3 {
    margin-top: 0px;
}

#bookmark_add_list_content span {
    margin: 10px 0px;
}

#bookmark_add_list_content input[type=text] {
    background: #ddd;
    border: 0px solid black;
    height: 30px;
    border-radius: 5px;
    width: 100%;
    padding: 5px;
    margin-bottom: 2px;
}

.save_buttons {
    margin-top: 20px;
    width: 100%;
    text-align: center;
}

.save_buttons button {
    margin: auto 10px;
}

.color-box {
    width: 30px;
    height: 30px;
    border-radius: 100px;
    display: inline-block;
    margin: 3px;
    cursor: pointer;
}
#iconSelector {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
}
.icon-box {
    width: 35px;
    height: 35px;
    border-radius: 100px;
    display: inline-block;
    margin: 5px;
    cursor: pointer;
    background: #E57373;
    display: flex;
    justify-content: center;
    align-items: center;
    color: #fff;
    transition: all var(--animation-duration);
}
.selected {
    border: 2px solid var(--color-primary);
}



/* categories window */
#categories_full {
    position: fixed;
    top: 0px;
    left: 0px;
    width: 100%;
    height: 100%;
    background: var(--color-background);
    z-index: 150;
    padding: 20px;
    transform: translateY(110%);
    transition: all var(--animation-duration);
    background: rgba(247, 243, 245, 1);
    /* backdrop-filter: blur(20px); */
    overflow: scroll;
}

@media only screen and (min-width: 768px) {
    #categories_full {
        width: 460px;
    }
}

#categories_full .close {
    font-size: 1.8em;
    position: absolute;
    top: 20px;
    right: 15px;
    cursor: pointer;
}

#categories_full hr {
    background: #ddd;
    height: 0px;
    border: 0px;
}

#categories_full span {
    margin: 4px;
    display: block;
    border-radius: 10px;
    background: #fff;
    padding: 10px;
    box-shadow: 2px 2px 5px -2px rgba(200, 200, 200, 0.6);
}

#categories_full i {
    margin: 10px;
}

#categories_full button {
    margin: 4px;
}



/* category slider */
#categories_container {
    padding-left: 30px;
    z-index: 15;
    display: flex;
    align-items: center;
    flex-direction: row;
    flex-wrap: wrap;
    max-width: 430px;
}
/* Altes menu: scrollbar, unter der suchleiste fixiert
#categories_container {
    position: fixed;
    top: 90px;
    left: 0px;
    padding-left: 30px;
    z-index: 15;
    display: flex;
    align-items: center;
    flex-direction: row;
    flex-wrap: wrap;
    max-width: 430px;
}
*/

@media only screen and (max-width: 768px) {
    #categories_container {
        padding-left: 20px;
        width: 100%;
        top: 75px;
        overflow: scroll;
        flex-wrap: nowrap;
        box-sizing: border-box;
    }
}

.category_label {
    background: var(--color-secondary);
    border-radius: 50px;
    padding: 8px 12px;
    margin: 5px;
    cursor: pointer;
    transition: all 0.1s;
    /* box-shadow: 2px 2px 5px -2px #666; */
    white-space: nowrap;
    transition: all var(--animation-duration);
}

.category_label_dark {
    background: var(--color-primary);
    color: #fff;
}

.category_label_dark i {
    color: #fff;
}

.category_label i {
    /*background: #ffd8b8;*/
    color: #000;
    margin-right: 10px;
    margin: 0px;
    border-radius: 100px;
    padding: 0px;
    font-size: 0.7em;
}

.category_label_dark i {
    color: #fff;
}


/* search sheet / search bar */
#search_results {
    background: var(--color-surface);
    padding: 0px;
    padding-top: 100px;

    position: fixed;
    top: 0px;
    left: 0px;
    height: 100%;
    width: 460px;
    z-index: 40;
    overflow: scroll;
    /* backdrop-filter: blur(20px); */
}

@media only screen and (min-width: 768px) {
    #search_results {
        transition: transform var(--animation-duration) ease-in-out; /* Animation für das Ein- und Ausfahren */
        transform: translateX(-100%);
        display: block;
    }
    /* Zustand für das Hereinschieben */
    #search_results.show {
        transform: translateX(0); /* Hereinschieben */
    }

    /* Zustand für das Hinausschieben */
    #search_results.show.hide {
        transform: translateX(-100%); /* Hinausschieben */
    }
}

.search_drag {
    height: 60% !important;
    border-radius: 10px 10px 0 0 !important;
    padding-top: 15px !important;
}

#search_bar {
    position: fixed;
    padding: 5px;
    border-radius: 40px;
    border: 1px solid #bbb;
    /* box-shadow: 0px 0px 20px -2px #666; */
    width: 400px;
    left: 30px;
    top: 30px;
    background: var(--color-surface);
    display: flex;
    flex-direction: row;
    align-items: center;
    min-height: 38px;
    z-index: 80;
    /* Adjust based on your design */
}

#search_bar i {
    padding: 0 12px;
}

#search_results button {
    margin: 5px 2px;
}

@media only screen and (max-width: 768px) {
    #search_container {
        width: calc(100vw - 40px);
        left: 20px;
        top: 15px;
        transition: all var(--animation-duration);
    }

    #search_bar {
        position: fixed;
        left: 20px;
        top: 20px;
        width: calc(100vw - 40px);
    }

    #search_results {
        border-radius: 0px;
        bottom: 0px;
        top: auto;
        left: 0px;
        height: 100%;
        width: 100%;
        padding-top: 90px;
        overflow: scroll;
        transition: all var(--animation-duration);
        transform: translateY(100%);
        transition: transform var(--animation-duration) ease-in-out;
    }

    #search_results.dragging {
        transition: none;
    }

        /* Zustand für das Hereinschieben */
        #search_results.show {
            transform: translateY(0); /* Hereinschieben */
        }
}


#search_input {
    border: 0px solid var(--color-surface);
    padding: 7px 0px;
    flex-grow: 1;
    border-radius: 0px 8px 8px 0;
    font-size: 1.2em;
    color: #444;
    background: transparent;
}

#search_input:focus {
    outline: none;
}

.search-tag {
    background-color: #d7e0f9;
    color: #1f48b8;
    padding: 7px 12px;
    margin-right: 7px;
    margin-left: 7px;
    border-radius: 20px;
    font-size: 0.8em;
    cursor: default;
    transition: all var(--animation-duration);
    cursor: pointer;
}

.search-tag:hover {
    background: #334466;
}

.icon::before {
    display: inline-block;
    text-rendering: auto;
    -webkit-font-smoothing: antialiased;
}

.search-tag::before {
    margin-right: 7px;
    font-size: 0.8em;
    font: var(--fa-font-solid);
    content: '\f7ec';
}
.search-tag::after {
    margin-left: 7px;
    font-size: 0.8em;
    font: var(--fa-font-solid);
    content: '\f057';
}

.search_result {
    background: #fff;
    transition: all var(--animation-duration);
    padding: 10px;
    margin: 0px;
}

.search_result:hover {
    background: #bbb;
}

.search_entry {
    padding: 15px;
    transition: all 0.15s;
    cursor: pointer;
    align-items: center;
    color: #555;
    border-radius: 4px;
}

.search_entry:hover, .search_entry.highlight {
    background: #eee;
}

#search_icon_back, #search_icon_clear {
    display: none;
}

#search_icon_back, #search_icon_clear, #search_icon_search {
    cursor: pointer;
}

.search_entry i {
    padding: 10px;
    background: #eee;
    color: #444;
    font-size: 0.8em;
    border-radius: 100px;
    margin-right: 20px;
}

.search_entry span {
    margin: 2px 0px;
    font-size: 0.9;
}

.search_result_headline {
    font-size: 1.1em;
    color: var(--color-text); /* was #222 */
    font-weight: 600;
}

/* Error blob */
.search_error {
    border-radius: 50px;
    background: #f0b1b1;
    padding: 10px;
    margin: 10px;
    text-align: center;
}

#search_loading_bar {
    top: 0px;
    width: 100%;
    height: 2px;
    background-color: #233456;
    position: relative;
    overflow: hidden;
    visibility: hidden;
}

#search_loading_bar::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%; /* Starten Sie die Animation außerhalb des sichtbaren Bereichs */
    height: 100%;
    width: 100%;
    background-color: #fff; /* Farbe für den Ladeeffekt */
    animation: loadingAnimation 1s linear infinite; /* Animation */
}

.search-marker-popup {
    position: absolute;
    bottom: 40px; /* Positioniere das Popup über dem Marker (30px Markerhöhe + 10px Abstand) */
    left: 50%; /* Zentriere das Popup */
    transform: translateX(-50%);
    width: 100px;
    background-color: white;
    color: black;
    border-radius: 5px;
    padding: 5px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.3);
    text-align: center;
    font-size: 1rem;
    z-index: 1000;
}


@keyframes loadingAnimation {
    0% {
        left: -100%;
    }
    100% {
        left: 100%;
    }
}


/* search cards */
#search_card_container {
    position: fixed;
    width: 100%;
    left: 0;
    bottom: 100px;
    overflow-x: scroll;
    display: flex;
    justify-content: flex-start;
    scroll-snap-type: x mandatory;
    padding: 0 5%; /* Add padding to show a bit of the cards on the sides */
    display: none;
}

.search_card {
    width: 90%;
    flex: 0 0 auto;
    min-height: 100px;
    margin: 0 2.5%; /* Margin to show a bit of the next/previous card */
    background-color: var(--color-surface);
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    scroll-snap-align: center;
    padding: 10px;
    display: flex;
    flex-direction: column;
    flex-wrap: nowrap;
}

.search_card .center_content {
    width: 100%; /* Ensure the container takes full width */
    overflow: scroll;
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
}

.center_content .button {
    white-space: nowrap; /* Prevent text from wrapping */
    flex-shrink: 0; /* Prevent the buttons from shrinking */
}

.center_content .button i {
    margin-left: 4px;
}

.search_card h3 {
    margin: 5px 0px;
}

#search_show_as_list {
    position: absolute;
    bottom: 270px;
    width: 100%;
    text-align: center;
    display: none;
}

#search_show_as_map {
    position: fixed;
    bottom: 30px;
    width: 100%;
    text-align: center;
}

@media only screen and (max-width: 768px) {
    #search_show_as_map {
        display: none;
    }
}

.search_card span, h3 {
    color: var(--color-text-lite); /* was #444 */
    margin: 4px 0;
}

.search_card span i {
    margin-right: 8px;
}



/* navigation sheet */
#navigation_bottom_container {
    padding-top: 0px;
    margin-top: 0px;
    padding-bottom: 0px;
}

#navigation_bottom_container .drag-icon {
    padding: 0;
    margin: 0;
}

#navigation_duration {
    font-size: 1.8em;
    color: var(--color-text-lite);
    font-weight: 600;
    margin: 4px 0px;
}

#navigation_distance {
    margin: 4px 0px;
}

#navigation_close {
    position: absolute;
    right: 20px;
    top: 0px;
    height: 100%;
    display: flex;
    align-items: center;
    flex-direction: row;
    cursor: pointer;
    font-size: 1.5em;
    padding: 0px 15px;
}

#navigation_history {
    display: flex;
    flex-direction: column;
}

#navigation_history span {
    margin: 4px 0px;
}

#navigation_history span i {
    margin: 4px;
    font-size: 1.2em;
}

#navigation_history h3 {
    margin: 0px;
    margin-bottom: 8px;
}






/* The other mess */


#style_container {
    position: absolute;
    bottom: 51px;
    right: 85px;
    border-radius: 10px;
    background-color: var(--color-surface);
    border: 0px solid #ccc;
    padding: 20px;
    min-width: 300px;
    z-index: 100;
    /* Ensure it's above the map */
    box-shadow: 2px 2px 5px -2px #666;
    display: none;
}

#style_container:not(.dragging) {
    transition: all var(--animation-duration);
}

@media (min-width: 768px) {
    #style_container {
        /* animation */
        opacity: 0;
        transform: translateY(10px);
        transition: opacity 0.15s ease-in-out, transform 0.15s ease-in-out;
    }
    #style_container.show {
        opacity: 1;
        transform: translateY(0);
    }

    #toggle_style i {
        margin-right: 15px;
    }
}

#style_container h4 {
    margin-top: 0px;
}

.style_list {
    justify-content: space-evenly;
}

#toggle_style {
    position: absolute;
    /* width: 152px; */
    height: 40px;
    border-radius: 5px;
    border: 0px solid #fff;
    background: var(--color-surface);
    right: 10px;
    bottom: 50px;
    box-shadow: 2px 2px 5px -2px #666;
    cursor: pointer;
    display: flex;
    flex-direction: row;
    align-items: center;
    padding: 15px;
    transition: all var(--animation-duration);
}

#toggle_style:hover {
    background: #eee;
}



.style_select {
    width: 60px;
    height: 60px;
    border-radius: 100px;
    border: 2px solid #fff;
    margin: 7x;
    display: flexbox;
    flex-direction: column;
    cursor: pointer;
    box-sizing: border-box;
    transition: var(--animation-duration) all;
}

.style_select.selected {
    border: 2px solid #233456
}

@media only screen and (min-width: 768px) {
    .style_select:hover {
        border: 2px solid #233456
    }
    
}

/* Ladeanimation für den Rahmen */
.style_select.loading {
    border: 2px solid transparent; /* Unsichtbarer Rand */
    border-top: 2px solid #233456; /* Sichtbarer Teil des Rahmens oben */
    animation: rotateBorder 1s linear infinite;
}

/* Definiere die Rotations-Animation */
@keyframes rotateBorder {
    0% {
        transform: rotate(0deg); /* Startposition */
    }
    100% {
        transform: rotate(360deg); /* Volle Drehung */
    }
}

.style_select img {
    width: 60px;
    height: 60px;
}


/* different design for mobile: without text and higher up */

@media only screen and (max-width: 768px) {
    #toggle_style {
        border-radius: 100px;
        padding: 12px;
        width: auto;
        height: auto;
        top: 90px;
        bottom: auto;
        right: 20px;
    }

    #toggle_style span {
        display: none;
    }

    #style_container {
        position: fixed;
        left: 0px;
        bottom: 0px;
        width: 100%;
        border-radius: 20px 20px 0px 0px;
        padding: 20px;
        padding-bottom: 60px;
        box-sizing: border-box;
        box-shadow: 2px 2px 5px -2px #666;

        padding-top: 0px;
        /* backdrop-filter: blur(20px); */

        transform: translateY(100%);
    }

    #style_container.show {
        transform: translateY(0);
    }
}



/* POI window */
/* TODO: muss nochmal komplett überarbeitet werden */

#poi_container a {
    color: var(--color-text);
}

.button {
    border-radius: 30px;
    padding: 8px 10px;
    background: #cae1ff;
    border: 0px solid #999;
    cursor: pointer;
    transition: all var(--animation-duration);
    font-size: 0.9em;
    margin: 0px 2px;
    user-select: none;
}
.button.active {
    background: var(--color-primary);
    color: #fff;
}

.button:hover {
    background: var(--color-primary);
    border: 0px solid var(--color-primary);
    color: #fff;
}

#poi_container span {
    margin: 0px;
    padding: 10px;
    box-sizing: border-box;
}

#poi_class span {
    margin: 0px;
    padding: 0px;
}

#poi_container .text_bubble, .big_button {
    margin: 5px;
}

.close_icon {
    position: absolute;
    right: 5px;
    top: 5px;
    background: #fff;
    border-radius: 50px;
    padding: 14px;
    cursor: pointer;
    transition: all var(--animation-duration);
}

#poi_close:hover {
    background: #ddd;
}

@media only screen and (max-width: 768px) {

    /* For mobile phones: */

    #poi_container .close_icon {
        display: none;
    }

    .close_icon {
        right: 0px;
        top: 12px;
    }
}

.button i {
    margin: 0px 7px;
}


#poi_name {
    margin-top: 0px;
    font-size: 1.5em;
    margin-bottom: 5px;
    color: #433e59;
}

#poi_data {
    margin-top: 15px;
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
}

#poi_class {
    margin-bottom: 15px;
    color: #444;
}

#poi_class i {
    margin-right: 15px;
    padding: 8px;
    font-size: 0.8em;
    background: #dd9058;
    color: #fff;
    border-radius: 100px;
}

/* departures in POI window */

#poi_container .departures-container {
    color: #3d4f63;
    margin: 15px 0;
}

.departure {
    /* margin-bottom: 10px; */
    background-color: #e0eaf4; /* was #f0f0f0 */
    /* border-radius: 5px; */

    border-bottom: 1px solid white;
    padding: 15px 0 15px 20px;
}

.departures-container .departure:first-of-type {
    border-radius: 15px 15px 0 0;
}

.departures-container .departure:last-of-type {
    border-radius: 0 0 15px 15px;
}

.departure div:first-child {
    /* TODO: better not hardcode; this is to ensure universal with no matter of delay text */
    width: 70px;
}


#poi_container .departure span {
    display: inline-block;
    /* margin-right: 20px; */
    /* padding: 4px 0 10px 0; */
    padding: 0px;
}

/* align time and delay texts */
#poi_container .departure_time {
    padding-top: 4px !important;
}
#poi_container .departure_delay {
    padding-top: 8px !important;
}

.departure_line_destination {
    padding-left: 10px;
    align-items: start;
    justify-content: space-around;
}

.departure .departure_line_id {
    display: block;
    background: #3d4f63;
    color: #fff;
    border-radius: 50px;
    padding: 6px 8px !important;
    font-size: 0.7rem;
    width: auto;
    margin: 0 0 5px 0 !important;
}

.departure .departure_destination {
    font-weight: 800;
    padding: 0px;
}

.departure i {
    margin-right: 7px;
}







/* maplibre controls */
.maplibregl-ctrl-group {
    border-radius: 40px;
    padding: 5px;
    background: var(--color-surface);
}

.maplibregl-ctrl button {
    padding: 0px;
    margin: 5px;
}

.mapboxgl-ctrl-zoom-in, 
.mapboxgl-ctrl-zoom-out {
    display: none !important;
    background: green;
}

/* make scale bar on mobile devices more minimalistic */
@media only screen and (max-width: 768px) {
    .maplibregl-ctrl-scale {
        background: transparent;
        border-left: 0px solid black;
        border-bottom: 2px solid black;
        border-right: 0px solid black;
    }
    .maplibregl-ctrl button {
        padding: 0px;
        margin: 0px;
        font-size: 1rem;
    }

    .maplibregl-ctrl:not(.maplibregl-ctrl-scale) {
        border: 0px solid white !important;
        box-shadow: 2px 2px 5px -2px #666 !important;
    }

    .maplibregl-ctrl button:hover {
        background: var(--color-surface) !important;
    }

    /* Zoom / Kompass buttons */

    .maplibregl-ctrl-group:nth-child(1) button:nth-child(1) {
        display: none;
    }
    .maplibregl-ctrl-group:nth-child(1) button:nth-child(2) {
        display: none;
    }
    .maplibregl-ctrl-group:nth-child(1) button:nth-child(3) {
        border-radius: 5px;
    }

    .maplibregl-ctrl-group:nth-child(1) button:nth-child(3):before {
        content: none; /* Hide the bar (or line) if it's a pseudo-element */
        display: none;
    }

    /* Entferne zwischenbar (border) */
    .maplibregl-ctrl-group:nth-child(1) button:nth-child(3) {
        border: none; /* Entferne alle Border */
    }
    .maplibregl-ctrl-group:nth-child(1) {
        position: fixed;
        right: 10px;
        top: 135px;
        transition: all var(--animation-duration);
    }
    /* geolocate button */
    .maplibregl-ctrl-group:nth-child(2) {
        position: fixed;
        right: 10px;
        bottom: 100px;
    }

    #settings_control {
        display: none;
    }
}

#navigation_loading_animation {
    width: 60%;
    height: 60px;
    background: #eee;
    border-radius: 5px;
    display: flex;
    justify-content: center;
    align-items: center;
    color: #444;
    display: none;
}

#navigation_loading_animation:after {
    content: '';
    position: absolute;
    left: -150%;
    /* Start from the left beyond the visible area */
    width: 60%;
    height: 60px;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
    animation: shimmer 2s infinite;
}


.loading_text {
    background: #eee;
    border-radius: 6px;
    height: 1.3em;
    color: transparent;
    /* Hide the text color if there's any text */
    position: relative;
    overflow: hidden;
    /* Ensures the shimmer effect doesn't overflow the bounds of the element */
}

.loading_text::after {
    content: '';
    position: absolute;
    top: 0;
    left: -150%;
    /* Start from the left beyond the visible area */
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
    animation: shimmer 1.5s infinite;
}

@keyframes shimmer {
    0% {
        left: -150%;
    }

    50% {
        left: 100%;
    }

    100% {
        left: 150%;
    }
}



/* Navigation */

#navigation_container {
    position: fixed;
    left: 30px;
    top: 500px;
    width: 400px;
    background: var(--color-surface);
    border-radius: 10px;
    padding: 20px;
    box-sizing: border-box;
    display: none;
    flex-direction: column;
    /* transform: translateY(100vh); */
    transition: all var(--animation-duration);
    z-index: 40;
}


#navigation_bottom_container {
    bottom: 0px;
    position: fixed;
    left: 0px;
    width: 100%;
    background: var(--color-surface);
    padding: 20px;
    z-index: 40;
    display: none;
    flex-direction: column;
    border-radius: 10px 10px 0 0;
}

/* desktop version of navigation */
@media only screen and (min-width: 768px) {

    #navigation_container {
        position: fixed;
        left: 30px;
        top: 100px;
        width: 460px;
    }
    
    
    #navigation_bottom_container {
        top: 400px;
        left: 30px;
        width: 460px;
        height: auto;
        bottom: auto;
        padding: 20px;
        z-index: 200;
        display: none;
        flex-direction: column;
        border-radius: 0px 0px 10px 10px;
    }
}


/* formatting of the route */

@media only screen and (max-width: 768px) {
    #navigation_container {
        left: 0px;
        top: 0px;
        width: 100%;
        border-radius: 0px;
        z-index: 90;
    }
}

#navigation_container .close {
    font-size: 1.8em;
    position: absolute;
    top: 20px;
    right: 15px;
    cursor: pointer;
}

#navigation_container span {
    margin-top: 15px;
    width: 100%;
    align-items: center;
    text-align: center;
}

#navigation_container span button {
    font-size: 1em;
    width: 55px;
}

/* switch start and destination */
.switch_icon {
    margin: 8px;
}

#poi_bottom_sheet {
    background: var(--color-surface);
    z-index: 100;
}

#poi_container .scroll_layout {
    display: flex;
    flex-direction: row;
    width: 100%;
    overflow-x: scroll;
    display: block;
    white-space: nowrap;
    flex-shrink: 0;
    scrollbar-width: none;
}

.horizontal_flex {
    display: flex;
    flex-direction: row;
}

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

.center_content {
    display: flex;
    justify-content: center;
    align-items: center;
}

.full_width {
    width: 100%;
}

.child-1 {
    flex-grow: 1;   /* Allow the first child to grow and take up the remaining space */
    flex-shrink: 1; /* Allow the first child to shrink if necessary */
    flex-basis: 0;  /* Initial size of the first child */
}




#settings {
    position: fixed;
    top: 0px;
    left: 0px;
    width: 100%;
    height: 100%;
    padding: 20px;
    transform: translateY(100%);
    transition: all var(--animation-duration);
    /* background: rgba(247, 243, 245, 1); */
    background: var(--color-background);
    /* backdrop-filter: blur(20px); */
    overflow: scroll;
    z-index: 180;
    display: none;
    scrollbar-width: none;
}


#settings {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity var(--animation-duration) ease-in-out, transform var(--animation-duration) ease-in-out;
}

#settings.show {
    opacity: 1;
    transform: translateY(0);
}


@media only screen and (min-width: 768px) {

    #settings {
        position: fixed;
        top: 5%;
        left: calc(50vw - 250px);
        width: 500px;
        height: 90%;
        padding: 20px;
        border-radius: 20px;
        /* backdrop-filter: blur(20px); */
        overflow: scroll;
        z-index: 180;
    }
}

#settings .close {
    font-size: 1.8em;
    position: absolute;
    top: 20px;
    right: 15px;
    cursor: pointer;
}

.switch {
    position: relative;
    display: inline-block;
    width: 38px;
    height: 22px;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: .2s;
}

.slider:before {
    position: absolute;
    content: "";
    height: 16px;
    width: 16px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: .2s;
}

input:checked+.slider {
    background-color: #67789A;
}

/* input:focus+.slider {
    box-shadow: 0 0 1px var(--color-primary);
} */

input:checked+.slider:before {
    transform: translateX(16px);
}

/* Rounded sliders */
.slider.round {
    border-radius: 100px;
}

.slider.round:before {
    border-radius: 50%;
}