nav {
    height: 64px !important;
}

ul.hide-on-med-and-down {
    height: 100% !important;
    margin-right: 2em;
}

ul.right.hide-on-med-and-down li {
    height: 100%;
}


/* navbar logo  */
.mobile-sidenav-wrapper a.brand-logo {
    display: flex;
    align-items: center;
    height: 100% !important;
    z-index: 900;
}

.mobile-sidenav-wrapper .brand-logo img {
    max-height: 100%;
}

.lokala-desktop-logo{
    height: 100%;
    margin-left: 0.5em;
    padding: 10px 0px;
}

/* web navbar buttons */
.hide-on-med-and-down .navbar-button-container {
    height: 100%;
    padding: 0 !important;
    margin-right: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hide-on-med-and-down .icon-wrapper {
    height: 64px !important;
    min-width: 75px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.navbar-button-container .navbar-button-icon {
    height: 100% !important;
    margin-top: 7px;
    font-size: 33px;
    color: var(--lokala-green);
}

.navbar-button-container .navbar-button-text {
    height: 24px;
    color: var(--lokala-green);
    font-weight: 800;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* language dropdown */
.language-dropdown-wrapper {
    display: flex;
    height: 75%;
}

#language-wrapper.language-dropdown-wrapper {
    border: 2px solid var(--lokala-green);
    border-radius: var(--lokala-border-radius);
    margin-top: 0.5em;
}

.language-dropdown-wrapper .language-selection {
    height: 100%;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
}

a.dropdown-trigger.language-selection span{
    padding: 0; /* removes padding from the icons */
    color: var(--lokala-green);
}

a.dropdown-trigger.language-selection span.language-text{
    padding: 0 10px; /* Adds padding to the text */
}

/* dropdown css */
ul#profile-dropdown.dropdown-content,
ul#language-dropdown.dropdown-content {
    top: 100% !important;
    display: inline-table !important;/* disables scrolldown for dropdown */
    pointer-events: none !important; /* disables the buttons when dropdown is inactivated*/
}

ul#profile-dropdown.dropdown-content[style*="display: block"],
ul#language-dropdown.dropdown-content[style*="display: block"]{
    pointer-events: auto !important; /* enables the buttons when dropdown is activated */
} 

ul#profile-dropdown.dropdown-content a,
ul#language-dropdown a.language-text{
    display: flex;
    align-items: center;
    color: var(--lokala-green) !important;
    margin: 0; /* Remove default margin */
}

ul#language-dropdown a.selected-lang{
    background-color: var(--lokala-green) !important;
    color: var(--lokala-white) !important;
    font-weight: 800;
}

#profile-dropdown .profile-dropdown-icon {
    margin-right: 5px; /* Adjust the value as needed */
    font-size: 30px; /* Ensure icon size */
    color: var(--lokala-green); /* Ensure icon color */
}

/* removes mobile logo from the desktop */
.lokala-mobile-logo{
    display: none;
}


/* sidenav for mobile*/
nav a.sidenav-trigger{
    height: 64px !important;
    margin-left: auto; /* Pushes icon to right */
}

a.sidenav-trigger span.menu-icon{
    color: var(--lokala-green);
    font-size: 40px;
}

ul.sidenav .material-icons {
    color: var(--lokala-green) !important;
}

ul.sidenav li div.sidenav-button {
    padding-top: 1em;
    padding-bottom: 1em;
    border-top: 1px solid var(--lokala-green);
    align-items: center;
}

.sidenav-logo-item {
    height: auto;
    min-height: 10em;
    padding-top: 2em;
    padding-bottom: 2em;
    text-align: center;
}

.sidenav-mobile-logo {
    height: 100% !important;
}

.sidenav-lokala-mobile-logo {
    height: 100%;
    max-height: 5rem;
    width: auto;
    display: block;
    margin: 0 auto;
}
.sidenav-lokala-mobile-logo img {
    height: 100%;
}

ul.sidenav li.last-language .sidenav-button {
    border-bottom: 1px solid var(--lokala-green);
}

ul.sidenav .sidenav-button a {
    display: flex;
    align-items: center;
    text-decoration: none; /* Remove default underline from anchor tags */
}

ul.sidenav .language-buttons {
    padding-top: 0.5em !important;
    padding-bottom: 0.5em !important;
    border-bottom: 1px solid var(--lokala-green);
}

/* For the selected language */
ul.sidenav .language-buttons.selected-language {
    background-color: var(--lokala-green) !important;
    border-top: 1.5px solid var(--lokala-green-dark);
    border-bottom: 1.5px solid var(--lokala-green-dark);

    span {
        color: var(--lokala-white) !important;
    }
}

/* mobile-nav icon size */
ul.sidenav div.sidenav-button span.sidenav-button-icon{
    font-size: 35px;
    margin: 0;
}

ul.sidenav .sidenav-button span {
    font-weight: 800;
    font-size: 17px;
    margin-left: 0.75em;
    color: var(--lokala-green);
}

ul.sidenav .login-button,
ul.sidenav .register-button,
ul.sidenav .logout-button {
    width: 90% !important; /* Make the buttons fill the width of the div */
}

ul.sidenav .register-button {
    background-color: var(--lokala-dark-orange) !important;
}

ul.sidenav .logout-button {
    background-color: var(--lokala-red) !important;
}

ul.sidenav .login-button a,
ul.sidenav .register-button a,
ul.sidenav .logout-button a {
    font-weight: 800 !important;
    font-size: 17px !important;
    color: white !important;
}

ul.sidenav .sidenav-bottom-buttons {
    width: 100%; /* Make the div 100% width of the parent container */
    display: flex;
    flex-direction: column; /* Align buttons in a column */
    position: static; /* Remove absolute positioning */
    margin-bottom: 0; /* Remove bottom margin */
    align-items: center; /* Center items horizontally */
    margin: 60px 0px 25px 0px;
}


@media (max-width: 1250px) {
    .cancel-search-btn {
        display: none !important;
    }

    .hide-on-med-and-down {
        display: none !important;
    }

    .sidenav-trigger {
        display: flex !important;
    }
}

/* Background overlay and x button only on desktop menu */
@media (min-width: 1250px) {
    .background-overlay {
        position: fixed;
        width: 100%;
        height: 64px;
        background-color: var(--lokala-white); /* Initial opacity is 0 */
        opacity: 0;
        z-index: -1;
    }

    .cancel-search-btn {
        display: none;
        position: relative;
        height: 40px;
        width: 40px;
        border-radius: 50%;
        border: none;
        background-color: var(--lokala-green-transparent-70) !important;  /*Transparent lokala green */
        margin-right: 30px;
        align-items: center;
        justify-content: center;
        z-index: 1999 !important;
        transition: background-color 0.3s ease;
    }

    .cancel-search-btn:hover {
        background-color: var(--lokala-orange) !important;
    }

    .cancel-search-btn span {
        padding: 5px;
    }
}

.basket-container {
    position: relative;
}

.basket-container .basket-amount {
    position: absolute;
    top: 10px;
    right: 0;
    background-color: var(--lokala-green);
    color: var(--lokala-white);
    border-radius: 50%;
    line-height: 0.5rem;
    padding: 7px;
}

/* Media query for mobile devices */
@media (max-width: 800px) {

    nav .mobile-nav-wrapper {
        width: 100%;
        height: 100% !important;
    }

    .brand-logo img {
        height: 75%; /* Adjust the width of the logo for smaller screens */
        align-items: center; /* Vertically align items center */
        max-height: 100%;
        margin-left: 0.1em;
    }

    nav .brand-logo,
    nav .sidenav-trigger {
        height: 100%;
    }

    /* displays mobile logo */
    .lokala-mobile-logo {
        display: block;
    }

    .lokala-desktop-logo {
        display: none;
    }

    .mobile-basket-container .mobile-basket-amount{
        background-color: var(--lokala-green) !important;
        color: var(--lokala-white) !important;
        border-radius: 50%;
        line-height: 0.5rem;
        padding: .8em;
    }
}

@media screen and (orientation: landscape) {
    .sidenav {
        height: 100vh !important; /* Set the height to 100% of the viewport width in landscape mode */
        overflow-y: auto; /* Enable vertical scrolling */
    }
}
