/**
 * Meetings Archive & PDF Viewer Styles
 * Only loaded on meetings-related pages for better performance
 * Version: 2025.1
 */

/* ========================================
   MEETINGS ARCHIVE CONTAINER
   ======================================== */
.meetings-archive-container {
    margin: 30px 0;
    font-family: inherit;
    width: 100% !important;
    max-width: 100% !important;
    padding: 0 !important;
    box-sizing: border-box !important;
}

/* ========================================
   SEARCH FORM
   ======================================== */
.meetings-search-form {
    margin-bottom: 20px;
    display: flex;
    max-width: 600px;
}

.meetings-search-field {
    flex: 1;
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px 0 0 4px;
    font-size: 14px;
}

.meetings-search-submit {
    padding: 8px 16px;
    background-color: #436F8A;
    color: white;
    border: none;
    border-radius: 0 4px 4px 0;
    cursor: pointer;
    font-size: 14px;
    transition: background-color 0.2s ease;
}

.meetings-search-submit:hover {
    background-color: #365a71;
}

/* ========================================
   MEETINGS TABLE STRUCTURE
   ======================================== */
.meetings-table {
    width: 100% !important;
    border-collapse: collapse;
    margin-bottom: 30px;
    border: 1px solid #e0e0e0;
    box-sizing: border-box !important;
}

.meetings-table-header {
    display: flex;
    background-color: #436F8A;
    color: white;
    font-weight: bold;
    border-bottom: 2px solid #ddd;
}

.meetings-table-row {
    display: flex;
    border-bottom: 1px solid #e0e0e0;
    transition: background-color 0.2s ease;
}

.meetings-table-row:nth-child(odd) {
    background-color: #f0f0f0;
}

.meetings-table-row:nth-child(even) {
    background-color: #ffffff;
}

.meetings-table-row:hover {
    background-color: #e4e4e4;
}

/* ========================================
   TABLE CELLS
   ======================================== */
.meetings-cell {
    padding: 12px 15px !important;
    text-align: left;
    display: flex;
    align-items: center;
    border-right: 1px solid #e0e0e0;
}

.meetings-cell:last-child {
    border-right: none;
}

/* Column Widths */
.meetings-date-cell {
    width: 20%;
    font-weight: 500;
}

.meetings-desc-cell {
    width: 40%;
}

.meetings-agenda-cell, 
.meetings-minutes-cell {
    width: 20%;
}

/* ========================================
   PDF LINKS
   ======================================== */
.meetings-view-link,
.meetings-download-link {
    color: #0066CC !important;
    font-weight: 500 !important;
    text-decoration: none !important;
    transition: all 0.2s ease;
}

.meetings-view-link:hover,
.meetings-download-link:hover {
    text-decoration: underline !important;
    color: #004499 !important;
}

/* PDF Separator */
span.pdf-separator {
    display: inline-block !important;
    margin: 0 6px !important;
    color: #666 !important;
}

.no-pdf {
    color: #888;
    font-style: italic;
}

/* ========================================
   PAGINATION
   ======================================== */
.meetings-pagination {
    margin-top: 20px;
    text-align: center;
}

.meetings-pagination .page-numbers {
    display: inline-block;
    padding: 5px 10px;
    margin: 0 3px;
    border: 1px solid #ddd;
    background-color: #fff;
    color: #333;
    text-decoration: none;
    border-radius: 3px;
    transition: all 0.2s ease;
}

.meetings-pagination .page-numbers.current {
    background-color: #436F8A;
    color: white;
    border-color: #436F8A;
}

.meetings-pagination .page-numbers:hover {
    background-color: #f5f5f5;
}

/* ========================================
   NO MEETINGS FOUND MESSAGE
   ======================================== */
.no-meetings-found {
    padding: 20px;
    text-align: center;
    background-color: #f9f9f9;
    border: 1px solid #ddd;
    border-radius: 4px;
    margin-top: 20px;
}

/* ========================================
   KADENCE BLOCK COMPATIBILITY
   ======================================== */
.wp-block-kadence-column .meetings-archive-container {
    margin: 0 !important;
}

.wp-block-kadence-column .meetings-view-link + span,
.wp-block-kadence-column span + .meetings-download-link {
    margin: 0 6px !important;
}

/* ========================================
   MOBILE RESPONSIVE DESIGN
   ======================================== */
@media (max-width: 768px) {
    .meetings-table-header {
        display: none;
    }
    
    .meetings-table-row {
        display: block;
        border: 1px solid #ddd;
        margin-bottom: 15px;
        padding: 8px;
        border-radius: 4px;
    }
    
    .meetings-cell {
        display: flex;
        padding: 8px 4px !important;
        text-align: left;
        border-bottom: 1px solid #eee;
        border-right: none;
    }
    
    .meetings-cell:last-child {
        border-bottom: none;
    }
    
    .meetings-cell:before {
        content: attr(data-label);
        font-weight: bold;
        width: 30%;
        margin-right: 15px;
        display: inline-block;
        min-width: 100px;
    }
    
    .meetings-date-cell,
    .meetings-desc-cell,
    .meetings-agenda-cell,
    .meetings-minutes-cell {
        width: 100%;
    }
}

/* ========================================
   ADD MEETING FORM STYLES
   ======================================== */
.pdf-compression-notice {
    margin-bottom: 20px;
    padding: 15px;
    border: 1px solid #e0e0e0;
    background-color: #f9f9f9;
    border-radius: 5px;
}

.pdf-compression-notice h3,
.pdf-compression-notice h4 {
    margin-top: 0;
}

.pdf-compression-notice ol {
    margin-left: 20px;
}

.pdf-compression-notice a {
    color: #0066CC;
    text-decoration: none;
}

.pdf-compression-notice a:hover {
    text-decoration: underline;
}

/* ========================================
   LOCALHOST-COMPATIBLE PDF VIEWER STYLES (WordPress 2025)
   Baby boomer-friendly PDF viewing for local development
   ======================================== */
.pdf-viewer-container {
    padding: 20px;
    max-width: 1200px;
    margin: 0 auto;
}

.pdf-container {
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 4px;
    overflow: hidden;
}

.pdf-container h2 {
    margin: 0;
    padding: 15px 20px;
    background: #f5f5f5;
    border-bottom: 1px solid #ddd;
}

.pdf-controls {
    padding: 10px 20px;
    background: #f9f9f9;
    border-bottom: 1px solid #ddd;
    display: flex;
    justify-content: space-between;
}

.pdf-download-button, 
.pdf-back-button {
    display: inline-block;
    padding: 8px 16px;
    background-color: #2271b1;
    color: white;
    text-decoration: none;
    border-radius: 4px;
    font-size: 14px;
    transition: background-color 0.2s ease;
}

.pdf-download-button:hover,
.pdf-back-button:hover {
    background-color: #135e96;
    color: white;
}

.no-pdf-error {
    max-width: 600px;
    margin: 50px auto;
    padding: 30px;
    background: #f9f9f9;
    border: 1px solid #ddd;
    border-radius: 5px;
    text-align: center;
}

/* WordPress 2025: Localhost-compatible iframe styling for baby boomer accessibility */
.pdf-container iframe {
    border: none;
    display: block;
    width: 100%;
    min-height: 800px;
    background: #f5f5f5;
}

/* Responsive iframe adjustments */
@media (max-width: 768px) {
    .pdf-container iframe {
        min-height: 600px;
    }
}

@media (max-width: 480px) {
    .pdf-container iframe {
        min-height: 400px;
    }
}

/* ========================================
   ACCESSIBILITY IMPROVEMENTS
   ======================================== */
.meetings-view-link:focus,
.meetings-download-link:focus {
    outline: 2px solid #0066CC;
    outline-offset: 2px;
}

.meetings-search-submit:focus {
    outline: 2px solid #436F8A;
    outline-offset: 2px;
}

/* ========================================
   PRINT STYLES
   ======================================== */
@media print {
    .meetings-search-form,
    .meetings-pagination,
    .pdf-controls {
        display: none !important;
    }
    
    .meetings-table {
        border-collapse: collapse;
    }
    
    .meetings-table-row:hover {
        background-color: transparent !important;
    }
}