/* Blog Search Filter Widget Styles */

.blog-search-filter-widget {
    width: 100%;
    margin: 20px 0;
    padding: 25px;
    background: #FFFFFF;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.bsf-container {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    align-items: center;
    justify-content: center;
}

.bsf-search-box {
    position: relative;
    flex: 1 1 300px;
    min-width: 250px;
}

.bsf-input {
    width: 100%;
    padding: 12px 40px 12px 15px;
    font-size: 16px;
    border: 2px solid #5B7DBC;
    border-radius: 5px;
    outline: none;
    transition: all 0.3s ease;
    font-family: 'Open Sans', sans-serif;
}

.bsf-input:focus {
    border-color: #232942;
    box-shadow: 0 0 0 3px rgba(91, 125, 188, 0.1);
}

.bsf-clear {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    background: transparent;
    border: none;
    font-size: 24px;
    color: #888;
    cursor: pointer;
    padding: 5px;
    line-height: 1;
    transition: color 0.3s ease;
}

.bsf-clear:hover {
    color: #232942;
}

.bsf-category-box {
    flex: 0 1 250px;
    min-width: 200px;
}

.bsf-select {
    width: 100%;
    padding: 12px 15px;
    font-size: 16px;
    border: 2px solid #5B7DBC;
    border-radius: 5px;
    outline: none;
    background-color: white;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: 'Open Sans', sans-serif;
}

.bsf-select:focus {
    border-color: #232942;
    box-shadow: 0 0 0 3px rgba(91, 125, 188, 0.1);
}

.bsf-button-box {
    display: flex;
    gap: 10px;
    flex: 0 1 auto;
}

.bsf-button {
    padding: 12px 30px;
    font-size: 16px;
    font-weight: 500;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: 'Open Sans', sans-serif;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.bsf-button:not(.bsf-reset) {
    background: #5B7DBC;
    color: white;
}

.bsf-button:not(.bsf-reset):hover {
    background: #232942;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(91, 125, 188, 0.3);
}

.bsf-reset {
    background: #e0e0e0;
    color: #333;
}

.bsf-reset:hover {
    background: #d0d0d0;
}

.bsf-results-info {
	display:none;
    margin-top: 20px;
    padding: 10px;
    text-align: center;
    font-size: 14px;
    color: #666;
}

#bsf-results-count {
    font-weight: 600;
    color: #5B7DBC;
}

.bsf-loading {
    text-align: center;
    padding: 40px 20px;
    margin: 20px 0;
}

.bsf-spinner {
    width: 50px;
    height: 50px;
    margin: 0 auto 20px;
    border: 5px solid #f3f3f3;
    border-top: 5px solid #5B7DBC;
    border-radius: 50%;
    animation: bsf-spin 1s linear infinite;
}

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

.bsf-loading p {
    color: #666;
    font-size: 16px;
    margin: 0;
}

/* Hide Elementor's existing filters when custom widget is active */
.blog-search-filter-widget ~ .elementor-element .e-filter {
    display: none !important;
}

/* Responsive Design */
@media (max-width: 768px) {
    .bsf-container {
        flex-direction: column;
    }
    
    .bsf-search-box,
    .bsf-category-box {
        flex: 1 1 100%;
        width: 100%;
    }
    
    .bsf-button-box {
        width: 100%;
        justify-content: center;
    }
    
    .bsf-button {
        flex: 1;
    }
}

/* Integration with existing Elementor posts */
.elementor-loop-container {
    transition: opacity 0.3s ease;
}

.elementor-loop-container.bsf-filtering {
    opacity: 0.5;
    pointer-events: none;
}

/* No results message */
.bsf-no-results {
    text-align: center;
    padding: 60px 20px;
    background: #f9f9f9;
    border-radius: 8px;
    margin: 20px 0;
}

.bsf-no-results h3 {
    color: #232942;
    font-size: 24px;
    margin-bottom: 10px;
}

.bsf-no-results p {
    color: #666;
    font-size: 16px;
    margin: 0;
}
