/* Truncates a books description if if spans more than 8 lines */
dd.meta_description {
    display: -webkit-box;
    -webkit-line-clamp: 15;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

body.admin h2 {
    font-size: 28px !important;
    font-weight: bold !important;
    margin-bottom: 30px !important;
}

/* Fix z-index issues with specific elements that show through modals */
body.modal-open .book-meta > .author > a:first-of-type:before,
body.modal-open div.tags > p > span.glyphicon.glyphicon-tags,
body.modal-open #remove-from-shelves + .identifiers,
body.modal-open #remove-from-shelves + .languages, 
body.modal-open #remove-from-shelves + .publishers,
body.modal-open #remove-from-shelves + .publishing-date,
body.modal-open #remove-from-shelves + .tags {
    z-index: -1 !important;
}
/* Dim and indicate globally disabled metadata providers in modal */
.provider-disabled {
  opacity: 0.6;
  cursor: not-allowed;
}
.provider-disabled .glyphicon-ok {
  display: none;
}

/* Target only specific selectpicker dropdowns (Tags and other form elements) */

/* #include_serie + .btn-group .dropdown-menu,
#exclude_serie + .btn-group .dropdown-menu,
#include_shelf + .btn-group .dropdown-menu,
#exclude_shelf + .btn-group .dropdown-menu,
#include_language + .btn-group .dropdown-menu,
#exclude_language + .btn-group .dropdown-menu,
#include_extension + .btn-group .dropdown-menu,
#exclude_extension + .btn-group .dropdown-menu, */
#include_tag + .btn-group .dropdown-menu,
#exclude_tag + .btn-group .dropdown-menu {
    max-width: 40vw;
}

/* Book format pills on the upper-right of book covers (non-interactive). */
.book > .cover {
    position: relative;
}

.book > .cover .cover-formats {
    position: absolute;
    top: 9px;
    right: 6px;
    z-index: 15;
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 3px;
    max-width: calc(100% - 12px);
    pointer-events: none;
    user-select: none;
    -webkit-user-select: none;
}

/* Leave room for the quick-delete button when present. */
.book > .cover.has-cover-delete .cover-formats,
.book > .cover:has(.cover-delete-btn) .cover-formats {
    right: 38px;
    max-width: calc(100% - 44px);
}

.book > .cover .cover-format-pill {
    display: inline-block;
    padding: 1px 6px;
    border-radius: 9px;
    background: rgba(19, 28, 36, 0.71);
    color: rgba(255, 255, 255, 0.9);
    font-size: 10px;
    font-weight: 600;
    line-height: 16px;
    letter-spacing: 0.02em;
    white-space: nowrap;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

@media (max-width: 767px) {
    .book > .cover .cover-formats {
        flex-direction: column;
        align-items: flex-end;
    }
}
