/* News Filter Styles */

.loading-spinner {
    text-align: center;
    padding: 3rem 1rem;
    color: var(--primary-color, #0066cc);
}

.loading-spinner i {
    font-size: 2rem;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* News Filter Styles - Matching Standards */
.aaoifi-news-list {
    margin: 2rem 0;
    font-family: var(--font-family-primary, 'Inter', sans-serif);
}

.aaoifi-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    background: #fff;
    padding: 25px;
    border: 1px solid #e5e7eb;
    margin-bottom: 30px;
    align-items: flex-start;
    border-radius: var(--border-radius-md, 8px);
}

.filter-section {
    flex: 1;
    min-width: 200px;
    margin-bottom: 0;
}

.filter-section h3 {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 12px;
    color: #333;
    border-bottom: 2px solid #1a5f3f;
    padding-bottom: 8px;
    display: block;
    width: 100%;
}

.filter-options {
    width: 100%;
    display: block; /* Override grid */
}

.aaoifi-filters select {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    background-color: #fff;
    color: #333;
    font-size: 14px;
    height: 40px;
}

.filter-option {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-size: 14px;
    color: #555;
    height: 40px; /* Match select height */
    background: transparent;
    border: none;
    padding: 0;
}

.filter-option:hover {
    background: transparent;
    border-color: transparent;
}

.filter-actions {
    width: 100%;
    margin-top: 20px;
    display: flex;
    gap: 15px;
    padding-top: 20px;
    border-top: 1px solid #eee;
    text-align: left; /* Reset text-align */
}

.apply-filters-btn {
    background: #1a5f3f;
    color: #fff;
    border: none;
    padding: 10px 30px;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 600;
    font-size: 14px;
    transition: background 0.3s;
}

.apply-filters-btn:hover {
    background: #144a31;
    transform: none;
}

.reset-filters-btn {
    background: #f3f4f6;
    color: #666;
    border: 1px solid #ddd;
    padding: 10px 20px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    transition: background 0.3s;
}

.reset-filters-btn:hover {
    background: #e5e7eb;
}

/* News Table Styles */
.news-table-container {
    overflow-x: auto;
    border-radius: var(--border-radius-md, 8px);
    border: 1px solid var(--border-color, #e0e0e0);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.news-table {
    width: 100%;
    border-collapse: collapse;
    background: var(--background-primary, #fff);
    font-size: 0.875rem;
}

.news-table th {
    background: var(--background-secondary, #f8f9fa);
    color: var(--text-primary, #333);
    font-weight: 600;
    text-align: left;
    padding: 1rem;
    border-bottom: 2px solid var(--border-color, #e0e0e0);
    white-space: nowrap;
}

.news-table td {
    padding: 1rem;
    border-bottom: 1px solid var(--border-color, #e0e0e0);
    vertical-align: middle;
}

.news-table tr:last-child td {
    border-bottom: none;
}

.news-table tbody tr {
    transition: background-color 0.2s ease;
}

.news-table tbody tr:hover {
    background: var(--background-hover, #f0f7ff);
}

/* News Table Cell Styles */
.news-date-cell {
    width: 120px;
    white-space: nowrap;
}

.news-date {
    font-weight: 600;
    color: var(--primary-color, #0066cc);
    font-size: 0.875rem;
}

.news-type-cell {
    width: 140px;
    white-space: nowrap;
}

.type-badge {
    display: inline-block;
    padding: 0.25rem 0.5rem;
    border-radius: var(--border-radius-sm, 4px);
    font-size: 0.75rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.025em;
    background: var(--background-secondary, #f8f9fa);
    color: var(--text-primary, #333);
    border: 1px solid var(--border-color, #e0e0e0);
}

.type-badge.meeting {
    background: rgba(0, 115, 170, 0.1);
    color: #0073aa;
    border-color: rgba(0, 115, 170, 0.2);
}

.type-badge.update {
    background: rgba(70, 180, 80, 0.1);
    color: #46b450;
    border-color: rgba(70, 180, 80, 0.2);
}

.type-badge.podcast {
    background: rgba(255, 105, 0, 0.1);
    color: #ff6900;
    border-color: rgba(255, 105, 0, 0.2);
}

.type-badge.appointment {
    background: rgba(124, 0, 255, 0.1);
    color: #7c00ff;
    border-color: rgba(124, 0, 255, 0.2);
}

.type-badge.consultation {
    background: rgba(0, 160, 210, 0.1);
    color: #00a0d2;
    border-color: rgba(0, 160, 210, 0.2);
}

.type-badge.amendment {
    background: rgba(214, 54, 56, 0.1);
    color: #d63638;
    border-color: rgba(214, 54, 56, 0.2);
}

.type-badge.research {
    background: rgba(130, 110, 180, 0.1);
    color: #826eb4;
    border-color: rgba(130, 110, 180, 0.2);
}

.type-badge.announcement {
    background: rgba(0, 137, 123, 0.1);
    color: #00897b;
    border-color: rgba(0, 137, 123, 0.2);
}

.member-badge {
    margin-left: 4px;
    font-size: 12px;
    opacity: 0.7;
}

/* News Table Cell Styles */
.news-title-cell {
    min-width: 300px;
}

.news-title {
    margin: 0;
    font-size: 1.0rem;
    line-height: 1.3;
}

.news-title a {
    color: var(--text-primary, #333);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s ease;
}

.news-title a:hover {
    color: var(--primary-color, #0066cc);
    text-decoration: underline;
}

.external-link {
    font-size: 12px;
    opacity: 0.7;
    margin-left: 4px;
}

.no-results {
    text-align: center;
    padding: 3rem 1rem;
    color: var(--text-secondary, #666);
}

.no-results p {
    margin: 0;
    font-size: 1rem;
}

.news-pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: 2rem;
    gap: 0.5rem;
}

.pagination-info {
    color: var(--text-secondary, #666);
    font-size: 0.875rem;
    font-weight: 500;
}

.pagination-controls {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.pagination-btn {
    padding: 0.5rem 0.75rem;
    background: var(--background-primary, #fff);
    color: var(--text-primary, #333);
    border: 1px solid var(--border-color, #e0e0e0);
    border-radius: var(--border-radius-sm, 4px);
    text-decoration: none;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 0.875rem;
    font-weight: 500;
}

.pagination-btn:hover {
    background: var(--background-hover, #f0f7ff);
    border-color: var(--primary-color, #0066cc);
}

.pagination-btn.current {
    background: var(--primary-color, #0066cc);
    color: var(--white, #fff);
    border-color: var(--primary-color, #0066cc);
}

.pagination-btn.prev-page,
.pagination-btn.next-page {
    padding: 8px 16px;
}


@media (max-width: 768px) {
    .filter-row {
        grid-template-columns: 1fr;
    }
    
    .filter-actions {
        flex-direction: column;
        align-items: stretch;
    }
    
    .btn {
        width: 100%;
    }
    
    .news-table-container {
        padding: 20px 0;
    }
    
    .news-table-header h3 {
        font-size: 24px;
    }
    
    .news-table th,
    .news-table td {
        padding: 12px 8px;
        font-size: 14px;
    }
    
    .news-table th {
        font-size: 12px;
    }
    
    .news-pagination {
        flex-direction: column;
        gap: 16px;
        align-items: center;
    }
    
    .pagination-controls {
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .news-table td {
        padding: 12px 6px;
    }
    
    .news-title {
        font-size: 14px;
    }
    
    .type-badge {
        font-size: 11px;
        padding: 3px 6px;
    }
}

@media (max-width: 480px) {
    .news-table {
        font-size: 12px;
    }
    
    .news-table th {
        padding: 8px 4px;
        font-size: 10px;
    }
    
    .news-table td {
        padding: 8px 4px;
    }
    
    .news-title {
        font-size: 13px;
        line-height: 1.3;
    }
    
    .news-date {
        font-size: 12px;
    }
    
    .type-badge {
        display: block;
        margin-bottom: 2px;
    }
}