@import url("https://fonts.googleapis.com/css2?family=IBM+Plex+Sans:wght@400;500;600;700&display=swap");


#map {
  flex-grow: 1;
  margin: 0;
  transition: none;
  position: relative;
  z-index: 1;
}

#map.map-cropping-active {
  cursor: crosshair !important;
}

html,
body{
    width: 100%;
    height: 100%;
    margin: 0px;
    padding: 0px;
}

body{
    display: flex;
    flex-direction: column;
    font-family: "IBM Plex Sans", "Segoe UI", Tahoma, sans-serif;
    color: #fff;

}

main{
    width: 100%;
    flex: 1;
    display: flex;
    flex-direction: column;
    position: relative;
}

header{
    background: #1e2a38;
    position: relative;
    z-index: 20;
}

header > div{
    margin-left: 15px;
    display: flex;
    flex-direction: row;
    justify-content: space-between;
}
header > div > div > h1{
    margin: 5px 0 10px 0;
}
header > div > div > div{
    display: flex;
    flex-direction: row;

}
header > div > div > a > img{
    height: 70px;
    padding: 10px 15px 5px 0;
}
header > div > div > a:nth-child(3){
    padding: 30px 15px 0 0;
    width: 35%;
    height: 35%;
}
header > div > div > a > svg{
    width: 100%;
    height: 100%;
}
header > div > :nth-child(1){
    display: flex;
    flex-direction: column;
}
header > div > :nth-child(2){
    display: flex;
    flex-direction: row;
    max-width: 800px;
    width: 100%;
    padding-left: 20px;
    margin-left: 20px;
    background-color: #ffffff;
}

.btn-link {
    background: #a3a3a3;
    color: #fff;
    text-decoration: none;
    border: 1px solid #6e6e6e;
    transition: 0.2s ease, transform 0.1s ease;
    height: 25px;
    width: 90px;
    text-align: center;
    padding-top: 5px;
    cursor: pointer;
    user-select: none;
}

.btn-link:hover {
    background: #d7d7d7;
    box-shadow: inset 2px 2px 3px rgb(113, 113, 113);
    color: #333;
}

button{
    background: #a3a3a3;
    color: #fff;
    text-decoration: none;
    border: 1px solid #6e6e6e;
    transition: 0.2s ease, transform 0.1s ease;
    height: auto;
    width: auto;
    text-align: center;
    padding-top: 5px;  
    font-size: 15px;
    display: flex;
    flex-direction: row;
    align-items: center;
}
button > svg{
    height: 20px;
    width: 20px;
}

#burger{
    position: relative;
    padding: 5px 28px 0 8px;
}

#admin_log{
    position: absolute;
    top: 165px;
    right: 8px;
    z-index: 40;
    width: 34px;
    height: 34px;
    background-color: #1e2a38;
    border: 1px solid #6e6e6e;
    box-sizing: border-box;
    cursor: pointer;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    
}

#admin_log > svg{
    position: absolute;
    top: 50%;
    left: 50%;
    width: 18px;
    height: 18px;
    transform: translate(-50%, -50%);
    transition: opacity 0.22s ease, transform 0.22s ease;
}

#admin_log .bi-list{
    opacity: 1;
}

#admin_log .bi-x-lg{
    opacity: 0;
    transform: translate(-50%, calc(-50% + 4px));
}

#admin_log.is-open .bi-list{
    opacity: 0;
    transform: translate(-50%, calc(-50% - 4px));
}

#admin_log.is-open .bi-x-lg{
    opacity: 1;
    transform: translate(-50%, -50%);
}

#admin_log:hover{
    background: #d7d7d7;
    box-shadow: inset 2px 2px 3px rgb(113, 113, 113);
    color: #333;
}

#admin_log:hover svg{
    color: #333;
}

#burger .burger-icon{
    position: absolute;
    right: 8px;
    top: 60%;
    transform: translateY(-50%);
    transition: opacity 0.22s ease, transform 0.22s ease;
}

#burger .burger-icon-down{
    opacity: 1;
}

#burger .burger-icon-up{
    opacity: 0;
    transform: translateY(calc(-50% + 4px));
}

#burger.is-open .burger-icon-down{
    opacity: 0;
    transform: translateY(calc(-50% - 4px));
}

#burger.is-open .burger-icon-up{
    opacity: 1;
    transform: translateY(-50%);
}

button:hover{
    background: #d7d7d7;
    box-shadow: inset 2px 2px 3px rgb(113, 113, 113);
    color: #333;
}

.separation{
    width: 80%;
    margin: 10px 0 10px 25px;
    border: 1px solid rgb(96, 93, 93);
}

.scale{
    background-color: #bebebee0;
    margin: 0 0 17px 0;
    padding: 5px 5px 0 5px;
    height: 25px;
}
.scale > :nth-child(1){
    display: flex;
    flex-direction: row;
    justify-content: space-evenly;
    align-items: center;
}
.color-chip {
    width: 80px;
    height: 9px;
}

.scale_threshold{
    margin: 0;
    position: absolute;
    font-size: 10px;
}

#left-value{
left: 57px;
}
#left-center-value{
    left: 108px;
}
#center-value{
    left: 157px;
}
#right-center-value{
    left: 206px;
}

#module{
    position: absolute;
    top: 20px;
    left: 0px;
    z-index: 5;
    width: 17em;
    height: 76%;
    background-color: #1e2a38;
    display: flex;
    flex-direction: column;
    padding: 10px 10px 25px 10px;
    overflow-y: scroll;
    overflow-x: hidden;
    transition: height 260ms cubic-bezier(0.22, 1, 0.36, 1),
                box-shadow 260ms ease;
    will-change: height;
    box-shadow: 0 8px 18px rgba(0, 0, 0, 0.18);
}

p{
    margin: 0 0 1rem 0;
    padding: 0;
    line-height: 1.6;
    font-size: 0.99rem;
    color: inherit;
}



.module > div{
    display: flex;
    flex-direction: column;
    margin-top: 10px;
    background-color:#2a3b4f ;
    padding: 10px;
}

div > form{
    display: flex;
    flex-direction: column;
}

#menu{
    position: absolute;
    top: 88px;
    left: 289px;
    display: flex;
    flex-direction: column;
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    transform: translateY(-8px);
    pointer-events: none;
    z-index: 15;
    background: #a3a3a3;
    transition: max-height 0.32s ease, opacity 0.24s ease, transform 0.24s ease;
}

#menu.is-open{
    max-height: 180px;
    overflow-y: auto;
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

#modal_admin_log{
    position: absolute;
    top: 162px;
    right: 8px;
    width: auto;
    background: #1e2a38;
    border: 1px solid #707070;
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    transform: translateY(-8px);
    pointer-events: none;
    z-index: 35;
    transition: max-height 0.32s ease, opacity 0.24s ease, transform 0.24s ease;
    padding: 0 10px;
}

#modal_admin_log.is-open{
    max-height: 180px;
    opacity: 1;
    transform: translateY(40px);
    pointer-events: auto;
    padding: 10px;
    height: 130px;
    overflow-y: scroll;
}

#modal_admin_log h3{
    margin: 0;
    color: #fff;
    font-size: 14px;
}

#modal_admin_log form{
    display: flex;
    background-color: #2a3b4f;
}
#modal_admin_log > a{
    text-decoration: none;
    padding: 5px 2px;
    background-color: #2a3b4f;
    color: #ffffff;
    display: flex;
    align-items: center;
}

#modal_admin_log > form > div{
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    margin: 10px 5px;
}

#modal_admin_log > form > :last-child{
    flex-direction: row-reverse;

}

#menu > a{
    padding: 5px 10px;
    text-decoration: none;
    background-color: rgb(173, 173, 173);
    color : #fff;
    border: 1px solid #707070;
    transition: 0.2s ease, transform 0.1s ease;
}

#menu > a:hover{
    background-color: #e8e6e6;
    color: #333;
    box-shadow: -3px 3px 4px gray;
}

#modal-login{
    background-color: #ffff;
    border: 1px solid #707070;
    border-radius: 12px;
    display: none;
    position: absolute;
    top: 150px;
    left: 40%;
    z-index: 150;
    padding: 20px;
    box-shadow: -5px 5px 8px 0px rgba(0, 0, 0, 0.2);
}

#modal-about-us{
    background-color: #ffff;
    border: 1px solid #707070;
    border-radius: 12px;
    display: none;
    position: absolute;
    top: 20px;
    left: 30%;
    z-index: 150;
    padding: 20px;
    width: 90%;
    max-width: 600px;
    max-height: 500px;
    overflow-y: scroll;

}

#modal-login > *{
    color: #333;
}

#modal-about-us > *{
    color: #333;
    text-align: center;
}
#modal-about-us > .about-content > hr{
    width: 85%;
    border: 1px solid #e4e4e4;
}

#modal-login > div > h2{
    text-align: center;
    padding: 5px 0 10px 0;
}
.login-error{
    color: #b42318;
    background: #fdecec;
    border: 1px solid #f8c4c4;
    border-radius: 6px;
    padding: 8px 10px;
    margin: 0 0 12px 0;
}

#modal-login > div > form > div{
    display: flex;
    justify-content: space-between;
    padding: 0 0 15px 0 ;
}
#modal-login > div > form > div >label{
    padding-right: 20px;
    text-align: center;    
}
#modal-login > div > form > div > input{
    height: 25px;
}

#modal-login > div > form > :nth-child(3){
    display: flex;
    flex-direction: row;
    align-items: flex-end;
    justify-content: flex-end;

}

#modal-login > div > form > :nth-child(3) > button{
    margin-top: 5px;
    width: 90px;
    height: 30px;
    padding: 0;
    display: inline-block;
}

#close-modal-login{
    float: right;
    color: #000000;
}
#close-modal-login:hover{
    color: #6e6e6e;
    cursor: pointer;
    user-select: none;
}

#close-modal-about-us{
    float: right;
    color: #000000;
}

#close-modal-about-us:hover{
    color: #6e6e6e;
    cursor: pointer;
    user-select: none;
}

#modal-about-us > h2{
    text-align: center;
    padding: 5px 0 10px 0;
    margin: 0;
}

#modal-about-us > p{
    color: #333;
    margin: 0;
    line-height: 1.45;
}

#shadow-box{
    height: 100%;
    width: 100%;
    z-index: 120;
    position: absolute;
    top: 0;
    left: 0;
    background-color: rgba(0, 0, 0, 0.4);
    display: none;
}

.loading-overlay{
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 999;
    opacity: 1;
    transition: opacity 0.3s ease-in-out;
}

.loading-overlay.hidden{
    display: none;
    opacity: 0;
}

.loading-spinner{
    text-align: center;
}

.spinner{
    width: 50px;
    height: 50px;
    border: 5px solid ;
    background: (255, 255, 255, 0.3);
    border-top: 5px solid #fff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}
@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.loading-text{
    color: #ffff;
    font-size: 16px;
    margin-top: 15px;
    font-weight: 500;
}

.layer-loading {
    position: fixed;
    bottom: 80px;
    right: 15px;
    background: white;
    padding: 15px 25px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    display: none;
    align-items: center;
    gap: 12px;
    z-index: 1000;
}

.layer-loading.visible {
    display: flex;
}

.mini-spinner {
    width: 20px;
    height: 20px;
    border: 3px solid rgba(0, 0, 0, 0.1);
    border-top: 3px solid #333;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

.loading-text-layer{
    color: #000000;
}

.hover-popup .maplibregl-popup-content {
    padding: 0;
    background: transparent;
    box-shadow: none;
    border-radius: 0;
}

.hover-popup-card {
    background: #fff;
    border: 1px solid #1f2937;
    border-radius: 10px;
    padding: 10px 12px;
    color: #111827;
    font-size: 13px;
    line-height: 1.45;
    box-shadow: 0 8px 20px rgba(0,0,0,0.15);
    max-width: 280px;
}

#time-line{
    display: none;
    flex-direction: row;
    position: absolute;
    bottom: 5px;
    left: 60px;
    background-color: #11182795;
    z-index: 999999;
    max-width: 93%;
    overflow-x: auto;
    overflow-y: hidden;
    direction: ltr;
    white-space: nowrap;
    padding: 5px 10px;
    border: 1px solid #000000;
    cursor: grab;
    user-select: none;
    scrollbar-width: none;
    -ms-overflow-style: none;
    height: 40px;
}


#time-line::-webkit-scrollbar{
    display: none;
}
#time-line.is-dragging{
    cursor: grabbing;
}
.time-line-date{
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    min-width: 70px;
    padding: 4px 10px;
    border: 1px solid #000000;
    direction: ltr;
    color: #ffffff;
    background: linear-gradient(180deg, rgba(72, 86, 110, 0.95) 0%, rgba(42, 59, 79, 0.95) 100%);
    border-radius: 10px;
    flex-shrink: 0;
    user-select: none;
    cursor: pointer;
    gap: 1px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.18);
    transition: transform 160ms ease, box-shadow 160ms ease, background-color 160ms ease, border-color 160ms ease;
}
.time-line-date:hover{
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.24);
    border-color: rgba(255, 255, 255, 0.35);
}
.time-line-date.is-selected,
.time-line-date.click{
    background: linear-gradient(180deg, rgba(96, 116, 145, 0.98) 0%, rgba(65, 84, 109, 0.98) 100%);
    border-color: rgba(255, 255, 255, 0.55);
    box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.1), 0 6px 14px rgba(0, 0, 0, 0.25);
}
.time-line-date__day{
    font-size: 15px;
    font-weight: 700;
    line-height: 1;
}
.time-line-date__meta{
    font-size: 10px;
    line-height: 1;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    opacity: 0.82;
}

#module.timeline-open{
    height: 72%;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.14);
}


#btn-layer{
    display: none;
}

@media (max-width: 480px) {
    html,
    body{
        overflow-x: hidden;
    }

    header > div{
        flex-wrap: wrap;
        margin: 0px;
    }
    header > div > :nth-child(1){
        align-items: center;
        min-width: 0;
    }
    .btn-link{
        padding: 5px 5px 0 5px;
    }
    header > div > :nth-child(1) > div{
        margin: 0px;
        padding: 0px;
        align-items: center;
        justify-content: flex-start;
        overflow-x: auto;
        overflow-y: hidden;
        flex-wrap: nowrap;
        width: 100%;
        max-width: 100%;
        min-width: 0;
    }
    header > div > :nth-child(1) > div > button{
        height: 31.6px;
    }
    header > div > :nth-child(1) > div > *{
        flex: 0 0 auto;
    }
    header > div > :nth-child(2){
        margin: 0;
    }
    header > div > div > a > img{
        height: 30px;
    }
    header > div > div > a:nth-child(3){
        padding: 15px 10px 0 0;
    }
    #modal-about-us{
        max-width: 70%;
        bottom: 48px;
        height: auto;
        left: 50px;
    }
    #modal-login{
        left: 20px;
    }
    #module{
        top: 0;
        left: 0;
        width: 100%;
        max-width: 100%;
        bottom: 65px;
        display: none;
        padding: 10px;
        box-sizing: border-box;
        z-index: 5;
        flex-direction: column;
        overflow-y: auto;
        overflow-x: hidden;
        height: auto;
    }
    #time-line{
        left: 7px;
        right: 7px;
        width: auto;
        max-width: none;
        bottom: 8px;
    }
    #menu{
        left: 78px;
        top: 129px;
    }
    #admin_log{
        top: 250px;
        right: 8px;
    }
    #modal_admin_log{
        top: 246px;
    }

    #btn-layer{
        display: block;
    }
}

@media (hover: none) and (pointer: coarse) {
    .btn-link:hover,
    button:hover,
    #admin_log:hover,
    #menu > a:hover,
    #close-modal-login:hover,
    #close-modal-about-us:hover,
    .time-line-date:hover {
        box-shadow: none;
        color: inherit;
        transform: none;
    }

    .btn-link:hover,
    button:hover {
        background: #a3a3a3;
        border-color: #6e6e6e;
    }

    #admin_log:hover {
        background-color: #1e2a38;
        border-color: #6e6e6e;
        color: #ffffff;
    }
    #admin_log:hover svg{
        color: #ffffff;
    }
    #menu > a:hover {
        background-color: rgb(173, 173, 173);
        color: #fff;
        border-color: #707070;
    }

    .time-line-date:hover {
        background: linear-gradient(180deg, rgba(72, 86, 110, 0.95) 0%, rgba(42, 59, 79, 0.95) 100%);
        border-color: #000000;
    }

    #close-modal-login:hover,
    #close-modal-about-us:hover {
        cursor: pointer;
    }  
}