/*
 * WGS Index Book Filter – styling for the John Scalf Files Index (TablePress table 5).
 * Mirrors the WGS Bulletin Index look (Code Snippets CSS snippet #43, which styles #tablepress-3).
 * Everything is scoped to #tablepress-5 / #tablepress-5_wrapper / .wgs-book-filter.
 */
#tablepress-5{--padding:.55rem .65rem;--odd-bg-color:#f2f7f3;--even-bg-color:#fff;--hover-bg-color:#fff5bf;--border-color:#d3ded6;--text-color:#222;font-size:15px;line-height:1.45;border-collapse:separate;border-spacing:0;width:100%!important;margin-bottom:.75rem}
#tablepress-5 thead th{position:sticky;top:0;z-index:3;background:#004225;color:#edf646;font-size:14px;font-weight:700;white-space:nowrap;vertical-align:bottom;border-bottom:3px solid #edf646;padding-top:.6rem;padding-bottom:.6rem}
#tablepress-5 tbody td{vertical-align:top;border-top:0;border-bottom:1px solid var(--border-color)}
#tablepress-5 .column-1{width:16%}
#tablepress-5 .column-2,#tablepress-5 .column-3{width:7.5em;white-space:nowrap}
#tablepress-5 .column-4{width:15%}
#tablepress-5 .column-5{width:5.5em;white-space:nowrap}
#tablepress-5 .column-7{width:5em;text-align:center}
#tablepress-5 .column-8{width:10em;white-space:nowrap}
#tablepress-5 .column-9{width:5em;text-align:center}
#tablepress-5 thead .column-7,#tablepress-5 thead .column-9{text-align:center}
#tablepress-5 tbody td.column-1{font-weight:700;color:#004225}
#tablepress-5 tbody td.column-4{color:#333}
#tablepress-5 tbody td.column-6{font-weight:600;color:#1d3326}
#tablepress-5 tbody td.column-8{color:#333}
#tablepress-5 tbody td.column-9 a{color:#004225;font-weight:700;text-decoration-thickness:2px;text-underline-offset:3px}
#tablepress-5 tbody td.column-2,#tablepress-5 tbody td.column-3,#tablepress-5 tbody td.column-9{font-variant-numeric:tabular-nums}

/* controls (same as the Bulletin Index) */
#tablepress-5_wrapper>.dt-layout-row:first-child{background:#f2f7f3;border:1px solid #d3ded6;border-radius:8px;padding:.7rem 1rem;margin:0 0 .75rem;align-items:center}
#tablepress-5_wrapper .dt-search label{font-weight:700;color:#004225;margin-right:.4rem}
#tablepress-5_wrapper .dt-search input{width:min(440px,100%);font-size:16px;padding:.55rem .8rem;border:2px solid #004225;border-radius:6px;background:#fff}
#tablepress-5_wrapper .dt-search input:focus{outline:3px solid #edf646;outline-offset:1px}
#tablepress-5_wrapper .dt-length select{font-size:16px;padding:.35rem .5rem;border:1px solid #004225;border-radius:6px;background:#fff}
#tablepress-5_wrapper .dt-info{font-size:14px;color:#444}
#tablepress-5_wrapper .dt-paging .dt-paging-button{min-width:2.4em;padding:.4em .75em;margin:2px;border:1px solid #d3ded6!important;border-radius:6px;background:#fff!important;color:#004225!important;font-size:15px}
#tablepress-5_wrapper .dt-paging .dt-paging-button:hover:not(.disabled){background:#fff5bf!important}
#tablepress-5_wrapper .dt-paging .dt-paging-button.current{background:#004225!important;color:#edf646!important;border-color:#004225!important;font-weight:700}
#tablepress-5_wrapper .dt-paging .dt-paging-button.disabled{opacity:.4}

/* Book dropdown (generic, then matched to the search box on table 5) */
.wgs-book-filter{align-items:center;display:flex;flex-wrap:wrap;gap:5px;justify-content:center}
.wgs-book-filter label{display:inline;width:auto}
.wgs-book-filter select{background-color:#fff;border:1px solid #aaa;border-radius:3px;color:inherit;font:inherit;padding:5px;max-width:100%;width:auto}
/* Stack "Book:" above the dropdown exactly like "Search the index:" sits above the search box,
   and bottom-align the two controls. */
#tablepress-5_wrapper>.dt-layout-row:first-child .dt-layout-end{align-items:flex-end}
#tablepress-5_wrapper .wgs-book-filter{flex-direction:column;align-items:center;justify-content:flex-end;gap:5px}
#tablepress-5_wrapper .wgs-book-filter label{display:block;font-size:inherit;font-weight:700;color:#004225;text-align:center;margin:0}
#tablepress-5_wrapper .wgs-book-filter select{box-sizing:border-box;font-family:revert;font-size:16px;line-height:normal;padding:calc(.55rem - .5px) 2rem calc(.55rem - .5px) .8rem;border:2px solid #004225;border-radius:6px;background-color:#fff;color:#000;cursor:pointer;margin:0}
#tablepress-5_wrapper .wgs-book-filter select:focus{outline:3px solid #edf646;outline-offset:1px}

/* phones: each row becomes a labelled card; header becomes a row of sort buttons */
@media (max-width:700px){
#tablepress-5,#tablepress-5 thead,#tablepress-5 tbody,#tablepress-5 tr,#tablepress-5 td{display:block;width:auto!important}
#tablepress-5 colgroup{display:none}
#tablepress-5 caption{display:block;text-align:left}
#tablepress-5 thead tr{display:flex;flex-wrap:wrap;gap:6px;align-items:center;padding:0 0 .75rem}
#tablepress-5 thead tr::before{content:"Sort by:";font-size:13px;font-weight:700;color:#004225;width:100%}
#tablepress-5 thead th{display:block;position:static;width:auto!important;border:0;border-radius:999px;padding:.3rem 1.6rem .3rem .75rem;font-size:13px}
#tablepress-5 tbody tr{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));column-gap:.5rem;border:1px solid #d3ded6;border-left:5px solid #004225;border-radius:8px;margin:0 0 .75rem;padding:.65rem .8rem;background:#fff}
#tablepress-5 tbody tr:nth-child(odd){background:#f2f7f3}
#tablepress-5 tbody td{padding:0;border:0;background:transparent!important;text-align:left!important;white-space:normal}
#tablepress-5 tbody td:empty{display:none}
#tablepress-5 tbody td{order:3}
#tablepress-5 tbody td.column-1{order:0}
#tablepress-5 tbody td.column-4{order:1}
#tablepress-5 tbody td.column-6{order:2}
#tablepress-5 tbody td.column-1,#tablepress-5 tbody td.column-4,#tablepress-5 tbody td.column-6{grid-column:1/-1}
#tablepress-5 tbody td.column-1{font-size:17px;margin-bottom:.1rem}
#tablepress-5 tbody td.column-4,#tablepress-5 tbody td.column-6{font-size:15px;margin:.15rem 0 .35rem}
#tablepress-5 tbody td.column-2,#tablepress-5 tbody td.column-3,#tablepress-5 tbody td.column-5,#tablepress-5 tbody td.column-7,#tablepress-5 tbody td.column-8,#tablepress-5 tbody td.column-9{font-size:14px;border-top:1px solid #d3ded6;padding-top:.35rem}
#tablepress-5 tbody td:not(.column-1)::before{display:block;font-size:11px;font-weight:700;letter-spacing:.05em;text-transform:uppercase;color:#5a6b60}
#tablepress-5 tbody td.column-2::before{content:"Birth"}
#tablepress-5 tbody td.column-3::before{content:"Death"}
#tablepress-5 tbody td.column-4::before{content:"Spouse"}
#tablepress-5 tbody td.column-5::before{content:"Role"}
#tablepress-5 tbody td.column-6::before{content:"On the sheet of"}
#tablepress-5 tbody td.column-7::before{content:"Own sheet"}
#tablepress-5 tbody td.column-8::before{content:"Volume"}
#tablepress-5 tbody td.column-9::before{content:"Page"}
#tablepress-5 tbody td.dt-empty{grid-column:1/-1}
#tablepress-5 tbody td.dt-empty::before{content:none}
#tablepress-5_wrapper .dt-layout-row{display:block}
#tablepress-5_wrapper .dt-layout-cell{display:block;text-align:left;padding:.25rem 0}
#tablepress-5_wrapper .dt-search label,#tablepress-5_wrapper .wgs-book-filter label{display:block;margin:0 0 .25rem}
#tablepress-5_wrapper .dt-search input,#tablepress-5_wrapper .wgs-book-filter select{width:100%;margin:0;box-sizing:border-box}
#tablepress-5_wrapper .wgs-book-filter{align-items:stretch;margin:0 0 .5rem}
#tablepress-5_wrapper .wgs-book-filter label{text-align:center}
#tablepress-5_wrapper .dt-paging{text-align:center}
}

/* 1.0.15: Records column */
#tablepress-5 .wgs-records-col{width:5.5em;white-space:nowrap}
