/*--------------------------------------------------------------
Definition of filter dropdowns and filter details

>>> TABLE OF CONTENTS:
----------------------------------------------------------------
1.0 Filter details
2.0 Table filter menu
--------------------------------------------------------------*/

/*--------------------------------------------------------------
1.0 Filter details
--------------------------------------------------------------*/

.filter_details_wrapper > ul {
    margin-top: 0px;
    margin-left: 0px;
    list-style: none;
}

.filter_details_wrapper > ul > li {
    float: left;
    padding: 4px 12px;
    line-height: 20px;
    text-decoration: none;
    background-color: #fff;
    border: 1px solid #ddd;
    border-left-width: 0;
    max-width: 200px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    height: 20px;

}

.filter_details_wrapper > ul > li:not(.inactive) {
    border-color: #c45500
}

.filter_details_wrapper > ul > li:nth-child(1), .filter_details_wrapper > ul > li:nth-child(2) {
    border-radius: 4px 4px 4px 4px;
    border-width: 1px;
    margin-right: 5px;
    font-weight: bold;
}
.filter_details_wrapper > ul > li:nth-child(2n+3) {
    border-radius: 4px 0px 0px 4px;
    border-width: 1px;
    margin-right: 0px;
}
.filter_details_wrapper > ul > li:nth-child(2n+4) {
    border-radius: 0px 4px 4px 0px;
    border-width: 1px;
    border-left-width: 0px;
    margin-right: 5px;
    font-size: 1.5em;
}

.filter_details_wrapper > ul > li:nth-child(2n+3):not(.inactive) a {
    color: #c45500;
    opacity: 0.9;
}

.filter_details_wrapper > ul > li:nth-child(2n+3):not(.inactive) a:hover {
    color: #c45500;
    opacity: 0.5;
}

.filter_details_wrapper span {
    font-size: 1em;
    margin-top: 2px;
    margin-bottom: 2px;
}

.label-filter {
    background-color: #f5f5f5;
    border: 1px solid #e3e3e3;
    color: #000;
    text-shadow: none;
    font-weight: normal;
    padding: 4px 8px 4px 8px;
    margin-left: 0px;
    margin-right: 5px;
}

.filter-info-left {
    margin-right: 0px;
    border-top-right-radius: 0px;
    border-bottom-right-radius: 0px;
    border-right: 1px solid #e3e3e3;
}

.filter-info-right {
    margin-left: 0px;
    border-top-left-radius: 0px;
    border-bottom-left-radius: 0px;
    border-left: none;
    cursor: pointer;
    font-weight: bold;
    font-size: 1.1em !important;
    color: #888;
}

/*--------------------------------------------------------------
2.0 Table filter menu
--------------------------------------------------------------*/

/*TODO do not use such general selectors*/
th img {
    height: 16px;
    width: 16px;
    margin-left: 1px;
    margin-bottom: 3px;
}

th {
    position: relative;
}

tr > td ul.nav {
    margin-left: auto;
}

th.filter-menu {
    text-align: right;
    padding-right: 10px;
    white-space: nowrap;
}

th.filter-menu > div {
    display: inline;
}

th.filter-menu > div:nth-child(1).open .filter-dropdown.pull-right:before {
    left: auto;
    right: 45px;
}

th.filter-menu > div:nth-child(1).open .filter-dropdown.pull-right:after {
    left: auto;
    right: 46px;
}

th.filter-menu > div:nth-child(2).open .filter-dropdown.pull-right:before {
    left: auto;
    right: 25px;
}

th.filter-menu > div:nth-child(2).open .filter-dropdown.pull-right:after {
    left: auto;
    right: 26px;
}

th.filter-menu > div:nth-child(3).open .filter-dropdown.pull-right:before {
    left: auto;
    right: 6px;
}

th.filter-menu > div:nth-child(3).open .filter-dropdown.pull-right:after {
    left: auto;
    right: 7px;
}

.filter-dropdown {
    display: none;

    position: absolute;
    top: 100%;
    left: 0;
    min-width: 200px;
    border: 1px solid rgba(0, 0, 0, 0.2);
    border-radius: 0;
    background-color: #fff;
    z-index: 991;
    box-shadow: rgba(0, 0, 0, 0.2) 0px 5px 10px 0px;

    margin-top: 0;
    padding: 5px;

    text-align: left;
    word-break: keep-all;
    white-space: nowrap;
}

.filter-dropdown.pull-right {
    right: 0px;
    left: auto;
}

.open .filter-dropdown.pull-right:before {
    left: auto;
    right: 3px;
}
.open .filter-dropdown.pull-right:after {
    left: auto;
    right: 4px;
}

.open .filter-dropdown {
    display: block;
}

.filter-dropdown > ul.reset-element-filter {
    margin-left: inherit;
    margin-top: 6px;
    padding-left: 5px;
    clear: both;
}

.filter-dropdown > ul.reset-element-filter > li {
    float: left;
    padding: 4px 12px;
    line-height: 20px;
    text-decoration: none;
    background-color: #fff;
    border: 1px solid #ddd;
    border-left-width: 0;
    white-space: nowrap;
    height: 20px;
    font-weight: normal;
    cursor: pointer;
}

.filter-dropdown > ul.reset-element-filter:not(.inactive) > li{
    border-color: #c45500;
}

.filter-dropdown > ul.reset-element-filter > li:nth-child(1) {
    border-radius: 4px 0px 0px 4px;
    border-width: 1px;
    margin-right: 0px;
    width: 220px;
}

.filter-dropdown > ul.reset-element-filter > li:nth-child(2) {
    border-radius: 0px 4px 4px 0px;
    border-width: 1px;
    border-left-width: 0px;
    margin-right: 5px;
    font-size: 1.5em;
    width: 12px;
}

.filter-dropdown hr, .filter-modal hr {
    margin-top: 6px;
    margin-bottom: 6px;
}

.filter-dropdown > span, .filter-modal > span {
    display: inline-block;
    font-weight: normal;
    padding: 1px 5px 1px 5px;
    margin-right: 0px;
    margin-left: 0px;
    cursor: pointer;
    color: #000;
}

.filter-dropdown > button.submit-filter {
    width: 100%;
}

.filter-modal > span:nth-child(n+2) {
    margin-top: -17px;
}

.filter-dropdown > ul {
    color: #000;
}

.filter-modal > span {
    display: block;
}

.filter-modal input[type=checkbox] {
    display: none;
}

#filter-modal {
    text-align: left;
}

span.filter-element-wrapper {
    display: block;
}

.filter-dropdown input.search-field, .filter-modal input.search-field,
.filter-dropdown select.search-field, .filter-modal select.search-field {
    width: 250px !important;
    margin: 0px;
}

.filter-dropdown input.time-search {
    width: 311px !important;
    border-bottom-right-radius: 0;
    margin: 0;
}

.filter-dropdown .not-search, .filter-modal .not-search,
.filter-dropdown .number-search, .filter-modal .number-search {
    border-color: #ccc;
    height: 30px;
}

.filter-dropdown .not-search:disabled, .filter-modal .not-search:disabled,
.filter-dropdown .number-search:disabled, .filter-modal .number-search:disabled {
    color: #848484;
}

.filter-dropdown .not-search:focus, .filter-modal .not-search:focus,
.filter-dropdown .number-search:focus, .filter-modal .number-search:focus {
    outline: none;
}

.filter-dropdown .not-search:before, .filter-modal .not-search:before,
.filter-dropdown .number-search:before, .filter-modal .number-search:before {
    content: "=";
}

.filter-dropdown .not-search.neq:before, .filter-modal .not-search.neq:before {
    content: "\2260";
}

.filter-dropdown .number-search.geq:before, .filter-modal .number-search.geq:before {
    content: "\2265";
}

.filter-dropdown .number-search.leq:before, .filter-modal .number-search.leq:before {
    content: "\2264";
}

.filter-dropdown .filter-select-button {
    border-color: #ccc;
    width: 34px;
    height: 30px;
    padding-left: 9px;
}

.filter-modal .filter-select-multiple-wrapper {
    display: none;
}

.filter-select-multiple-wrapper > * {
    margin-bottom: 10px !important;
}

.filter-dropdown .input-prepend, .filter-modal .input-prepend {
    position: relative;
}

.filter-dropdown .input-prepend select[multiple="multiple"], .filter-dropdown .input-prepend .btn.select-multiple{
    height: 300px;
}

.filter-dropdown .input-prepend input[type="checkbox"]{
    display: none;
}
.filter-modal .input-prepend select[multiple="multiple"], .filter-modal .input-prepend .btn.select-multiple {
    height: 300px;
}
.filter-dropdown ul, .filter-modal ul {
    list-style: none;
}

.filter-dropdown input[type="checkbox"], .filter-modal input[type="checkbox"] {
    margin: 0px 5px 0px 0px;
}

.filter-dropdown .order-toggle {
    color: #ddd;
}

.filter-dropdown .loading:before, .filter-modal .loading:before {
    content: "";
    position: absolute;
    width: 100%;
    height: 100%;
    background: white;
    z-index: 10;
}

.filter-dropdown .loading:after, .filter-modal .loading:after {
    content: "";
    position: absolute;
    width: 20px;
    height: 20px;
    top: 50%;
    left: 50%;
    transform: translateY(-50%) translateX(-50%);
    background: transparent;

    z-index: 10;

    border: 5px solid #20669B;
    border-top-color: #5BB75B;
    border-radius: 50%;

    animation: circleLoader 2s infinite;
}

.filter-dropdown .loading input,
.filter-dropdown .loading select,
.filter-modal .loading input,
.filter-modal .loading select {
    border: none !important;
    box-shadow: none !important;
    outline: none !important;
}

.filter_details_wrapper span {
    font-size: 12px;
    margin-top: 2px;
    margin-bottom: 2px;
}

.filter_details_wrapper > ul > li.search-preset-wrapper > ul > li > span {
    padding: 3px 20px;
}

.filter_details_wrapper > ul > li.search-preset-wrapper {
    font-size: 12px;
}

.filter_details_wrapper > ul > li.search-preset-wrapper {
    padding: 0px;
    height: 28px;
    position: relative;
    overflow: visible;
    font-weight: normal;
    font-size: 12px;
}

.filter_details_wrapper > ul > li.search-preset-wrapper > ul {
    max-height: 500px;
    overflow-y: auto;
    overflow-x: hidden;
}

.filter_details_wrapper > ul > li.search-preset-wrapper > a.btn {
    padding: 4px 12px 2px 12px;
    background: none;
}

.filter_details_wrapper > ul > li.search-preset-wrapper:hover {
    background-color: rgb(230, 230, 230);
}

.filter_details_wrapper > ul > li.search-preset-wrapper > ul > li > span {
    padding: 3px 20px;
}

.filter_details_wrapper > ul > li.search-preset-wrapper > ul > li > span > input,
.filter_details_wrapper > ul > li.search-preset-wrapper > ul > li > span > select {
    width: 150px;
    border-top-right-radius: 0px;
    border-bottom-right-radius: 0px;
    margin-bottom: 10px;
}
.filter_details_wrapper > ul > li.search-preset-wrapper > ul > li > span > select {
    height: 20px;
    box-sizing: content-box;
}

.filter_details_wrapper > ul > li.search-preset-wrapper > ul > li > span > button {
    margin-bottom: 10px;
    border-top-left-radius: 0;
    border-bottom-left-radius: 0;
    height: 30px;
}

.filter_details_wrapper > ul > li.search-preset-wrapper > ul > li > span > button > img {
    height: 15px;
    width: 15px;
}

/*--------------------------------------------------------------
3.0 Pagination
--------------------------------------------------------------*/

.pagination {
    flex-grow: 5;
}

.pagination ul > li:nth-last-child(1) > a {
    border-top-right-radius: 0;
    border-bottom-right-radius: 0;
}

.pagination-wrapper {
    display: flex !important;
}

.pagination-wrapper > div:last-child {
    margin-left: auto;
    margin-right: 0px;
    position: relative;
}

.pagination-wrapper > div:first-child:last-child {
    margin-left: auto;
    margin-right: 0px;
}

.pagination-wrapper > div:last-child > a {
    border-radius: 0px 4px 4px 0px;
    margin-top: 5px;
    border: 1px solid #ddd;
    border-left: none;
    height: 20px;
    background: #fff;
}

.pagination-wrapper > div:last-child > a:hover {
    background: #e6e6e6;
}

.pagination-wrapper > div:first-child:last-child > a {
    border-radius: 4px;
    border-left: 1px solid #ddd;
}

.pagination-wrapper > div:last-child > ul {
    top: inherit;
}

.pagination-wrapper > div:last-child > ul li.action_menu_header {
    white-space: nowrap;
    padding-right: 10px;
}

.view-footer .pagination-wrapper .dropdown-menu {
    top: auto;
    bottom: 100%;
}