.navbarGreen{
    background-color: #63A19E;
    border-bottom: 1px solid black;
}

.navbarform{
    height: 104px;
    position: relative;
    color: black;
    font-family: var(--panel-font-family);
    letter-spacing: 0;
}

.navbarLogoImg{
    margin: 10px;
    margin-left: 5px;
}

.navbarLogoText{
    position: fixed;
    left: 28px;
    top: 125px;
    width: 404px;
    height: 184px;
    object-fit: contain;
    z-index: 1;
}


.navbarLogo{
    /* margin-top: 15px; */
}

.navbarLi{
    background-color: #F19E47;
    border-radius: 20px;
    border: 1px solid black;
    cursor: pointer;
    margin: 0;
    margin-top: 0;
    margin-right: 0;
    height: 33px;
    width: 81px;
}

.navbarLiA{
    display: flex;
    align-items: center;
    justify-content: center;
    height: 33px;
    font-family: inherit;
    font-size: 16px;
    font-weight: 400;
    letter-spacing: 0;
    line-height: 33px;
    margin-top: 0;
    color: black;
    text-decoration: none;
    padding: 0 !important;
    cursor: pointer;
}

#nav-mobile .navbarLi[data-panel="about"].isActive{
    background-color: var(--panel-about-bg);
}

#nav-mobile .navbarLi[data-panel="guide"].isActive{
    background-color: var(--panel-guide-bg);
}

#nav-mobile .navbarLi[data-panel="support"].isActive{
    background-color: var(--panel-support-bg);
}

#nav-mobile{
    display: flex;
    align-items: center;
    gap: 33px;
    padding-right: 36px;
    padding-top: 34px;
}


/* Remove Materialize default nav-link hover background */
#nav-mobile .navbarLiA:hover{
    background-color: transparent !important;
}

#nav-mobile .navbarLi:hover{
    filter: brightness(1.08);
}

#nav-mobile .navbarLi:active{
    filter: brightness(0.92);
    transform: translateY(1px);
}

#nav-mobile .navbarLiA:focus-visible{
    outline: 2px solid black;
    outline-offset: 2px;
    border-radius: 20px;
}

.searchParent{
    position:absolute;
    --search-left: max(149px, min(calc(50% - 251px), calc(100% - 872px)));
    left: var(--search-left);
    right: auto;
    top: 0;
    bottom: 0;
    margin-top: 0 !important;
    display: flex;
    align-items: center;
}

.searchParent.center{
    padding: 0;
    width: min(502px, calc(100% - var(--search-left) - 370px));
}

.search{
    background-color: #E5E5E5;
    border-radius: 30px;
    width: 100%;
    height: 58px !important;
    border: 2px solid black !important;

}

.search ::placeholder{
    color: #838383;;
}

.search input.input{
    background-color: #E5E5E5 !important;
    width: 250px !important;
    margin-bottom: 20px;
    position: relative;
}

/* Navbar Tagify search only */
.chips.search.chips--tagify{
    position: relative !important;
    z-index: 20 !important; /* keep pill above dropdown */
    box-sizing: border-box !important;

    width: 100% !important;
    min-width: 0 !important;
    max-width: 502px !important;

    min-height: 41px !important;

    padding: 0 !important;
    display: flex !important;
    align-items: center !important;

    overflow: visible !important;
}

.chips.search.chips--tagify > .tagify{
    box-sizing: border-box !important;
    width: 100% !important;
    margin: 0 !important;
    padding: 0 18px !important;
    background: transparent !important;
    border: 0 !important;
    outline: 0 !important;
    box-shadow: none !important;

    display: flex !important;
    align-items: center !important;
    flex-wrap: nowrap !important;
    height: 100% !important;
    min-height: 0 !important;
}

.chips.search.chips--tagify > .tagify,
.chips.search.chips--tagify > .tagify:focus-within,
.chips.search.chips--tagify > .tagify:hover{
    border: 0 !important;
    outline: 0 !important;
    box-shadow: none !important;
}

.chips.search.chips--tagify > .tagify .tagify__input{
    flex: 1 1 auto !important;
    width: 100% !important;
    min-width: 1px !important;
    max-width: none !important;
    align-self: center !important;
    margin: 0 !important;
    padding: 0 !important;
    font-family: var(--panel-font-family) !important;
    font-size: 16px !important;
    font-weight: 400 !important;
    letter-spacing: 0 !important;
    line-height: normal !important;
    min-height: 0 !important;
    border: 0 !important;
    outline: 0 !important;
    box-shadow: none !important;
    text-align: left !important;
}

.chips.search.chips--tagify .tagify__input-wrap{
    display: flex !important;
    align-items: center !important;
    flex-wrap: nowrap !important;
    width: 100% !important;
    min-width: 0 !important;
    height: 100% !important;
    min-height: 0 !important;
    overflow: hidden !important;
    align-content: center !important;
}

.chips.search.chips--tagify .tagify__tag{
    margin: 0 8px 0 0 !important;
    align-self: center !important;
    max-width: 100% !important;
}

.chips.search.chips--tagify .tagify__tag-text{
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
}

.chips.search.chips--tagify .tagify__dropdown,
.chips.search.chips--tagify + .tagify__dropdown{
    position: absolute !important;
    left: 0 !important;
    top: calc(100% - 1px) !important;
    width: 100% !important;
    z-index: 10 !important;
}

/* Minimal replacements for Materialize navbar utility classes */
.nav-wrapper{
    display: flex;
    align-items: center;
}

.brand-logo{
    display: inline-flex;
    text-decoration: none;
}

.right{
    margin-left: auto;
}

.hide-on-med-and-down{
    display: flex;
}

.center-align{
    text-align: center;
}

#nav-mobile{
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: row;
    margin-left: auto;        /* push the whole list to the right */
    justify-content: flex-end; /* keep items packed to the right */
    padding-right: 28px;
}

#nav-mobile li{
    list-style: none;
    margin: 0;
    padding: 0;
}

.navbarLogoText {
    position: fixed;
    left: 28px;
    top: 125px;
    width: 404px;
    pointer-events: none;
}

.mobileMenuContent{
    display: contents;
}

.mobileMenuButton{
    display: none;
}

@media (max-width: 770.9px){
    .nav-wrapper{
        justify-content: space-between;
        padding: 0 14px 0 0;
    }

    .mobileMenuButton{
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 8px;
        width: 48px;
        height: 48px;
        padding: 0;
        border: 1px solid #000;
        border-radius: 20px;
        background: #F19E47;
        cursor: pointer;
        transition: filter 120ms ease, transform 60ms ease;
    }

    .mobileMenuButton span{
        display: block;
        width: 32px;
        height: 2px;
        background: #000;
    }

    .mobileMenuButton:hover{
        filter: brightness(1.06);
    }

    .mobileMenuButton:active{
        filter: brightness(0.94);
        transform: translateY(1px);
    }

    .mobileMenuButton:focus-visible{
        outline: 3px solid #000;
        outline-offset: 2px;
    }

    .mobileMenuContent{
        display: none;
        box-sizing: border-box;
        position: absolute;
        top: calc(100% - 1px);
        right: 14px;
        width: min(420px, calc(100vw - 28px));
        padding: 16px;
        border: 1px solid #000;
        border-radius: 20px;
        background: #63A19E;
        box-shadow: 0 8px 18px rgb(0 0 0 / 20%);
        z-index: 10003;
    }

    .mobileMenuOpen .mobileMenuContent{
        display: flex;
        flex-direction: column;
        gap: 16px;
    }

    .mobileMenuContent .searchParent{
        position: static;
        width: 100%;
        height: 54px;
        margin: 0;
    }

    .mobileMenuContent .search{
        width: 100%;
        height: 54px !important;
        margin: 0;
    }

    .mobileMenuContent .chips.search.chips--tagify{
        width: 100% !important;
        min-width: 0 !important;
        max-width: none !important;
    }

    #nav-mobile{
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
        width: 100%;
        padding: 0;
        margin: 0;
    }

    #nav-mobile .navbarLi{
        width: 100%;
        height: 44px;
    }

    #nav-mobile .navbarLiA{
        height: 44px;
        line-height: 44px;
    }
}

@media (max-width: 700px){
    .navbarform{
        height: 72px;
    }

    .nav-wrapper{
        height: 100%;
        padding: 0 14px 0 5px;
    }

    .navbarLogoImg{
        width: 70px;
        height: 60px;
        margin: 0;
        object-fit: contain;
    }

    .navbarLogoText{
        left: 16px;
        top: 90px;
        width: min(260px, calc(100vw - 32px));
        height: auto;
    }

    body:has(.leftbarParent) .navbarLogoText,
    body:has(#detailbar.panelLayerFront) .navbarLogoText,
    body:has(#detailbar.panelLayerBack) .navbarLogoText{
        visibility: hidden;
    }

    .mobileMenuContent{
        top: 71px;
        right: auto;
        left: 0;
        width: 100%;
        border-top: 0;
        border-radius: 0 0 20px 20px;
    }
}
