
/* Doe Network compact case-search bar
   Designed to replace the old small search controls above regular pages. */

.dn-compact-search {
    display: flex !important;
    width: 100% !important;
    justify-content: center !important;
    align-items: center !important;
    margin: 8px auto 10px !important;
    text-align: center !important;
}

.dn-compact-search form {
    display: flex !important;
    width: auto !important;
    justify-content: center !important;
    align-items: center !important;
    gap: 6px;
    margin: 0 auto !important;
}

.dn-search-label {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.dn-compact-search input[type="search"] {
    width: 230px;
    height: 31px;
    box-sizing: border-box;
    padding: 4px 9px;
    border: 1px solid #7F9BA8;
    border-radius: 3px;
    background: #FFFFFF;
    color: #172536;
    font: 14px "Open Sans", Arial, sans-serif;
}

.dn-compact-search input[type="search"]:focus {
    border-color: #147CA6;
    outline: 2px solid rgba(20, 124, 166, 0.18);
    outline-offset: 1px;
}

.dn-search-button,
.dn-advanced-button {
    display: inline-block;
    box-sizing: border-box;
    min-height: 31px;
    padding: 5px 11px;
    border: 1px solid #147CA6;
    border-radius: 3px;
    background: #147CA6;
    color: #FFFFFF !important;
    font: 600 13px "Open Sans", Arial, sans-serif;
    line-height: 19px;
    text-decoration: none !important;
    cursor: pointer;
}

.dn-search-button:hover,
.dn-search-button:focus,
.dn-advanced-button:hover,
.dn-advanced-button:focus {
    background: #049DD9;
    border-color: #049DD9;
    color: #FFFFFF !important;
    text-decoration: none !important;
}

@media (max-width: 620px) {
    .dn-compact-search form {
        width: calc(100% - 20px);
        flex-wrap: wrap;
    }

    .dn-compact-search input[type="search"] {
        width: 100%;
        flex: 1 1 100%;
    }
}


/* =========================================================
   DOE NETWORK - FINAL COMPACT SEARCH CENTERING
   ========================================================= */
body .dn-compact-search {
    display: block !important;
    clear: both !important;
    float: none !important;
    position: relative !important;
    left: auto !important;
    right: auto !important;
    width: 100% !important;
    max-width: none !important;
    margin: 8px auto 10px auto !important;
    padding: 0 !important;
    text-align: center !important;
}

body .dn-compact-search form {
    display: inline-flex !important;
    float: none !important;
    position: relative !important;
    left: auto !important;
    right: auto !important;
    width: auto !important;
    max-width: 100% !important;
    margin: 0 auto !important;
    padding: 0 !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 6px !important;
    text-align: left !important;
}

@media (max-width: 620px) {
    body .dn-compact-search form {
        display: flex !important;
        width: calc(100% - 20px) !important;
        flex-wrap: wrap !important;
    }
}


/* FINAL CENTER FIX - override legacy site rules */
html body .dn-compact-search {
    box-sizing: border-box !important;
    display: flex !important;
    clear: both !important;
    float: none !important;
    width: 100% !important;
    min-width: 100% !important;
    margin: 8px 0 10px 0 !important;
    padding: 0 !important;
    justify-content: center !important;
    align-items: center !important;
    text-align: center !important;
}

html body .dn-compact-search > form {
    box-sizing: border-box !important;
    display: flex !important;
    float: none !important;
    width: max-content !important;
    min-width: 0 !important;
    max-width: calc(100% - 20px) !important;
    margin: 0 !important;
    padding: 0 !important;
    position: static !important;
    transform: none !important;
    justify-content: center !important;
    align-items: center !important;
    gap: 6px !important;
}

@media (max-width: 620px) {
    html body .dn-compact-search > form {
        width: auto !important;
        flex-wrap: wrap !important;
    }
}


/* =========================================================
   DOE NETWORK - COMPACT SEARCH READABILITY UPDATE
   ========================================================= */

/* Keep the text label visually hidden but accessible */
html body .dn-compact-search .dn-search-label {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
}

/* Search input */
html body .dn-compact-search input[type="search"] {
    box-sizing: border-box !important;
    width: 230px !important;
    height: 34px !important;
    padding: 6px 10px !important;
    border: 1px solid #8AA9B8 !important;
    border-radius: 3px !important;
    background: #FFFFFF !important;
    color: #172536 !important;
    font-family: "Open Sans", Arial, sans-serif !important;
    font-size: 14px !important;
    line-height: 20px !important;
}

html body .dn-compact-search input[type="search"]::placeholder {
    color: #667784 !important;
    opacity: 1 !important;
}

/* Search button */
html body .dn-compact-search .dn-search-button {
    box-sizing: border-box !important;
    height: 34px !important;
    padding: 6px 14px !important;
    border: 1px solid #126B8F !important;
    border-radius: 3px !important;
    background: #147CA6 !important;
    color: #FFFFFF !important;
    font-family: "Open Sans", Arial, sans-serif !important;
    font-size: 14px !important;
    font-weight: 700 !important;
    line-height: 20px !important;
    text-decoration: none !important;
    cursor: pointer !important;
}

html body .dn-compact-search .dn-search-button:hover,
html body .dn-compact-search .dn-search-button:focus {
    background: #0F6385 !important;
    color: #FFFFFF !important;
}

/* Advanced Search button */
html body .dn-compact-search .dn-advanced-button,
html body .dn-compact-search .dn-advanced-button:link,
html body .dn-compact-search .dn-advanced-button:visited {
    box-sizing: border-box !important;
    display: inline-flex !important;
    height: 34px !important;
    padding: 6px 14px !important;
    align-items: center !important;
    justify-content: center !important;
    border: 1px solid #126B8F !important;
    border-radius: 3px !important;
    background: #147CA6 !important;
    color: #FFFFFF !important;
    font-family: "Open Sans", Arial, sans-serif !important;
    font-size: 14px !important;
    font-weight: 700 !important;
    line-height: 20px !important;
    text-decoration: none !important;
}

html body .dn-compact-search .dn-advanced-button:hover,
html body .dn-compact-search .dn-advanced-button:focus,
html body .dn-compact-search .dn-advanced-button:active {
    background: #0F6385 !important;
    color: #FFFFFF !important;
    text-decoration: none !important;
}

/* Keyboard focus visibility */
html body .dn-compact-search input[type="search"]:focus,
html body .dn-compact-search .dn-search-button:focus,
html body .dn-compact-search .dn-advanced-button:focus {
    outline: 2px solid #C79600 !important;
    outline-offset: 2px !important;
}

@media (max-width: 620px) {
    html body .dn-compact-search input[type="search"] {
        width: 100% !important;
        max-width: 300px !important;
    }
}
