/* --- 1. FONTS & WORDPRESS RESET --- */
@import url('https://fonts.googleapis.com/css2?family=Droid+Sans&family=Droid+Serif:ital,wght@0,400;0,700;1,400&display=swap');

/* Hide default WordPress titles for this post type */
.type-finding_aid .entry-title, 
.type-finding_aid .post-title, 
.type-finding_aid h1.page-title { 
    display: none !important; 
}

/* --- 2. GLOBAL WRAPPER & TYPOGRAPHY --- */
.ead-wrapper {
    font-family: 'Droid Sans', Arial, sans-serif;
    text-align: left !important;
    width: 100% !important;
    max-width: 1350px !important;
    margin: 0 !important;
    padding: 10px 40px;
    line-height: 1.4 !important;
}

/* Tight global spacing to match original site */
.ead-wrapper p, 
.ead-wrapper div, 
.ead-wrapper section { 
    margin-top: 0 !important; 
    margin-bottom: 4px !important; 
}

/* --- 3. BREADCRUMBS & SIDEBAR --- */
.ead-breadcrumb { 
    font-size: 11px; 
    margin-bottom: 25px; 
    border-bottom: 1px solid #ddd; 
    padding-bottom: 8px; 
}
.ead-breadcrumb a { color: #0000EE; text-decoration: none; }
.ead-breadcrumb a:hover { text-decoration: underline; }

.ead-column-container { display: flex; gap: 60px; align-items: flex-start; }
.ead-sidebar-wrapper { width: 220px; flex-shrink: 0; }
.ead-main-content { flex: 1; }

.ead-sidebar { list-style: none; padding: 0; margin: 0; }
.ead-sidebar li a { 
    color: #000; 
    font-weight: bold; 
    font-size: 13px; 
    text-decoration: none; 
    display: block; 
    padding: 2px 10px; 
}
.ead-sidebar li a:hover { color: #d63638 !important; }
.side-head { font-weight: bold; font-size: 14px; padding-bottom: 10px; border-bottom: 1px solid #ccc; margin-bottom: 10px !important; }

/* --- 4. OVERVIEW & MAIN HEADINGS --- */
.ead-overview table { width: 100% !important; border: none !important; border-collapse: collapse; margin-bottom: 15px !important; }
.ead-overview td { border: none !important; padding: 2px 0 !important; vertical-align: top; font-size: 13px; }
.ead-overview td.lab { font-weight: bold; width: 140px !important; min-width: 140px !important; }

.ead-wrapper h2 { 
    border-bottom: 2px solid #000; 
    font-style: italic; 
    margin-top: 20px !important; 
    margin-bottom: 10px !important; 
    padding-bottom: 3px !important;
    font-size: 18px !important;
}

.ead-wrapper h3 { 
    margin-top: 12px !important; 
    margin-bottom: 4px !important; 
    font-size: 15px !important;
    font-weight: bold;
}

.ead-section { margin-bottom: 20px !important; }

/* --- 5. SUBJECT HEADINGS --- */
.subject-list { list-style: none; padding-left: 0; margin: 0 !important; }
.subject-list li { margin-bottom: 3px !important; font-size: 13px; }

/* --- 6. CONTAINER LIST (THE MAIN FIX) --- */

.container-main-head {
    font-size: 24px !important;
    font-weight: bold;
    font-style: italic;
    border-bottom: 2px solid #000;
    margin-bottom: 10px !important;
}

.ead-expand-controls { margin-bottom: 15px; font-size: 13px; font-weight: bold; }
.ead-expand-controls a { color: #0000EE; text-decoration: none; }

/* Series Details (Titles, Dates, Extents) */
.series-header-block {
    margin-top: 35px;
    margin-bottom: 10px;
}
.series-title { font-size: 18px; margin-bottom: 5px !important; }
.series-meta { font-size: 14px; margin-bottom: 2px !important; }

/* Table Reset (No box borders) */
.folder-table { 
    width: 100%; 
    border-collapse: collapse !important;
    border: none !important; 
    margin-bottom: 20px;
    table-layout: fixed;
}

/* Column Names - Lines only above and below */
.folder-table th { 
    border: none !important;
    border-top: 1px solid #000 !important;
    border-bottom: 1px solid #000 !important;
    padding: 10px 0 !important; 
    font-size: 13px; 
    text-align: left;
    font-weight: bold;
}

/* Item Rows */
.folder-table td { 
    border: none !important; 
    padding: 8px 0 !important; 
    vertical-align: top; 
    font-size: 13px; 
}

/* Column Widths & Alignment */
.col-desc { width: 40%; padding-right: 20px !important; }
.col-date { width: 25%; text-align: center !important; }
.col-box  { width: 7%; text-align: center !important; }
.col-fold { width: 7%; text-align: center !important; }
.col-info { width: 21%; text-align: left; }

/* --- 7. DESCRIPTION DRAWER (GREY BAR) --- */
.info-grey-bar {
    background-color: #eeeeee !important;
    padding: 10px 20px !important;
    margin: 5px 0 10px 40px !important; /* Indented left margin */
    font-style: italic;
    font-size: 13px;
    border: none !important;
}

.ead-toggle { 
    color: #0000EE; 
    text-decoration: none; 
    font-weight: bold; 
    font-size: 13px;
}
.ead-toggle:hover { text-decoration: underline; }

/* Remove Ghost Header for cases with no series */
.ead-section > .folder-table:first-of-type { margin-top: 0; }


/* Fix 1: Series Subheading Style */
.series-title {
    font-size: 18px !important;
    margin-top: 25px !important;
    margin-bottom: 5px !important;
    font-weight: bold;
    font-style: italic;
    color: #000;
}

/* Series Metadata (Date and Extent) */
.series-meta {
    font-size: 14px;
    margin-bottom: 3px !important;
    color: #333;
}

/* Ensure table headers look like the image under the subheadings */
.folder-table th {
    border-top: 1px solid #000 !important;
    border-bottom: 1px solid #000 !important;
    padding: 8px 0 !important;
    font-size: 13px;
    font-weight: bold;
}

/* Fix 4: Control Button Style */
.ead-expand-controls {
    margin: 10px 0 20px 0;
    font-size: 13px;
    font-weight: bold;
}

.ead-expand-controls a {
    color: #0000EE;
    text-decoration: none;
    cursor: pointer;
}

/* Fix 1: Clear the ghost header from the top */
.ead-section > .folder-table:first-of-type {
    margin-top: 0;
}

/* Fix 1: Series Subheadings */
.series-title {
    font-size: 19px !important;
    margin-top: 30px !important;
    margin-bottom: 5px !important;
    font-weight: bold;
}

/* Fix 3: Spacing for Date and Extent */
.series-meta {
    font-size: 14px;
    margin-bottom: 2px !important;
    display: block;
}

/* Fix 4: Cursor for buttons */
#expand-all, #collapse-all {
    cursor: pointer;
}

/* Hide ghost headers at the very top */
.ead-section > .folder-table:first-of-type:empty {
    display: none !important;
}

/* Ensure Series Title stands out */
.series-title {
    font-size: 19px !important;
    font-weight: bold;
    margin-top: 30px !important;
    margin-bottom: 5px !important;
}

.series-meta {
    font-size: 14px;
    margin-bottom: 2px !important;
}

#expand-all, #collapse-all {
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
}

#expand-all:hover, #collapse-all:hover {
    text-decoration: underline;
}

/* Ensure the drawer can expand as a table row */
.info-drawer {
    display: none; /* Hidden by default */
}

/* Make sure the buttons look like active links */
#expand-all, #collapse-all {
    color: #0000EE;
    cursor: pointer;
    text-decoration: none;
}

#expand-all:hover, #collapse-all:hover {
    text-decoration: underline;
}


/* Styling for the Finding Aids List Page */
.post-type-archive-finding_aid article {
    border-bottom: 1px solid #ddd;
    padding: 15px 0;
    margin-bottom: 0;
}

.post-type-archive-finding_aid article h2 {
    margin: 0;
    font-size: 1.2rem;
}

.post-type-archive-finding_aid article h2 a {
    color: #0000EE;
    text-decoration: none;
}

.post-type-archive-finding_aid article h2 a:hover {
    text-decoration: underline;
}

/* Hide dates and extra meta data on the list page */
.post-type-archive-finding_aid .entry-meta, 
.post-type-archive-finding_aid .entry-content {
    display: none;
}

/* Fix Overview Table First Column Wrapping */
.wp-block-table table td:first-child {
    white-space: nowrap !important;
    min-width: 130px !important;
    vertical-align: top;
}

/* Fix Finding Aids List Number Column */
#faTable th:first-child,
#faTable td:first-child {
    white-space: nowrap !important;
    width: 70px !important;
    min-width: 70px !important;
}