#id_Header1 {
    background-color: #17324D;
}

/* Hide the search field */
.searchBoxField {
    display: none !important;
}

/* Keep the search icon visible */
.searchBoxButton {
    display: inline-block !important;
}


/* 1. Group the native gadgets into a single horizontal container block */
.WaGadgetLoginButton, 
.WaGadgetSiteSearch {
    display: inline-flex !important;
    align-items: center !important;
    width: max-content !important;
    padding: 0 !important;
    
    /* Forces absolute placement in the top right corner */
    position: absolute !important;
    top: 20px !important; /* Adjust this to move the buttons higher or lower */
    z-index: 999 !important;
}

/* 2. Position the Login button right before the Search button */
/*.WaGadgetSiteSearch {
    right: 80px !important; /* Changed from 180px to bring it closer to the search button 
}*/

/* 3. Position the Search button flush against the right margin */
.WaGadgetLoginButton {
    right: 20px !important; /* Keeps the search button pinned to the right edge */
}

/* 4. Fix Wild Apricot's internal layout engines from stretching the elements */
.WaGadgetLoginButton .gadget, 
.WaGadgetSiteSearch .gadget,
.WaGadgetLoginButton .wa-gadget,
.WaGadgetSiteSearch .wa-gadget {
    width: auto !important;
    display: inline-block !important;
}


/* Position when logged out */
.id_anonymous .WaGadgetSiteSearch {
    right: 120px !important; 
}

/* Position when logged in */
.id_logged-in .WaGadgetSiteSearch {
    right: 80px !important; 
}
