/* Literature search result links */
.literature-result-link {
    display: inline-block;
    margin: 4px 0 8px;
    color: #636466 !important;
    font-size: 13px;
    text-decoration: underline;
}

.literature-result-link:hover {
    color: #14a669 !important;
}

.literature-preview-header {
    margin: 0 0 18px;
    padding: 12px 0 14px;
    border-bottom: 1px solid #e4e8e6;
}

.literature-preview-book {
    display: block;
    color: #14a669 !important;
    font-size: 18px;
    font-weight: 500;
    line-height: 1.3;
}

.literature-preview-book:hover {
    text-decoration: underline;
}

.literature-preview-chapter {
    display: block;
    margin-top: 4px;
    color: #7c7d80;
    font-size: 14px;
}

.literature-preview-empty-link {
    color: #14a669 !important;
    text-decoration: underline;
}
.literature-filter-actions {
    clear: both;
    padding: 10px 15px 14px;
    text-align: right;
}

.literature-reset-filters {
    min-height: 34px;
    padding: 7px 14px;
    border: 0;
    border-radius: 3px;
    font-size: 13px;
    font-weight: 500;
}

.literature-reset-filters:hover,
.literature-reset-filters:focus {
    color: #fff;
    text-decoration: none;
    filter: brightness(0.95);
}

/* Literature filter layout fixes */
#booksOrderBy ul.icons {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: nowrap;
    gap: 8px;
    margin-bottom: 0;
}

#booksOrderBy .icons li {
    flex: 0 0 auto;
}

#booksOrderBy .literature-filter-actions {
    clear: none;
    display: inline-flex;
    margin-left: 4px;
    padding: 0;
    text-align: left;
}

.literature-reset-filters {
    min-height: 30px;
    padding: 5px 10px;
    white-space: nowrap;
}

.lit-filter-query .col-md-6.col-xxs-11 > .row {
    display: flex;
    flex-wrap: nowrap;
    margin-left: 0;
    margin-right: 0;
}

.lit-filter-query .icon-block {
    display: flex !important;
    float: none;
    align-items: center;
    justify-content: center;
    width: 33.333333% !important;
    min-width: 0;
    height: 62px;
    padding-left: 3px;
    padding-right: 3px;
}

.lit-filter-query .icon-block .cell:first-child {
    display: inline-flex;
    flex: 0 0 auto;
    align-items: center;
    justify-content: center;
    width: 22px;
    font-size: 18px;
}

.lit-filter-query .icon-block .cell:last-child {
    display: inline-flex;
    align-items: center;
    width: auto;
    min-width: 0;
    padding: 0 2px;
    white-space: nowrap;
    font-size: 13px;
    line-height: 1.15;
}

.lit-filter-query .icon-block i {
    margin-right: 4px;
}

@media (max-width: 480px) {
    #booksOrderBy ul.icons {
        gap: 6px;
    }

    .literature-reset-filters {
        padding-left: 8px;
        padding-right: 8px;
        font-size: 12px;
    }

    .lit-filter-query .icon-block {
        height: 56px;
        padding-left: 1px;
        padding-right: 1px;
    }

    .lit-filter-query .icon-block .cell:first-child {
        width: 18px;
        font-size: 16px;
    }

    .lit-filter-query .icon-block .cell:last-child {
        font-size: 11px;
    }

    .lit-filter-query .icon-block i {
        margin-right: 2px;
    }
}

/* Compact first filter row */
.lit-filter-list > div {
    display: flex;
    flex-wrap: nowrap;
    align-items: stretch;
    width: 100%;
}

.lit-filter-list > div > .table {
    float: none;
    min-width: 0;
}

.lit-filter-list > div > .table:not(#booksOrderBy) {
    flex: 1 1 0;
    width: auto !important;
}

#booksOrderBy {
    flex: 0 0 168px;
    width: 168px !important;
}

#booksOrderBy ul.icons {
    gap: 6px;
}

#booksOrderBy .icons i {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 30px;
    height: 30px;
    font-size: 20px;
    line-height: 1;
}

#booksOrderBy #by_title {
    font-family: Arial, sans-serif;
    font-size: 13px;
    font-weight: 700;
}

#booksOrderBy br,
#booksOrderBy .sorterLabel {
    display: none !important;
}

.literature-reset-filters {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    min-width: 30px;
    height: 30px;
    min-height: 30px;
    padding: 0;
}

.literature-reset-filters i {
    min-width: 0 !important;
    height: auto !important;
    color: #fff !important;
    font-size: 15px !important;
}

@media (max-width: 767px) {
    .lit-filter-list .s14 {
        font-size: 12px;
        white-space: nowrap;
    }

    .lit-filter-list .dropdown--header {
        font-size: 14px;
    }

    #booksOrderBy {
        flex-basis: 142px;
        width: 142px !important;
    }

    #booksOrderBy .icons i,
    .literature-reset-filters {
        min-width: 26px;
        width: 26px;
        height: 26px;
    }

    #booksOrderBy .icons i {
        font-size: 17px;
    }

    #booksOrderBy #by_title {
        font-size: 11px;
    }
}

.literature-back-results {
    display: none;
    margin: 0 0 12px;
    padding: 8px 12px;
    border: 0;
    border-radius: 3px;
    background-color: #15b271;
    color: #fff;
    font-size: 13px;
    font-weight: 500;
}

.literature-back-results:hover,
.literature-back-results:focus {
    color: #fff;
    text-decoration: none;
    filter: brightness(0.95);
}

@media (max-width: 991px) {
    .literature-back-results {
        position: sticky;
        top: 0;
        z-index: 5;
        display: inline-block;
        margin-bottom: 12px;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
    }
}

@media (max-width: 991px) {
    .literaturegroup #sub-filter.active {
        display: block;
    }
}
