/* Override the CSS rules from the uw-soe-digital-measures-import plugin's style.css?ver=1579624524:1 */
/* This sets the values back to the defaults defined in uw-theme */
@media screen and (min-width: 50em)
{
    #ccbcAdvancedBookSearch input[type="text"], #ccbcAdvancedBookSearch select{
        padding-left: .5rem !important;
        border-radius: 0;
        border-left: 1px solid #646569;
        border-right: 1px solid #646569;
        height: 2.4375rem;
        font-size: 1rem;
    }
}

/* uw-theme previously provided this base border/appearance styling for every text input
   and select (including the custom dropdown arrow); the new theme does not, so it's
   defined here instead. */
#ccbcAdvancedBookSearch input[type="text"],
#ccbcAdvancedBookSearch select{
    box-sizing: border-box;
    width: 100%;
    height: 2.4375rem;
    margin: 0 0 1rem;
    padding: 0.5rem;
    border: 1px solid #646569;
    border-radius: 0;
    background-color: #fff;
    font-family: inherit;
    font-size: 1rem;
    color: #000;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
}

#ccbcAdvancedBookSearch input[type="text"]{
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.1);
}

#ccbcAdvancedBookSearch select{
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' version='1.1' width='32' height='24' viewBox='0 0 32 24'><polygon points='0,0 32,0 16,24' style='fill: rgb%2840, 39, 40%29'></polygon></svg>");
    background-origin: content-box;
    background-position: right -1rem center;
    background-repeat: no-repeat;
    background-size: 9px 6px;
    padding-right: 1.5rem;
}

#ccbcAdvancedBookSearch input[type="text"]:focus,
#ccbcAdvancedBookSearch select:focus{
    outline: none;
    border: 1px solid #282728;
    background-color: #fff;
    box-shadow: 0 0 5px #646569;
}

/* The CCBC child theme has some rules that apply to this page /wp-content/themes/uw-theme-ccbc-child/ccbc-custom.css?ver=5.3.2 */
/* IMO any CSS rules specific to this plugin's views should be part of this plugin, not the theme */

/* Rules copied from the child theme, because the parent theme's rules were overriding the child theme's rules by file-inclusion order not specificity */
/* Plugin rules are included last */

#book_search_results .row{
    display: flex;
    flex-flow: row wrap;
    flex-wrap: wrap;
    max-width: 75rem;
    margin: auto;
}

#book_search_results .search-result{
    border-bottom: 1px solid #ccc;
    padding: 20px 0 15px 0;
}

#book_search_results .book-thumb{
    max-width: 150px;
    margin-right: 15px;
    margin-top: 5px;
}

.search-result h2{
	margin-top: 0;
    text-transform: none;
    font-weight: 700;
    font-size: 22px;
}

/* Cancel the uw-theme styles for h2:before */
.search-result h2:first-child:before{
    content: none;
}


.search-result:last-child{
    border: none;
}

/* End copied from the child theme */
.search-result p{
     line-height: 1.4em; 
     margin-bottom: .8rem; 
     font-size: 16px; 
}

/*set sections of search results to act as columns in layout*/
.search-result-col{
	flex: 1;
}

#ccbcAdvancedBookSearch .search-result h2 a {
    text-decoration: underline;
}

.clearFloat{
    clear: both;
}

#ccbcAdvancedBookSearch div.searchInfo{
    margin: 0 0 20px 0;
    float: left;
}

#ccbcAdvancedBookSearch div.searchInfo a{
    text-decoration: underline;
}

#ccbcAdvancedBookSearch > div.clearFiltersWrapper {
    display: flex;
    flex-flow: row wrap;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

#ccbcAdvancedBookSearch > div.clearFiltersWrapper > button {
    text-decoration: none;
    font-size: 1rem;
    margin: 0 5rem 0 0;
}

/* Compounded with .button (not just .button-blue) so this reliably outranks the shared
   .button base rule regardless of which CSS file the page happens to enqueue first */
.button.button-blue {
    background-color: #0479a8 !important;
    transition: none !important;
    border: 2px solid transparent;
    box-shadow: none;
    font-weight: 400;
}

.button.button-blue:hover {
    background-color: #03678f !important;
    transition: none !important;
    color: #fff;
}

.button.button-blue:focus {
    color: #fff;
    border: 2px solid black;
}

.button.button-gray{
    background-color: #656565 !important;
    transition: none !important;
    border: 2px solid transparent;
    box-shadow: none;
    font-weight: 400;
}
.button.button-gray:hover {
    background-color: #575656 !important;
    transition: none !important;
    color: #fff;
}
.button.button-gray:focus {
    color: #fff;
    border: 2px solid black;
}

#book_search_results .searchResultsHeaderLeft{
    float: left;
}

#book_search_results .totalCountWrapper{
    float: right;
    padding-top: 6px;
}

.bookSearchPagination{
    text-align: center;
}

.bookSearchPagination > ul{
    list-style: none;
    margin-left: 0;
}

.bookSearchPagination > ul > li {
    display: inline;
}

#book_search_results .bookSearchPagination > ul > li {
    color: rgb(4, 121, 168, 1);
}

#ccbcAdvancedBookSearch .bookSearchPagination > ul > li > a {
    text-decoration: none;
    font-size: 1.2rem;
    padding: 0px 5px;
    display: inline-block;
    border: 1px solid transparent;
}

#ccbcAdvancedBookSearch .bookSearchPagination a:hover, #ccbcAdvancedBookSearch .bookSearchPagination a.current {
    border: 1px solid rgb(4, 121, 168, 1);
    text-decoration: underline;
}

.searchResultsHeader {
    float: left;
    width: 100%;
}

.searchResultsHeaderRight {
    float: right;
}

.searchResultsHeader label {
    font-weight: bold;
}

div.operatorSearchFieldsWrapper {
    margin: 0 0;
    padding: 0 0;
    list-style: none;
    font-size: 1rem;
    font-weight: 700;
    display: flex;
    flex-flow: row wrap;
    justify-content: flex-start;
    align-items: center;
}

#ccbcAdvancedBookSearch div.operatorSearchFieldsWrapper input[type="text"] {
    padding-left: 1.6rem !important;
    padding-right: 1.4rem !important;
    /* Search magnifying glass from parent uw-theme */
    background: url(data:image/svg+xml;charset=utf-8;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCA5NTEgMTAyNCI+PHBhdGggY2xhc3M9InBhdGgxIiBkPSJNNjU4LjI4NiA0NzUuNDNxMC0xMDUuNzE1LTc1LjE0My0xODAuODU4VDQwMi4yODYgMjE5LjQzIDIyMS40MyAyOTQuNTcgMTQ2LjI4NSA0NzUuNDN0NzUuMTQzIDE4MC44NTYgMTgwLjg1NiA3NS4xNDMgMTgwLjg1Ny03NS4xNDQgNzUuMTQzLTE4MC44NTd6bTI5Mi41NyA0NzUuNDI3cTAgMjkuNzE0LTIxLjcxMyA1MS40M1Q4NzcuNzEzIDEwMjRxLTMwLjg1NiAwLTUxLjQyOC0yMS43MTRsLTE5Ni0xOTUuNDNxLTEwMi4yODYgNzAuODU4LTIyOCA3MC44NThRMzIwLjU3IDg3Ny43MTQgMjQ2IDg0NnQtMTI4LjU3Mi04NS43MTQtODUuNzE0LTEyOC41N1QwIDQ3NS40Mjh0MzEuNzE0LTE1Ni4yODcgODUuNzE0LTEyOC41NyAxMjguNTctODUuNzE1IDE1Ni4yODctMzEuNzE0IDE1Ni4yODYgMzEuNzE0IDEyOC41NzIgODUuNzE0IDg1LjcxNCAxMjguNTdUODA0LjU3IDQ3NS40M3EwIDEyNS43MTMtNzAuODU3IDIyOGwxOTYgMTk2cTIxLjE0MyAyMS4xNDIgMjEuMTQzIDUxLjQyOHoiIGZpbGw9IiM4ZThlOTIiIHRyYW5zZm9ybT0ic2NhbGUoMC41KSIgLz48L3N2Zz4=) no-repeat #fff;
    background-position: left 5px top 9px;
}

#ccbcAdvancedBookSearch .columnTextSearch {
    position: relative;
}
#ccbcAdvancedBookSearch button.clear-text-button {
    position: absolute;
    top: 12px;
    right: 5px;
    z-index: 10;
    width: 16px;
    height: 18px;
    padding: 1px;
    border: 1px solid transparent;
    vertical-align: middle;
}
#ccbcAdvancedBookSearch button.clear-text-button:focus {
    border: 1px solid #888;
}
#ccbcAdvancedBookSearch button.clear-text-button svg {
    height: 13px;
    width: 13px;
}

div#searchRow2,
div#searchRow3,
div#searchRow4,
div#searchRow5 {
    display: none;
}

div.operatorSearchFieldsWrapper > .columnOperatorSelect,
div.operatorSearchFieldsWrapper > .columnFilterSelect,
div.operatorSearchFieldsWrapper > .columnTextSearch,
div.operatorSearchFieldsWrapper > .columnRowControls {
    display: flex;
    flex-direction: column;
}

div.operatorSearchFieldsWrapper > .columnOperatorSelect {
    flex-grow: 1;
    max-width: 5rem;
}

div.operatorSearchFieldsWrapper > .columnFilterSelect {
    margin-left: 1rem;
    flex-grow: 1;
    max-width: 8rem;
}

div.operatorSearchFieldsWrapper > .columnTextSearch {
    margin-left: 1rem;
    flex-grow: 2;
    flex: auto;    
}

div.operatorSearchFieldsWrapper > .columnRowControls {
    margin-left: 1rem;
    flex-grow: 1;
    width: 4rem;
    min-width: 4rem;
    max-width: 4rem;
    display: flex;
    flex-flow: row nowrap;
}

div.operatorSearchFieldsWrapper > .columnRowControls > button {
    margin-bottom: 0.8rem;
}

div.operatorSearchFieldsWrapper > .columnRowControls > button:first-child {
    margin-right: 1rem;
}

div.operatorSearchFieldsWrapper > .columnRowControls > button > svg {
    width: 1.5rem;
    height: 1.5rem;
}

div.operatorSearchFieldsWrapper > .columnTextSearch input {
    width: 100%;
}

div.operatorSearchSubmit {
    display: flex;
    justify-content: flex-end;
    padding-right: 5rem;
}

div.operatorSearchSubmit button {
    font-size: 16px;
}



/* ---------  Syles for filter bar -------------  */
.newBookSearchBar > li button{
    margin: 0 0 3px 0;
    padding: .85em .5em;
    line-height: 1;
    font-size: 1rem;
}

ul.newBookSearchBar > li.searchFiltersToggleWrapper {
    line-height: normal;
}

#ccbcAdvancedBookSearch .newBookSearchBar a{
    text-decoration: none;
    color: #006E98;
}

#ccbcAdvancedBookSearch .newBookSearchBar a:hover{
    text-decoration: none;
    color: #014D6B;
}

#ccbcAdvancedBookSearch label > input[type='checkbox'], #ccbcAdvancedBookSearch label > input[type='radio']{
    margin-right: .25rem;
}

.bookSearchFilterList{
    margin: .5rem .5rem;
}

ul.bookSearchFilterList{
    list-style: none;
    /* uw-theme previously zeroed out the browser's default ul padding (which causes
       indentation); the new theme does not reset this, so it's done here instead. */
    padding-left: 0;
}

ul.bookSearchFilterList li{
    margin-bottom: 0;
    /* Cancel the font-weight: 700 inherited from the ancestor ul.newBookSearchBar > li,
       which uw-theme's label{font-weight:normal} reset previously canceled for us */
    font-weight: normal;
}

/** Stuff below is to put the vertical separator line between columns for the filter checkboxes **/

.newBookSearchBarSubmenu:after{
    clear: both;
    content: "";
    display: table;
}

.newBookSearchBarSubmenu > .bookSearchFilterSection {
    position: relative;
    padding: .5rem 1rem;
}

.newBookSearchBarSubmenu > .bookSearchFilterSection:not(:last-child)::after {
    content: '';
    position: absolute;
    right: -2px;
    top: 2%;
    width: 1px;
    height: 93%;
    background-color: rgb(200,200,200);
}

/** Stuff below is to implement the sub-menu for the search bar **/
.newBookSearchBar svg{
    height: 1.2rem;
    width: 1.2rem;
    fill: #0479a8;
    margin-top: -.3rem;
    margin-left: .7rem;
    vertical-align: middle;
}

.SearchFiltersToggle{
    font-size: 14px;
}

.SearchFiltersToggle.active{
    color: #036890;
}

#ccbcAdvancedBookSearch .SearchFiltersToggle.active, #ccbcAdvancedBookSearch .SearchFiltersToggle:hover{
    text-decoration: underline;
}

.newBookSearchBarWrapper{
    background-color: rgb(230,230,230);
}

ul.newBookSearchBar,
ul.newBookSearchBar > li
{
    margin: 0 0;
    padding: 0.25rem 0 0 1.25rem;
    list-style: none;
    font-size: 1rem;
    font-weight: 700;
    display: flex;
    flex-wrap: nowrap;
    justify-content: space-between;
    align-items: center;
}

ul.newBookSearchBar{
    position: relative;
}

ul.newBookSearchBar > li{
    display: block;
    text-align: center;
    padding: 0 8px;
}

ul.newBookSearchBar > li > fieldset {
    margin: auto;
    padding: 0;
    border: 0;
}

ul.newBookSearchBar > li > fieldset > legend{
    text-align: center;
}

.newBookSearchBarSubmenu, .newBookSearchBarSubmenu *{
    text-align: left;
}

ul.newBookSearchBar > li:nth-child(1) {
    display: none;
}

#ccbcAdvancedBookSearch ul.newBookSearchBar > li > input[type="text"]{
    margin: .5rem auto;
    padding-left: 2rem !important;
    width: 14rem;
    /* Search magnifying glass from parent uw-theme */
    background: url(data:image/svg+xml;charset=utf-8;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCA5NTEgMTAyNCI+PHBhdGggY2xhc3M9InBhdGgxIiBkPSJNNjU4LjI4NiA0NzUuNDNxMC0xMDUuNzE1LTc1LjE0My0xODAuODU4VDQwMi4yODYgMjE5LjQzIDIyMS40MyAyOTQuNTcgMTQ2LjI4NSA0NzUuNDN0NzUuMTQzIDE4MC44NTYgMTgwLjg1NiA3NS4xNDMgMTgwLjg1Ny03NS4xNDQgNzUuMTQzLTE4MC44NTd6bTI5Mi41NyA0NzUuNDI3cTAgMjkuNzE0LTIxLjcxMyA1MS40M1Q4NzcuNzEzIDEwMjRxLTMwLjg1NiAwLTUxLjQyOC0yMS43MTRsLTE5Ni0xOTUuNDNxLTEwMi4yODYgNzAuODU4LTIyOCA3MC44NThRMzIwLjU3IDg3Ny43MTQgMjQ2IDg0NnQtMTI4LjU3Mi04NS43MTQtODUuNzE0LTEyOC41N1QwIDQ3NS40Mjh0MzEuNzE0LTE1Ni4yODcgODUuNzE0LTEyOC41NyAxMjguNTctODUuNzE1IDE1Ni4yODctMzEuNzE0IDE1Ni4yODYgMzEuNzE0IDEyOC41NzIgODUuNzE0IDg1LjcxNCAxMjguNTdUODA0LjU3IDQ3NS40M3EwIDEyNS43MTMtNzAuODU3IDIyOGwxOTYgMTk2cTIxLjE0MyAyMS4xNDIgMjEuMTQzIDUxLjQyOHoiIGZpbGw9IiM4ZThlOTIiIHRyYW5zZm9ybT0ic2NhbGUoMC41KSIgLz48L3N2Zz4=) no-repeat #fff;
    background-position: left 5px top 9px;
}
#ccbcAdvancedBookSearch ul.newBookSearchBar > li > select{
    margin: .5rem auto;
    width: 9.5rem;
}

ul.newBookSearchBar > li ul{
    display: block;
    list-style: none;
}

.newBookSearchBarSubmenu{
    position: absolute;
    top: 53px;
    border: 1px solid rgb(230,230,230);
    background: white;
    z-index: 1;
    -webkit-box-shadow: 5px 5px 5px 0px rgba(170,170,170,1);
    -moz-box-shadow: 5px 5px 5px 0px rgba(170,170,170,1);
    box-shadow: 5px 5px 5px 0px rgba(170,170,170,1);
}

.newBookSearchBarSubmenu.linkFilterAgeRange{
    left: 0%;
}

.newBookSearchBarSubmenu.linkFilterDiversitySubject{
    left: 0%;
}

.newBookSearchBarSubmenu.linkFilterContributor{
    left: 5%;
}

.newBookSearchBarSubmenu.linkFilterContentType{
    left: 20%;
}

.newBookSearchBarSubmenu.linkFilterFormat{
    left: 48%;
}

.newBookSearchBarSubmenu.linkFilterPublicationYear{
    left: 65%;
}

.PublicationYearFilter{
    width: 8rem;
}

.newBookSearchBarSubmenu.linkFilterWisconsinInterests{
    left: 78%;
}

ul.newBookSearchBar > li .newBookSearchBarSubmenu{
    display: none;
}

ul.newBookSearchBar > li .newBookSearchBarSubmenu.active{
    display: flex;
    justify-content: flex-start;
    flex-wrap: wrap;
}

ul.newBookSearchBar > li ul > li{
    border: none;
    list-style: none;
    margin: 0 0;
}

#ccbcAdvancedBookSearch .searchTagWrapper a {
    text-decoration: underline;
}

.searchTagWrapper{
    float: left;
    margin-bottom: 20px;
}

.searchTagWrapper a{
    -webkit-border-radius: 5px 5px 5px 5px;
    -moz-border-radius: 5px 5px 5px 5px;
    border-radius: 7px 7px 7px 7px;
    background-color: #d1d1d1;
    border-color: #d1d1d1;
    padding: 0 4px;
    color: #555;
    margin: 5px 0;
    display: inline-block;
}
    
/* Mobile breakpoint */
@media only screen and (max-width: 920px){

    ul.newBookSearchBar{
        display: block;
    }

    ul.newBookSearchBar > li{
        float: left;
    }

    ul.newBookSearchBar > li > a, ul.newBookSearchBar > li > fieldset > legend > a
    {
        line-height: 60px;
    }

    .additionalFiltersWrapper{
        display: block;
    }

    .newBookSearchBarWrapper{
        min-width: auto;
    }

    ul.newBookSearchBar {
    padding: 0 0.25rem;
    }


    ul.newBookSearchBar > li > input[type="text"], ul.newBookSearchBar > li> select, ul.newBookSearchBar > li button{
        width: 100%;
    }

    ul.newBookSearchBar > li{
        float: none;
        border-top: 1px solid #cfcfcf;
        padding: 0 0;
    }

    ul.newBookSearchBar > li.searchFiltersToggleWrapper{
        display: none;
    }

    ul.newBookSearchBar > li:nth-child(1) {
        display: block;
    }

    ul.newBookSearchBar .newBookSearchBarSubmenu{
        position: relative;
        left: auto;
        top: auto;
        z-index: auto;
        -webkit-box-shadow: none;
        -moz-box-shadow: none;
        box-shadow: none;
    }

    ul.newBookSearchBar > li .newBookSearchBarSubmenu.active{
        display: block;
        justify-content: inherit;
        flex-wrap: inherit;
    }

    ul.newBookSearchBar > li > a, ul.newBookSearchBar > li > fieldset > legend > a, ul.newBookSearchBar > li > fieldset > legend
    {
        display: block;
        width: 100%; /* This might only need to be applied to legend */
    }

    .newBookSearchBarSubmenu > .bookSearchFilterSection{
        float: none;
    }

    .newBookSearchBarSubmenu > .bookSearchFilterSection {
        float: none;
        position: relative;
        padding: auto;
    }
    
    .newBookSearchBarSubmenu > .bookSearchFilterSection:not(:last-child)::after {
        content: none;
    }
    
}
