/**
 * Taxonomy Multi Filter Block Styles
 */

.taxonomy-multi-filter-block {
    display: flex;
    flex-direction: column;
    gap: 2rem;
    margin-bottom: 2rem;
}

.taxonomy-filter-section {
    border-bottom: 1px solid #e0e0e0;
    padding-bottom: 1.5rem;
}

.taxonomy-filter-section:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.taxonomy-filter-title {
    font-size: 1.25rem;
    font-weight: 600;
    margin: 0 0 1rem 0;
    color: #333;
}

.taxonomy-checkbox-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 0.5rem;
}

.taxonomy-checkbox-display-all {
    display: flex;
    align-items: center;
    padding: 0.5rem;
    border: 2px solid #e0e0e0;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s ease;
    background-color: #f9f9f9;
}

.taxonomy-checkbox-display-all:hover,
.taxonomy-checkbox-display-all.hover {
    border-color: #ccc;
    background-color: #f0f0f0;
}

.taxonomy-checkbox-display-all.active {
    border-color: #333;
    background-color: #fff;
    font-weight: 600;
}

.taxonomy-checkbox-display-all .display-all-checkbox {
    margin: 0 0.5rem 0 0;
    cursor: pointer;
}

.taxonomy-checkbox-display-all .display-all-label {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    cursor: pointer;
    margin: 0;
}

.taxonomy-checkbox-display-all .display-all-text {
    flex: 1;
}

.taxonomy-checkbox-display-all .term-count {
    font-weight: 600;
    color: #666;
    margin-left: 0.5rem;
}

.taxonomy-checkbox-item {
    display: flex;
    align-items: center;
    padding: 0.5rem;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.taxonomy-checkbox-item:hover {
    border-color: #ccc;
    background-color: #f9f9f9;
}

.taxonomy-checkbox-label {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    cursor: pointer;
    margin: 0;
}

.taxonomy-checkbox-label input[type="checkbox"] {
    margin: 0 0.5rem 0 0;
    cursor: pointer;
}

.taxonomy-checkbox-label .term-name {
    flex: 1;
}

.taxonomy-checkbox-label .term-count {
    font-weight: 600;
    color: #666;
    margin-left: 0.5rem;
}

.taxonomy-checkbox-label input[type="checkbox"]:checked + .term-name {
    font-weight: 600;
}

.taxonomy-filter-empty {
    color: #666;
    font-style: italic;
    margin: 1rem 0;
}

/* Responsive styles */
@media (max-width: 768px) {
    .taxonomy-checkbox-list {
        grid-template-columns: 1fr;
    }

    .taxonomy-multi-filter-block {
        gap: 1.5rem;
    }

    .taxonomy-filter-section {
        padding-bottom: 1rem;
    }
}

/* Accessibility improvements */
.taxonomy-checkbox-label:focus-within,
.display-all-label:focus-within {
    outline: 2px solid #4A90E2;
    outline-offset: 2px;
}

input[type="checkbox"]:focus {
    outline: 2px solid #4A90E2;
    outline-offset: 2px;
}

/* Year Filter Section */
.year-filter-section {
    margin-top: 1rem;
}

.year-filter-controls {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.year-filter-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    flex: 1;
    min-width: 150px;
}

.year-filter-label {
    font-size: 0.875rem;
    font-weight: 500;
    color: #333;
    margin: 0;
}

.year-filter-select {
    padding: 0.625rem 0.75rem;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    background-color: #fff;
    font-size: 1rem;
    color: #333;
    cursor: pointer;
    transition: all 0.2s ease;
    appearance: none;
    background-image: url('data:image/svg+xml;charset=UTF-8,<svg xmlns="http://www.w3.org/2000/svg" width="12" height="8" viewBox="0 0 12 8"><path fill="%23333" d="M1.41 0L6 4.59L10.59 0L12 1.41l-6 6l-6-6z"/></svg>');
    background-repeat: no-repeat;
    background-position: right 0.75rem center;
    background-size: 12px;
    padding-right: 2.5rem;
}

.year-filter-select:hover {
    border-color: #ccc;
    background-color: #f9f9f9;
}

.year-filter-select:focus {
    outline: 2px solid #4A90E2;
    outline-offset: 2px;
    border-color: #4A90E2;
}

.year-filter-select:disabled {
    background-color: #f5f5f5;
    color: #999;
    cursor: not-allowed;
}

/* Responsive adjustments for year filters */
@media (max-width: 768px) {
    .year-filter-controls {
        flex-direction: column;
        gap: 1rem;
    }

    .year-filter-group {
        min-width: 100%;
    }
}

@media (max-width: 480px) {
    .year-filter-select {
        font-size: 0.875rem;
        padding: 0.5rem 2rem 0.5rem 0.5rem;
    }
}
