/* Custom navbar styles for responsive design */

@media screen and (max-width: 991px) {
    /* Make container a flex container to properly position elements */
    .navbar .container {
        display: flex;
        justify-content: space-between;
        align-items: center;
        flex-wrap: wrap;
        position: relative;
        padding-right: 15px; /* Ensure there's space for the button */
        box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06); /* Add subtle shadow at the bottom */
    }
    
    /* Ensure logo takes appropriate space */
    .logo-wrapper {
        flex: 1;
    }
    
    /* Position the navbar-toggler button to the right */
    .navbar-toggler {
        position: absolute;
        right: 15px;
        top: 21px; /* Align with the logo's top padding */
        margin: 0 !important;
        z-index: 10;
        display: flex;
        align-items: center;
        justify-content: center;
        float: right; /* Ensure it stays on the right */
    }
    
    /* Ensure the navbar-toggler-icon is properly centered */
    .navbar-toggler .navbar-toggler-icon {
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    /* Ensure the collapse takes full width when expanded */
    .navbar-collapse {
        flex-basis: 100%;
        order: 3;
        margin-top: 0;
        clear: both; /* Ensure it starts on a new line */
    }
    
    /* Fix for when the button jumps down */
    @media (max-width: 576px) {
        .navbar .container {
            flex-direction: row;
            flex-wrap: wrap;
            justify-content: space-between;
            box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06); /* Add subtle shadow at the bottom */
        }
        
        .logo-wrapper {
            max-width: 70%;
            flex: 0 0 auto;
        }
        
        .navbar-toggler {
            position: relative;
            top: auto;
            right: 0;
            margin-left: auto !important;
            flex: 0 0 auto;
            align-self: center;
        }
    }
}

/* Additional styles for smaller screens */
@media screen and (max-width: 767px) {
    .navbar-toggler {
        right: 10px;
    }
    
    /* Ensure the button stays on the right even when it wraps */
    .navbar .container {
        position: relative;
        box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06); /* Add subtle shadow at the bottom */
    }
    
    /* Force the toggler to stay on the right */
    .navbar-toggler {
        position: absolute;
        right: 10px;
        top: 21px;
    }
}

/* ==========================================================================
   Sample Box Nav Icon — positioned inside navbar-collapse, after nav items
   ========================================================================== */

.sample-box-nav-item {
    color: var(--nl-dark, #3a2f2f);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    margin-left: 1rem;
    position: relative;
    cursor: pointer;
    background: none !important;
    border: none !important;
    padding: 0.5rem;
    overflow: visible;

    &:hover,
    &:focus {
        color: var(--nl-primary, #bf8e97) !important;
        background: none !important;
        outline: none;
    }

    svg {
        display: block;
    }
}

/* Homepage: hide sample box icon when empty (JS adds has-items when items exist) */
.sample-box-nav-item[data-hide-when-empty="true"] {
    display: none;
}

.sample-box-nav-item[data-hide-when-empty="true"].has-items {
    display: inline-flex;
}

@media screen and (max-width: 991px) {
    .sample-box-nav-item {
        margin-left: 0;
        margin-top: 0.75rem;
        margin-bottom: 0.5rem;
        padding: 0.5rem 0;
    }

    /* Override style.css .navbar button:hover { color: transparent !important } */
    .navbar .sample-box-nav-item:hover,
    .navbar .sample-box-nav-item:focus,
    .navbar .sample-box-nav-item:active {
        color: var(--nl-primary, #bf8e97) !important;
        background: none !important;
    }
}