/* Small compatibility fixes for the rebuilt member site. */

/* Notice/category tables: keep body rows readable even if legacy styles apply dark backgrounds. */
table.post-list tbody tr,
table.post-list tbody td {
    background: #fff;
    color: #333;
}

table.post-list tbody td a {
    color: #005aa8;
}

table.post-list tbody tr:hover,
table.post-list tbody tr:hover td {
    background: #fff9dc;
}

/* Rebuilt library admin pages. */
.library-admin-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 0 0 18px;
}

.library-admin-actions a {
    display: inline-block;
    padding: 7px 12px;
    border: 1px solid #2c5170;
    background: #fff;
    color: #174669;
    text-decoration: none;
}

.library-admin-actions a:hover {
    background: #eef6fb;
}

.table-scroll {
    width: 100%;
    overflow-x: auto;
}

table.file-list,
table.library-category-table {
    width: 100%;
    border-collapse: collapse;
}

table.file-list th,
table.file-list td,
table.library-category-table th,
table.library-category-table td {
    padding: 8px;
    border: 1px solid #bbb;
    vertical-align: top;
}

table.file-list th,
table.library-category-table th {
    background: #2c5170;
    color: #fff;
}

table.file-list td,
table.library-category-table td {
    background: #fff;
    color: #333;
}

.library-admin-operations {
    white-space: nowrap;
}

.inline-form {
    display: inline;
    margin: 0;
}

.inline-form button {
    margin-left: 5px;
}

.inline-form button[disabled] {
    opacity: .45;
    cursor: not-allowed;
}

.library-admin-form {
    max-width: 780px;
}

.library-admin-form .form-group {
    margin-bottom: 15px;
}

.library-admin-form label {
    display: block;
    margin-bottom: 5px;
    font-weight: 700;
}

.library-admin-form input[type="text"],
.library-admin-form input[type="url"],
.library-admin-form input[type="file"],
.library-admin-form select,
.library-admin-form textarea {
    box-sizing: border-box;
    width: 100%;
    max-width: 100%;
    padding: 7px;
}

.library-admin-form small {
    display: block;
    margin-top: 4px;
    color: #666;
    line-height: 1.5;
}

.library-admin-form .required {
    color: #c00;
    font-size: 12px;
}

.admin-message,
.admin-success,
.admin-error {
    padding: 10px 12px;
    margin: 0 0 16px;
    border: 1px solid #bbb;
    background: #fffceb;
}

.admin-success {
    border-color: #82aa82;
    background: #f1fff1;
    color: #245f24;
}

.admin-error {
    border-color: #c66;
    background: #fff2f2;
    color: #900;
}

.link-button {
    padding: 0;
    border: 0;
    background: transparent;
    color: #005aa8;
    font: inherit;
    text-decoration: underline;
    cursor: pointer;
}

.danger-link {
    color: #a00000;
}

@media (max-width: 700px) {
    .library-admin-actions {
        display: block;
    }

    .library-admin-actions a {
        display: block;
        margin-bottom: 6px;
    }
}
