/*
  base.css
  Structural styles for Collectyx. Colours, shadows, and decorative effects
  (e.g. matrix's glow/scanline) are theme-specific, defined as CSS custom
  properties in the active theme file (css/themes/*.css). Typography and
  spacing that's Collectyx-specific but shared across all themes (font
  stack, letter-spacing, border-radius scale, nav-gap) lives in
  css/custom.css instead — switching themes changes color and decoration
  only, never layout or type. --font-mono is the one exception, kept
  per-theme (message area only) by deliberate choice.
*/

/* ── Reset ─────────────────────────────────────────────────────────────────── */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* ── Body ───────────────────────────────────────────────────────────────────── */

body {
    font-family: var(--font-body);
    font-weight: 400;
    background: var(--bg-color);
    height: 100vh;
    color: var(--text-color);
    position: relative;
    overflow: hidden;
}

/* Matrix scanline overlay — rendered only when theme sets the variable */
body::before {
    content: var(--body-before-content, none);
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: var(--body-before-bg, none);
    pointer-events: none;
    z-index: -1;
}

/* ── Message area ───────────────────────────────────────────────────────────── */

.message-area {
    background: var(--color-message-bg);
    color: var(--color-message-text);
    border-radius: var(--border-radius-sm);
    padding: 2px 10px;
    margin-bottom: 10px;
    min-height: 1.4em;
    border-left: 3px solid var(--secondary-color);
    font-family: var(--font-mono);
    font-size: 0.9em;
    text-shadow: var(--text-shadow-subtle, none);
    box-shadow: var(--shadow-message, none);
    position: sticky;
    top: 0;
    z-index: 90;
}

/* ── Views ──────────────────────────────────────────────────────────────────── */

.view {
    display: none;
    background: var(--card-bg);
    border-radius: var(--border-radius-lg);
    padding: 0 40px;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-surface, none);
}

.view.active {
    display: block;
}

/* Applied to the four views (Books Read, To Be Read, My Library, Tags)
   whose header chrome must stay fixed while their list scrolls. Each
   view's own header/list split (collection-view.css, tags.css) marks
   its fixed pieces flex-shrink:0 and its list flex:1 — this rule just
   turns the view itself into the flex column that makes that possible,
   sized by flex:1 against .main-content's own flex column rather than a
   guessed height. Dashboard/Statistics are untouched — plain
   .view.active block layout, same as before. */
.view.view-scroll-locked.active {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-height: 0;
    overflow: hidden;
}

.view-placeholder-note {
    color: var(--text-secondary);
    font-size: 0.9em;
    margin-top: 8px;
}

/* ── Forms ──────────────────────────────────────────────────────────────────── */

.form-group {
    margin-bottom: 30px;
    display: flex;
    align-items: center;
    gap: 15px;
}

.form-group label {
    display: block;
    margin-bottom: 0;
    font-weight: 500;
    color: var(--color-label);
    font-size: 0.9em;
    text-transform: uppercase;
    letter-spacing: var(--label-letter-spacing, 0.5px);
    min-width: 7em;
    flex-shrink: 0;
    text-shadow: var(--text-shadow-subtle, none);
}

.form-group input,
.form-group select,
.form-group textarea {
    flex: 1;
    padding: 8px 4px;
    border: none;
    border-bottom: var(--input-border-bottom);
    border-radius: 0;
    font-size: 0.9em;
    transition: border-color 0.3s ease;
    background: var(--input-bg);
    color: var(--text-color);
    font-family: var(--font-ui);
    font-weight: 400;
    text-shadow: var(--text-shadow-subtle, none);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-bottom-color: var(--primary-color);
    box-shadow: 0 0 0 3px var(--focus-ring, transparent), var(--shadow-focus, none);
}

.form-group textarea {
    min-height: 100px;
    resize: vertical;
    border: 1px solid var(--border-color);
    padding: 16px;
    border-radius: var(--border-radius-sm);
}

.form-group textarea:focus {
    border-color: var(--primary-color);
}

.form-row {
    display: flex;
    gap: 1.0em;
}

.form-row .form-group {
    flex: 1;
    margin-bottom: 2.5em;
}

.form-buttons {
    margin-top: 20px;
    padding-bottom: 10px;
}

/* ── Buttons ────────────────────────────────────────────────────────────────── */

.btn {
    padding: 10px 20px;
    border: var(--btn-border);
    border-radius: var(--border-radius-sm);
    cursor: pointer;
    font-weight: 500;
    transition: all 0.3s ease;
    margin-right: 10px;
    background: var(--color-btn-bg);
    color: var(--color-btn-text);
    text-transform: uppercase;
    letter-spacing: var(--btn-letter-spacing, 0.5px);
    font-size: 0.9em;
    font-family: var(--font-ui);
}

.btn:hover {
    background: var(--color-btn-hover-bg);
    color: var(--color-btn-hover-text);
    box-shadow: var(--shadow-btn-hover, none);
    text-shadow: var(--text-shadow-btn-hover, none);
}

.btn-primary {
    background: var(--color-btn-primary-bg);
    color: var(--color-btn-primary-text);
    border: var(--btn-primary-border);
}

.btn-primary:hover {
    background: var(--color-btn-primary-hover-bg);
    color: var(--color-btn-primary-hover-text);
}

.btn-secondary {
    background: var(--color-btn-secondary-bg);
    color: var(--color-btn-secondary-text);
    border: var(--btn-secondary-border);
}

.btn-secondary:hover {
    background: var(--color-btn-secondary-hover-bg);
    color: var(--color-btn-secondary-hover-text);
}

.btn-danger {
    background: var(--error-color);
    color: var(--color-danger-text);
    border: 2px solid var(--error-color);
}

.btn-danger:hover {
    background: var(--error-hover);
    border-color: var(--error-hover);
    box-shadow: var(--shadow-danger-hover, none);
}

.btn-confirm {
    animation: confirmPulse 0.6s ease-in-out;
}

@keyframes confirmPulse {
    0%   { transform: scale(1); }
    50%  { transform: scale(1.05); }
    100% { transform: scale(1); }
}

.btn:disabled {
    opacity: 0.35;
    cursor: not-allowed;
    pointer-events: none;
    box-shadow: none;
    text-shadow: none;
}

.btn-small {
    padding: 4px 8px;
    font-size: 0.8em;
    min-width: auto;
}

.btn-header {
    padding: 4px 8px;
    font-size: 0.9em;
    vertical-align: middle;
}

.file-input {
    display: none;
}

/* ── Tables ─────────────────────────────────────────────────────────────────── */

.table-container {
    overflow-x: auto;
    margin-top: 10px;
    border-radius: var(--border-radius-lg);
}

/* My Library column widths */
#myLibraryHeaderTable,
#myLibraryTable {
    table-layout: fixed;
    width: 100%;
}

#myLibraryHeaderTable th:nth-child(1),
#myLibraryTable th:nth-child(1),
#myLibraryTable td:nth-child(1) { width: 18em; }

#myLibraryHeaderTable th:nth-child(2),
#myLibraryTable th:nth-child(2),
#myLibraryTable td:nth-child(2) { width: 15em; }

#myLibraryHeaderTable th:nth-child(3),
#myLibraryTable th:nth-child(3),
#myLibraryTable td:nth-child(3) { width: 11em; }

#myLibraryHeaderTable th:nth-child(4),
#myLibraryTable th:nth-child(4),
#myLibraryTable td:nth-child(4) { width: 10em; }

#myLibraryHeaderTable th:nth-child(5),
#myLibraryTable th:nth-child(5),
#myLibraryTable td:nth-child(5) { width: 13em; }

/* Books Read column widths */
#booksHeaderTable,
#booksTable {
    table-layout: fixed;
    width: 100%;
}

#booksHeaderTable th:nth-child(1),
#booksTable th:nth-child(1),
#booksTable td:nth-child(1) { width: 10em; }

#booksHeaderTable th:nth-child(2),
#booksTable th:nth-child(2),
#booksTable td:nth-child(2) { width: 13.5em; }

#booksHeaderTable th:nth-child(3),
#booksTable th:nth-child(3),
#booksTable td:nth-child(3) { width: 14em; }

#booksHeaderTable th:nth-child(4),
#booksTable th:nth-child(4),
#booksTable td:nth-child(4) { width: 5em; }

#booksHeaderTable th:nth-child(5),
#booksTable th:nth-child(5),
#booksTable td:nth-child(5) { width: 12em; }

#booksHeaderTable th:nth-child(6),
#booksTable th:nth-child(6),
#booksTable td:nth-child(6) { width: 9em; }

.data-table {
    table-layout: fixed;
    width: 100%;
    border-collapse: collapse;
    border: var(--table-border, none);
    background: var(--card-bg);
    box-shadow: var(--shadow-table, none);
}

.data-table th {
    background: var(--color-table-header-bg);
    padding: 10px 14px;
    text-align: left;
    border-bottom: 2px solid var(--border-color);
    border: var(--table-th-border, none);
    cursor: pointer;
    position: relative;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: var(--label-letter-spacing, 0.5px);
    color: var(--text-color);
    font-size: 0.9em;
    text-shadow: var(--text-shadow-subtle, none);
}

.data-table th:hover {
    background: var(--color-table-header-hover);
}

.data-table td {
    padding: 6px 14px;
    border-bottom: 1px solid var(--border-color-light);
    border: var(--table-td-border, none);
    color: var(--text-color);
    font-weight: 400;
    font-size: 0.9em;
    text-shadow: var(--text-shadow-subtle, none);
}

.data-table tr:hover {
    background: var(--color-table-row-hover);
    cursor: pointer;
}

/* ── Specific form field sizing ─────────────────────────────────────────────── */

#comments, #editComments {
    font-size: 1.1em;
}

#finished, #editFinished {
    font-size: 0.9em;
    padding: 12px 0;
    max-width: 10em;
}

#pages, #category, #recommend,
#editPages, #editCategory, #editRecommend {
    max-width: 10em;
}

/* ── Filter panel ───────────────────────────────────────────────────────────── */

.filter-panel {
    background: var(--color-bg-raised);
    border-radius: var(--border-radius-sm);
    padding: 30px;
    margin-bottom: 30px;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-panel, none);
}

.filter-panel h3 {
    font-weight: 500;
    margin-bottom: 20px;
    text-transform: uppercase;
    letter-spacing: var(--label-letter-spacing, 0.5px);
    font-size: 1.1em;
    color: var(--primary-color);
    text-shadow: var(--text-shadow-subtle, none);
}

.filter-row {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 20px;
}

.filter-field,
.filter-operator,
.filter-value-input,
.filter-value select.filter-value-input {
    font-size: 0.9em;
}

.filter-field  { min-width: 10em; }
.filter-operator { min-width: 8em; }
.filter-value  { flex: 1; }

.filter-value-input {
    background: var(--input-bg) !important;
    color: var(--text-color) !important;
    border: none !important;
    border-bottom: var(--input-border-bottom) !important;
    border-radius: 0 !important;
    padding: 16px 0 !important;
    text-shadow: var(--text-shadow-subtle, none) !important;
}

.filter-value-input:focus {
    border-bottom-color: var(--primary-color) !important;
    box-shadow: 0 0 0 3px var(--focus-ring, transparent), var(--shadow-focus, none) !important;
}

/* ── Sort dropdown ──────────────────────────────────────────────────────────── */

.sort-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    background: var(--color-bg-raised);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-sm);
    box-shadow: var(--shadow-dropdown);
    z-index: 1000;
    min-width: 180px;
}

.sort-option {
    padding: 12px;
    cursor: pointer;
    transition: background 0.2s;
    color: var(--text-color);
    font-weight: 400;
    text-shadow: var(--text-shadow-subtle, none);
}

.sort-option:hover {
    background: var(--color-nav-hover-bg);
    color: var(--color-nav-hover-text);
}

.sort-indicator {
    font-size: 0.8em;
    margin-left: 5px;
    color: inherit;
}

.sort-indicator.active { opacity: 1; }

.sort-indicator .sort-up,
.sort-indicator .sort-down {
    display: inline-block;
    line-height: 0.5;
}

.sort-indicator .sort-up { margin-right: 1px; }

/* ── Search ─────────────────────────────────────────────────────────────────── */

.search-icon {
    cursor: pointer;
    margin-left: 10px;
    padding: 4px 8px;
    border-radius: var(--border-radius-sm);
    font-size: 16px;
    display: inline-block;
    vertical-align: middle;
    color: var(--text-secondary);
    text-shadow: var(--text-shadow-subtle, none);
    transition: all 0.2s;
}

.search-icon:hover {
    background: var(--color-bg-raised);
    color: var(--primary-color);
    text-shadow: var(--text-shadow-accent, none);
}

.quick-search {
    margin-bottom: 20px;
}

.quick-search input {
    width: 100%;
    padding: 12px;
    font-size: 1.1em;
    border: 1px solid var(--border-color-light);
    background: transparent;
    color: inherit;
    border-radius: 0;
}

.quick-search input:focus {
    outline: none;
    border-color: var(--primary-color);
}

/* ── Group header ───────────────────────────────────────────────────────────── */

.group-header {
    background: var(--color-table-header-bg);
    font-weight: 500;
    padding: 16px 12px;
    text-transform: uppercase;
    letter-spacing: var(--label-letter-spacing, 0.5px);
    font-size: 12px;
    border-top: 2px solid var(--secondary-color);
    border-bottom: 1px solid var(--border-color);
    color: var(--primary-color);
    text-shadow: var(--text-shadow-subtle, none);
}

/* ── Modal ──────────────────────────────────────────────────────────────────── */

.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--color-modal-overlay);
    z-index: 2000;
}

.modal-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: var(--card-bg);
    border-radius: var(--border-radius-lg);
    padding: 30px;
    max-width: 500px;
    width: 90%;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-modal);
}

#readingListEditModal .modal-content {
    max-width: 650px;
}

#myLibraryAddModal .modal-content,
#myLibraryEditModal .modal-content {
    max-width: 650px;
}

/* Direct-child selector deliberately excludes restoreScreen1Modal/
   restoreScreen2Modal, whose h3 sits inside a flex header row rather than
   as a direct child of .modal-content — their inline margin:0 is a
   different layout, not an exception to override. */
.modal-content > h3 {
    margin-bottom: 30px;
}

/* ── Date range ─────────────────────────────────────────────────────────────── */

.date-range {
    display: flex;
    gap: 10px;
    align-items: center;
}

.date-range input { flex: 1; }

.date-range span {
    color: var(--text-color);
    font-weight: 400;
}

/* ── h2 headings ────────────────────────────────────────────────────────────── */

h2 {
    font-weight: 500;
    margin-bottom: 30px;
    text-transform: uppercase;
    letter-spacing: var(--label-letter-spacing, 0.5px);
    font-size: 1.2em;
    color: var(--primary-color);
    text-shadow: var(--text-shadow-subtle, none);
}

/* ── Select dropdowns ───────────────────────────────────────────────────────── */

select {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    background-color: transparent;
    background-image: var(--select-arrow-svg);
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 16px;
    padding-right: 40px;
    color: var(--text-color);
}

select option {
    background-color: var(--color-option-bg);
    color: var(--text-color);
    padding: 8px;
}

select option:checked,
select option:hover {
    background-color: var(--color-nav-hover-bg);
    color: var(--color-nav-hover-text);
}

.filter-field option,
.filter-operator option,
.filter-value-input option {
    background-color: var(--color-option-bg);
    color: var(--text-color);
    padding: 8px;
}

/* ── Statistics ─────────────────────────────────────────────────────────────── */

.stats-section {
    margin-bottom: 40px;
}

.stats-section h3 {
    margin-bottom: 20px;
    font-size: 1.2em;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.stats-section h4 {
    margin-bottom: 15px;
    font-size: 1.0em;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.stats-grid {
    display: flex;
    gap: 40px;
    margin-bottom: 30px;
}

.stat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.stat-value {
    font-size: 2.0em;
    font-weight: 400;
    line-height: 1;
    color: var(--primary-color);
    text-shadow: var(--text-shadow-subtle, none);
}

.stat-label {
    font-size: 0.9em;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-top: 5px;
    color: var(--text-color);
    text-shadow: var(--text-shadow-subtle, none);
}

.category-stats,
.yearly-stats {
    margin-top: 30px;
}

canvas {
    max-width: 100%;
    height: auto;
}

/* ── Export ─────────────────────────────────────────────────────────────────── */

.export-options {
    display: grid;
    gap: 1.5rem;
    margin-top: 2rem;
}

.export-item {
    padding: 1.5rem;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-sm);
    background: var(--color-bg-raised);
    transition: all 0.3s ease;
    position: relative;
}

.export-item::before {
    content: "";
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: var(--export-item-hover-overlay, transparent);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.export-item:hover::before { opacity: 1; }

.export-item:hover {
    background: var(--card-hover, var(--color-bg-raised));
    border-color: var(--secondary-color);
    box-shadow: var(--shadow-export-hover, none);
    text-shadow: var(--text-shadow-subtle, none);
}

.export-item h3 {
    margin-top: 0;
    margin-bottom: 0.5rem;
    color: var(--primary-color);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: var(--label-letter-spacing, 0.5px);
    font-size: 1.0em;
    text-shadow: var(--text-shadow-subtle, none);
}

.export-item p {
    margin-bottom: 1rem;
    color: var(--text-color);
    opacity: 0.9;
    line-height: 1.6;
    font-size: 0.9em;
    font-family: var(--font-mono);
}

.export-item .btn {
    min-width: 150px;
    font-family: var(--font-ui);
}

.export-dropdown {
    position: relative;
    display: inline-block;
    margin-left: 10px;
    vertical-align: middle;
}

.export-btn {
    background-color: var(--secondary-color);
    color: var(--color-nav-hover-text);
    padding: 4px 8px;
    font-size: 14px;
    border: 1px solid var(--secondary-color);
    cursor: pointer;
    border-radius: var(--border-radius-sm);
    vertical-align: middle;
    font-family: var(--font-ui);
    text-transform: uppercase;
    transition: all 0.3s ease;
    text-shadow: var(--text-shadow-subtle, none);
}

.export-btn:hover {
    background: var(--primary-color);
    box-shadow: var(--shadow-interactive, none);
}

.export-dropdown-content {
    display: none;
    position: absolute;
    right: 0;
    top: 100%;
    background-color: var(--color-bg-raised);
    min-width: 160px;
    box-shadow: var(--shadow-dropdown);
    z-index: 1000;
    border-radius: var(--border-radius-sm);
    border: 1px solid var(--border-color);
    margin-top: 2px;
}

.export-dropdown-content button {
    all: unset;
    box-sizing: border-box;
    width: 100%;
    color: var(--text-color);
    padding: 8px 12px;
    display: block;
    font-size: 14px;
    white-space: nowrap;
    font-family: var(--font-ui);
    text-shadow: var(--text-shadow-subtle, none);
    transition: all 0.2s;
    border-bottom: 1px solid var(--border-color-light);
    cursor: pointer;
}

.export-dropdown-content button:last-child {
    border-bottom: none;
}

.export-dropdown-content button:hover {
    background: var(--color-nav-hover-bg);
    color: var(--color-nav-hover-text);
    text-shadow: var(--text-shadow-accent, none);
}

.export-dropdown.show .export-dropdown-content {
    display: block;
}

/* ── Placeholder / empty states ─────────────────────────────────────────────── */

.placeholder-content {
    text-align: center;
    padding: 40px 20px;
    color: var(--text-secondary);
    opacity: 0.8;
}

.placeholder-content p {
    margin-bottom: 10px;
    font-size: 1.0em;
    text-shadow: var(--text-shadow-subtle, none);
}

/* ── Reading list ───────────────────────────────────────────────────────────── */

.reading-list-container {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.add-book-section {
    background: var(--color-bg-raised);
    border-radius: var(--border-radius-lg);
    padding: 20px;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-card, none);
}

.add-book-section h3 {
    margin-bottom: 20px;
    color: var(--primary-color);
    text-shadow: var(--text-shadow-subtle, none);
}

.reading-list-display { flex: 1; }

.reading-list-items {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.reading-list-item {
    background: var(--color-bg-raised);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-sm);
    padding: 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: var(--shadow-list-item, none);
}

.book-info {
    display: flex;
    align-items: center;
    gap: 15px;
    flex: 1;
}

.book-rank {
    font-weight: 500;
    color: var(--primary-color);
    min-width: 60px;
    text-align: center;
    font-size: 0.9em;
    text-shadow: var(--text-shadow-subtle, none);
}

.book-details { flex: 1; }

.book-title {
    font-weight: 500;
    color: var(--text-color);
    margin-bottom: 4px;
    text-shadow: var(--text-shadow-subtle, none);
}

.book-author {
    color: var(--text-secondary);
    font-size: 0.9em;
    margin-bottom: 2px;
    text-shadow: var(--text-shadow-subtle, none);
}

.book-source {
    color: var(--color-text-muted);
    font-size: 0.8em;
    text-shadow: var(--text-shadow-subtle, none);
}

.book-controls {
    display: flex;
    gap: 5px;
}

/* ── Drag handles ───────────────────────────────────────────────────────────── */

.drag-handle {
    cursor: grab;
    color: var(--text-secondary);
    font-weight: bold;
    padding: 0 5px;
    user-select: none;
    text-shadow: var(--text-shadow-subtle, none);
}

.drag-handle:hover {
    color: var(--primary-color);
    text-shadow: var(--text-shadow-accent, none);
}

.reading-list-item[draggable="true"]:hover {
    background: var(--color-table-row-hover);
}

.reading-list-item.drag-over {
    border-top: 2px solid var(--primary-color);
    background: var(--color-drag-over-bg);
    box-shadow: var(--shadow-drag-over, none);
}

.reading-list-item:active .drag-handle { cursor: grabbing; }

/* ── Checked-out items ──────────────────────────────────────────────────────── */

.reading-list-item.checked-out-item {
    background: var(--color-checked-out-bg);
    border-left: 4px solid var(--primary-color);
    box-shadow: var(--shadow-checked-out, none);
}

.reading-list-item.checked-out-item .book-title {
    color: var(--primary-color);
    font-weight: 600;
    text-shadow: var(--text-shadow-accent, none);
}

.reading-list-item.checked-out-item .book-source {
    color: var(--primary-color);
    font-weight: 500;
    text-shadow: var(--text-shadow-subtle, none);
}

/* ── My Library fixed header ────────────────────────────────────────────────── */

.my-library-fixed-header {
    position: sticky;
    top: 0;
    background: var(--color-sticky-header-bg);
    z-index: 100;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--border-color);
    margin-bottom: 0;
}

.my-library-table-header {
    background: var(--color-sticky-header-bg);
    border-bottom: 2px solid var(--border-color);
}

.my-library-table-header table {
    margin-bottom: 0;
    border-bottom: none;
}

.my-library-scrollable-content {
    max-height: 60vh;
    overflow-y: auto;
    border: 1px solid var(--border-color);
    border-top: none;
}

.my-library-scrollable-content table {
    margin-top: 0;
    border-top: none;
}

.my-library-scrollable-content table thead { display: none; }

/* ── Books Read fixed header ────────────────────────────────────────────────── */

.books-read-fixed-header {
    position: sticky;
    top: 0;
    background: var(--color-sticky-header-bg);
    z-index: 100;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--border-color);
    margin-bottom: 0;
}

.books-read-table-header {
    background: var(--color-sticky-header-bg);
    border-bottom: 2px solid var(--border-color);
}

.books-read-table-header table {
    margin-bottom: 0;
    border-bottom: none;
}

.books-read-scrollable-content {
    max-height: 60vh;
    overflow-y: auto;
    border: 1px solid var(--border-color);
    border-top: none;
}

.books-read-scrollable-content table {
    margin-top: 0;
    border-top: none;
}

.books-read-scrollable-content table thead { display: none; }

