.content-panel {
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;
    padding-left: 30px;
    padding-right: 30px;
}

.status-message {
    width: fit-content;
    height: fit-content;
    margin: 20px 20px -10px 20px;
    padding: 10px;
    font: 400 16px Arial;
    font-style: italic;
    text-align: center;
    border-radius: 5px;
    box-shadow: 0 0 3px 1px rgba(0, 0, 0, 0.5);
}

.status-message.success {
    background-color: rgb(14, 118, 14);
}

.status-message.error {
    background-color: rgb(120, 27, 27);
}

.library-nav-header {
    background-color: var(--golden);
    border: 1px solid black;
    border-radius: 5px;
    margin: 10px;
    padding: 3px;
    box-sizing: border-box;
    box-shadow: 0 0 3px 1px rgba(0, 0, 0, 0.5);
    width: 100%;
    height: fit-content;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 10px;
    container-type: inline-size;
    container-name: LibraryNavHeader;
}

.library-nav-button {
    flex: 1;
    height: 35px;
    background-color: var(--golden);
    border: none;
    border-radius: 5px;
    box-shadow: 0 0 2px 1px rgba(0, 0, 0, 0.5);
    cursor: pointer;
    font-size: clamp(13px, calc(1.8vw), 17px);
}

.library-nav-button.selected {
    background-color: var(--bronze);
    box-shadow: inset 0 0 2px 1px rgba(0, 0, 0, 0.5);
}

/* Wrap to a second row for narrow screens */
@container LibraryNavHeader (max-width: 500px) {
    .library-nav-button {
        flex: 1 1 calc(33% - 10px);
        font-size: clamp(12px, calc(2vw + 4px), 17px);
    }
}

.tab {
    /* border: 1px solid black; */
    width: 100%;
    height: fit-content;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;
}

.table-caption {
    margin: 10px;
    font-size: 18px;
}

.all-media-table-container {
    width: 100%;
    height: fit-content;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    border: 1px solid black;
    border-radius: 5px;
    background-color: var(--golden);
    scrollbar-width: auto; /* override the default thinness of all page scrollbars */
    scrollbar-color: var(--bronze) var(--golden);
    clip-path: inset(0px round 5px) !important;
    padding-bottom: 5px;
}

.all-media-table {
    background-color: var(--golden);
    width: 100%;
    height: fit-content;
    font-size: clamp(10px, calc(2.4cqw + 1.6px), 16px);
    display: grid;
    grid-template-columns:
        minmax(200px, 3fr)
        minmax(150px, 1fr)
        fit-content(200px)
        fit-content(200px)
        fit-content(200px);
}

.all-media-table thead,
.all-media-table tbody,
.all-media-table tr {
    display: contents;
}

.all-media-table th,
.all-media-table td {
    border-bottom: 1px solid black;
    border-right: 1px solid black;
    padding: 5px;
}

.all-media-table-header {
    border-bottom: 2px solid black;
}

.far-right-col {
    border-right: none !important;
}

.last-row {
    border-bottom: none !important;
}

.books-container {
    /* border: 1px solid black; */
    width: 100%;
    display: grid;
    gap: 16px;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 256px), 1fr));
    justify-content: center;
}

.book-card {
    border: 1px solid black;
    box-shadow: 1px 1px 5px 0 rgba(0, 0, 0, 0.5);
    border-radius: 8px;
    contain: content;
    overflow: hidden;
    padding: 0;
    height: fit-content;
    max-width: 350px;
    justify-self: center;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;
    background-color: var(--forrest);
    cursor: pointer;
    transition: transform 200ms ease-in-out;
}

.book-card:hover {
    transform: scale(1.02);
}

.book-cover {
    width: 102%;
    transform: translateY(-2px); /* fixes certain cover image scaling issues */
    aspect-ratio: 1 / 1;
    object-fit: contain;
    margin: 0;
}

.book-title {
    width: 90%;
    height: calc(2 * 1.2em);
    font-size: 20px;
    line-height: 1.2;
    text-align: center;
    margin-top: 5px;
    display: -webkit-box;
    line-clamp: 2;
    -webkit-line-clamp: 2; /* Max number of visible lines */
    -webkit-box-orient: vertical; /* Required for line-clamp to function */
    overflow: hidden; /* Hides text beyond line 2 */
    word-break: break-word; /* Ensures clean word breaking for long words */
    text-overflow: ellipsis; /* Appends an ellipsis if the text is too long */
}

.book-author {
    width: 90%;
    font-size: 20px;
    text-align: center;
    margin-bottom: 5px;
}