/* Bookshelf CSS styles */

.bookshelf-container {
    text-align: center;
}

.bookshelf-container h1 {
    color: #333;
    margin-bottom: 20px;
}

/* Tag index */
.tag-index {
    margin-bottom: 20px;
}
.tag-list {
    list-style: none;
    padding: 0;
    margin: 10px 0 0 0;
    display: flex;
    flex-wrap: wrap;
    gap: 8px 12px;
    justify-content: center;
}
.tag-list li { margin: 0; padding: 0; }
.tag, .tag:link, .tag:visited {
    display: inline-block;
    padding: 4px 10px;
    background: var(--color-accent);
    color: var(--color-text);
    text-decoration: none;
    border-radius: 999px;
    font-size: 0.9rem;
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: background-color 0.2s, color 0.2s, border-color 0.2s;
}
.tag:hover {
    background: var(--color-background);
    border-color: rgba(255, 255, 255, 0.4);
}
.tag.active {
    background: var(--color-text);
    color: var(--color-accent);
    border-color: transparent;
    cursor: default;
}
.tag-hint { margin-top: 8px; }

.book-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.book-list li {
    margin: 10px 0;
}

.book-list a {
    color: #333;
    text-decoration: none;
    font-weight: bold;
}

.book-list a:hover {
    text-decoration: underline;
}

.bookshelf-container form {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-top: 20px;
}

.bookshelf-container input[type="text"] {
    padding: 8px;
    margin-bottom: 10px;
    border: 1px solid #ccc;
    border-radius: 5px;
}

/* Ensure Unlock and Back buttons are similar in size on these pages */
.bookshelf-container .btn {
    min-width: 160px;
    text-align: center;
}

/* Constrain images within post content to text width */
.post-content {
    text-align: left;
    margin-top: 20px;
}
.post-content img {
    max-width: 100%;
    height: auto;
    display: block;
    margin: 1em auto;
}
.post-content iframe, .post-content video {
    max-width: 100%;
}

.error {
    color: #b22222;
}

.pdf-viewer {
    margin-top: 20px;
    text-align: left;
}

.pdf-viewer iframe {
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 4px;
    background: #fff;
}

.pdf-download {
    margin-top: 10px;
}

.pdf-download a {
    color: var(--color-accent);
}
