/* Legacy board presentation. Keep these rules isolated from page tables. */
.board-head-filter {
    min-height: 20px;
    margin: 0 0 7px;
    text-align: right;
    color: #777;
    font-size: 11px;
}
.board-head-filter img { margin: 0 3px 1px 8px; vertical-align: middle; }
.board-head-filter a { color: #777; }
.board-head-filter a.active { color: #326b95; font-weight: bold; }

.legacy-board-table {
    width: 100%;
    table-layout: fixed;
    border-collapse: separate;
    border-spacing: 0;
    border-top: 1px solid #e5e5e5;
    border-bottom: 1px solid #e5e5e5;
    font-size: 12px;
}
.legacy-board-table th {
    height: 32px;
    padding: 0 !important;
    border: 0 !important;
    background: #f6f6f6 url('/images/source/bg_board.gif') repeat-x left top !important;
    color: #555;
    font-weight: bold;
    text-align: center !important;
}
.legacy-board-table tbody:before { content: ''; display: block; height: 3px; }
.legacy-board-table td {
    height: 29px;
    padding: 0 4px !important;
    overflow: hidden;
    border: 0 !important;
    border-bottom: 1px dotted #d8d8d8 !important;
    background-color: transparent !important;
    color: #666;
    white-space: nowrap;
    text-overflow: ellipsis;
}
.legacy-board-table td:nth-child(2) { padding-left: 10px !important; }
.legacy-board-table a { color: #555; }
.legacy-board-table a:hover { color: #248ec6; text-decoration: underline; }

.legacy-board-search {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    margin: 13px 0 0;
    font-size: 11px;
}
.legacy-board-search .lance { height: 28px; border: 1px solid #bbb; font-size: 11px; }
.legacy-board-actions { display: flex; align-items: center; justify-content: flex-end; flex-wrap: wrap; gap: 5px; margin-top: 12px; min-height: 28px; }
.legacy-board-list-actions { margin-top: -28px; }
.legacy-board-actions form { display: inline-flex; margin: 0; }
.legacy-board-button {
    display: inline-flex;
    min-width: 48px;
    height: 28px;
    padding: 0 12px;
    align-items: center;
    justify-content: center;
    border: 1px solid #b9b9b9;
    border-radius: 3px;
    background: linear-gradient(#fff, #f3f3f3);
    color: #555 !important;
    font-size: 11px;
    font-weight: 400;
    line-height: 1;
    white-space: nowrap;
    text-decoration: none !important;
    cursor: pointer;
}
.legacy-board-button:hover,
.legacy-board-button:focus-visible { border-color: #7f9fbe; background: #f3f8fc; color: #2479b4 !important; }
.legacy-board-button-primary { border-color: #5e87ad; background: #7493b7; color: #fff !important; }
.legacy-board-button-primary:hover,
.legacy-board-button-primary:focus-visible { border-color: #486f94; background: #6284a9; color: #fff !important; }
.legacy-board-button-small { min-width: 38px; height: 24px; padding: 0 8px; font-size: 10px; }
.legacy-board-button-tall { height: 60px; }
.image-button { padding: 0; border: 0; background: transparent; cursor: pointer; }
.image-button img, .legacy-board-actions img { display: block; }

.legacy-board-show, .legacy-board-write {
    border-collapse: collapse;
    border-top: 2px solid #777;
    border-bottom: 1px solid #ddd;
    font-size: 12px;
}
.legacy-board-show th, .legacy-board-write th {
    border: 0 !important;
    border-bottom: 1px solid #e2e2e2 !important;
    background: #f7f7f7 !important;
    color: #555;
}
.legacy-board-show td, .legacy-board-write td {
    border: 0 !important;
    border-bottom: 1px solid #e2e2e2 !important;
}
.legacy-board-post-body {
    line-height: 1.5;
}
.legacy-board-post-body p {
    margin-top: 0;
    margin-bottom: .65em;
}
.legacy-album-grid {
    display: grid;
    grid-template-columns: repeat(3, 230px);
    gap: 20px 45px;
    padding: 10px 0 0;
}
.legacy-album-item {
    min-width: 0;
    padding-bottom: 20px;
    border-bottom: 1px dotted #ccc;
}
.legacy-album-thumb {
    display: flex;
    width: 230px;
    height: 173px;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    background: #f4f4f4;
}
.legacy-album-thumb img {
    width: auto;
    height: auto;
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}
.legacy-album-title { display: block; overflow: hidden; margin-top: 7px; color: #555; white-space: nowrap; text-overflow: ellipsis; }
.legacy-album-meta { height: 20px; color: #888; font-size: 11px; line-height: 20px; }
.legacy-album-count { color: #ff9900; }
.legacy-album-empty { grid-column: 1 / -1; padding: 50px 0; border-top: 2px solid #ddd; border-bottom: 1px solid #ddd; color: #aaa; text-align: center; }

@media (max-width: 760px) {
    .legacy-album-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px 12px; }
    .legacy-album-thumb { width: 100%; height: auto; aspect-ratio: 4 / 3; }
    .legacy-album-thumb img { width: auto; height: auto; max-width: 100%; max-height: 100%; }
    .legacy-board-table {
        display: block;
        width: 100% !important;
        overflow: visible;
        white-space: normal;
    }
    .legacy-board-table thead { display: none; }
    .legacy-board-table tbody { display: block; width: 100%; }
    .legacy-board-table tbody:before { display: none; }
    .legacy-board-table tbody tr {
        display: grid;
        width: 100%;
        grid-template-columns: 38px minmax(0, 1fr);
        grid-template-rows: auto auto;
        border-bottom: 1px dotted #d8d8d8;
    }
    .legacy-board-table td {
        width: auto !important;
        height: auto;
        min-width: 0;
        border-bottom: 0 !important;
        white-space: normal;
    }
    .legacy-board-table .legacy-board-number {
        grid-column: 1;
        grid-row: 1 / 3;
        align-self: stretch;
        display: flex;
        align-items: center;
        justify-content: center;
    }
    .legacy-board-table .legacy-board-subject {
        grid-column: 2;
        grid-row: 1;
        padding: 8px 4px 1px !important;
        overflow-wrap: anywhere;
        line-height: 1.4;
    }
    .legacy-board-table .legacy-board-subject a {
        display: inline;
        white-space: normal;
    }
    .legacy-board-table .legacy-board-author,
    .legacy-board-table .legacy-board-views { display: none; }
    .legacy-board-table .legacy-board-date {
        display: block;
        grid-column: 2;
        grid-row: 2;
        padding: 0 5px 6px !important;
        color: #aaa !important;
        font-size: 10px;
        line-height: 1.3;
        text-align: right !important;
    }
    .legacy-board-table td[colspan] {
        display: block;
        grid-column: 1 / -1;
        padding: 20px 4px !important;
    }
    .legacy-board-write {
        display: block;
        width: 100% !important;
        border-left: 0;
    }
    .legacy-board-write tbody,
    .legacy-board-write tr,
    .legacy-board-write th,
    .legacy-board-write td {
        display: block;
        width: 100% !important;
    }
    .legacy-board-write tr { padding: 9px 0; border-bottom: 1px solid #e2e2e2; }
    .legacy-board-write th,
    .legacy-board-write td { border: 0 !important; text-align: left !important; }
    .legacy-board-write th { padding: 0 0 5px !important; background: none !important; }
    .legacy-board-write td { padding: 0 !important; }
    .legacy-board-write input,
    .legacy-board-write select,
    .legacy-board-write textarea { max-width: 100%; }
    .legacy-board-write textarea { min-height: 240px; }
    .legacy-board-post-body table { display: block; max-width: 100%; overflow-x: auto; }
    .legacy-board-search { flex-wrap: wrap; }
    .legacy-board-actions { margin-top: 10px; }
    .legacy-board-list-actions { margin-top: 8px; }
    .legacy-board-button { min-width: 52px; height: 34px; padding: 0 13px; font-size: 12px; }
    .legacy-board-button-small { min-width: 40px; height: 28px; padding: 0 8px; font-size: 11px; }
    .legacy-board-button-tall { height: 60px; }
}
