/* RESET */
* { margin: 0; padding: 0; box-sizing:content-box; }

html, body {
    height: 100%;
    font-family: Arial, sans-serif;
}

/* MAP */
#map {
    position: absolute;
    top: 0;
    right: 0;
    width: 100%;
    height: 100dvh;
    z-index: 1;
    background: white;
}

/* SIDEBAR */
#sidebar {
    position: fixed;
    top: 0;
    left: -300px;
    width: 300px;
    height: 100%;
    background: #ffffff;
    border-right: 1px solid #ccc;
    box-shadow: 2px 0 5px rgba(0,0,0,0.1);
    transition: left 0.3s ease;
    z-index: 1000;
    display: flex;
    flex-direction: column;
}
#sidebar.open {
    left: 0;
}
.sidebar-header img{
    max-width: 100%;
}
.sidebar-content {
    padding: 1em;
    
    .point_link{
        border: none;
        border-radius: 5px;
        cursor: pointer;
        color: #007bff;
        font-size: 16px;
        background: none;
        text-align: left;
        padding: 0.1em;
        width: 100%;
        &:hover{background-color: rgb(0,0,0,0.1);}
    }

    & ul{list-style: none;}
    & li{margin: 0.5em 0;}
    & a{
        color: #007bff;
        text-decoration: none;
        &:hover{text-decoration: underline;}
    }
}

#closeSidebar,#closePointPanel{
    font-size: 20px;
    color: white;
    background-color: unset;
    border: none;
    cursor: pointer;
    padding: 2px 8px 3px 8px;
    position: absolute;
    border-radius: 50px;
    box-shadow: 0 0 3px red;
    background-color: red;
    transition: all 0.3s;
    &:hover{
        background-color: white;
        color: red;
    }
}
#closeSidebar{
    top: 5px;
    right: 5px;
}

/* TOP BAR */
#account_bloc {
    position: fixed;
    top: 1rem;
    right: 1rem;
    z-index: 999;
}

#menuBtn{
    position: fixed;
    top: 1rem;
    left: 1rem;
    font-size: 20px;
    border-radius: 5px;
    box-shadow: 0 0 3px #333;
    border: none;
    width: 3rem;
    height: 3rem;
    z-index: 999;
    background-color: white;
    transition: all 0.3s;
    cursor: pointer;
    &:hover{
        background-color: #ddd;
    }
}
#app_version{
    font-size: 16px;
}


/* global function */
.close-panel {
    background: unset;
    border: none;
    padding: 10px 16px;
    border-radius: 6px;
    cursor: pointer;
    font-weight: bold;
    transition: background 0.2s;
    position: absolute;
    top: 5px;
    right: 5px;
    &:hover {
        background: #ddd;
    }
}

/* CONTRIBUER BUTTON */
#contribuerBtn {
    position: absolute;
    bottom: 20px;
    left: calc(50dvw - 4rem - 20px);
    width: 8rem;
    z-index: 2;
    background: #28a745;
    color: white;
    border: none;
    padding: 12px 20px;
    border-radius: 50px;
    font-size: 16px;
    cursor: pointer;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
    &:hover {
        background: #218838;
    }
}

/* POINT PANEL */
#closePointPanel{
    right: 14px;
    top: 54px;
}
#point-panel {
    position: fixed;
    top: 20px;
    left: 0;
    width: calc(100% - 20px);
    max-width: 400px;
    z-index: 998;

    padding: 10px;
    overflow-y: auto;

    transform: translateX(-100%);
    transition: transform 0.3s ease;
    &:has(#point-panel-body.visible) {
        transform: translateX(0);
    }
}
.point-container{
    max-height: calc(100dvh - 85px);
    overflow: scroll;
    -ms-overflow-style: none;
    scrollbar-width: none;
    &::-webkit-scrollbar {
        display: none;
    }
}


/* RESPONSIVE */
@media (max-width: 768px) {
    #filters {
        left: 15px;
        right: 15px;
        width: calc(100% - 30px);
        top: 60px;
    }

    #contribuerBtn {
        bottom: 15px;
        left: calc(50dvw - 4rem - 18px);
        width: 8rem;
        padding: 10px 18px;
        font-size: 15px;
    }
}
