/* TBPA Portfolio Attribute Filter Styles */

.attribute-filter-container {
    margin-bottom: 30px;
    padding: 20px;
    background: #ebf0f2;
    border: 1px solid #e3e7e9;
    border-radius: 4px;
}

.filter-title {
    margin: 0 0 20px 0;
    font-size: 24px;
    font-weight: 600;
    color: #333;
}

.attribute-filters {
    display: grid;
    gap: 20px;
    align-items: end;
}

.reset-filters { color: #2c4551; text-transform: uppercase; font-size: 16px; margin-left: 12px; transition: all ease 0.35s; }
.reset-filters::before {content: '\f2f1'; margin-right: 7px; font-family: "Font Awesome 5 Free"; font-weight: 900; transition: all ease 0.35s; }
.reset-filters:hover { margin-left: 15px; color: #d8102c; }
.reset-filters:hover::before { margin-right: 9px; }

/* Default columns for desktop (based on data-columns attribute) */
.attribute-filter-container[data-columns="1"] .attribute-filters {
    grid-template-columns: 1fr;
}

.attribute-filter-container[data-columns="2"] .attribute-filters {
    grid-template-columns: repeat(2, 1fr);
}

.attribute-filter-container[data-columns="3"] .attribute-filters {
    grid-template-columns: repeat(3, 1fr);
}

.attribute-filter-container[data-columns="4"] .attribute-filters {
    grid-template-columns: repeat(4, 1fr);
}

.attribute-filter-container[data-columns="5"] .attribute-filters {
    grid-template-columns: repeat(5, 1fr);
}

.attribute-filter-container[data-columns="6"] .attribute-filters {
    grid-template-columns: repeat(6, 1fr);
}

.attribute-filter-item {
    display: flex;
    flex-direction: column;
}

.attribute-title {
    display: block;
    margin-bottom: 8px;
    font-size: 14px;
    font-weight: 600;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.attribute-filter-select {
    width: 100%;
    padding: 10px 35px 10px 15px;
    font-size: 16px;
    line-height: 1.5;
    color: #333;
    background-color: #fff;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%23343a40' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M2 5l6 6 6-6'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 10px center;
    background-size: 16px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    cursor: pointer;
    transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}

.attribute-filter-select:hover {
    border-color: #999;
}

.attribute-filter-select:focus {
    outline: none;
    border-color: #007cba;
    box-shadow: 0 0 0 2px rgba(0, 124, 186, 0.15);
}

/* Reset button styles */
.reset-filters {
    cursor: pointer;
}

/* Responsive styles */

/* Tablet (600px - 999px): 2 columns */
@media (min-width: 600px) and (max-width: 999px) {
    .attribute-filters {
        grid-template-columns: repeat(2, 1fr) !important;
    }
}

/* Mobile (below 600px): 1 column */
@media (max-width: 599px) {
    .attribute-filter-container {
        padding: 15px;
    }
    
    .filter-title {
        font-size: 20px;
        margin-bottom: 15px;
    }
    
    .attribute-filters {
        grid-template-columns: 1fr !important;
        gap: 15px;
    }
    
    .attribute-title {
        font-size: 13px;
    }
    
    .attribute-filter-select {
        font-size: 15px;
        padding: 8px 30px 8px 12px;
    }
}

/* Portfolio item transitions */
.fusion-portfolio-post {
    transition: opacity 0.3s ease-in-out;
}

.fusion-portfolio-post.tbpa-hiding {
    opacity: 0;
    pointer-events: none;
}

/* Loading state */
.attribute-filters.tbpa-loading {
    opacity: 0.6;
    pointer-events: none;
}

/* Disabled/hidden option states */
.attribute-filter-select option:disabled {
    color: #999;
    font-style: italic;
}

.attribute-filter-select option[disabled]:not([selected]) {
    display: none;
}

/* Accessibility improvements */
.attribute-filter-select:focus-visible {
    outline: 2px solid #007cba;
    outline-offset: 2px;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .attribute-filter-container {
        border-width: 2px;
    }
    
    .attribute-filter-select {
        border-width: 2px;
    }
}