/**
 * Custom Search Filter Styles
 * Only applies to search results page
 */

/* Filter container - only visible on search results page */
.wh_search_page .search-filter-container {
    display: block;
    margin: 20px 0;
    padding: 20px;
    background-color: #f5f5f5;
    border-radius: 8px;
    border: 1px solid #e0e0e0;
}

/* Hide on non-search pages */
body:not(.wh_search_page) .search-filter-container {
    display: none !important;
}

/* Filter groups */
.filter-section-group,
.filter-topic-group {
    margin-bottom: 15px;
}

.filter-topic-group {
    margin-bottom: 0;
    padding-top: 15px;
    border-top: 1px solid #ddd;
}

/* Filter title */
.search-filter-container .filter-title {
    margin: 0 0 12px 0;
    font-size: 1.05em;
    color: #333;
    font-weight: 600;
    display: inline-block;
}

/* Filter buttons base style */
.filter-button {
    display: inline-block;
    margin: 5px 8px 5px 0;
    padding: 5px 8px;
    background-color: #fff;
    border: 2px solid #ddd;
    border-radius: 20px;
    color: #333;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    outline: none;
    text-transform: capitalize;
}

/* Filter button hover state */
.filter-button:hover {
    background-color: #f0f0f0;
    border-color: #999;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

/* Active filter button */
.filter-button.active {
    background-color: #355070 !important;
    border-color: #355070 !important;
    color: #fff;
}

.filter-button.active:hover {
    background-color: #3f779a !important;
    border-color: #3f779a !important;
}

/* Show All button special styling */
.filter-button.show-all {
    background-color: #6c757d;
    border-color: #6c757d;
    color: #fff;
    font-weight: 600;
}

.filter-button.show-all:hover {
    background-color: #545b62;
    border-color: #545b62;
}

.filter-button.show-all.active {
    background-color: #528b8b !important;
    border-color: #528b8b !important;
}

.filter-button.show-all.active:hover {
    background-color: #218838;
    border-color: #1e7e34;
}

/* Custom short description styling */
.search-shortdescription-custom {
    margin: 5px 0 10px 0;
    color: #666;
    font-size: 0.95em;
    line-height: 1.4;
}

/* Ensure proper spacing for search results */
.searchresult > li {
    margin-bottom: 15px;
}

/* Responsive design for smaller screens */
@media (max-width: 768px) {
    .search-filter-container {
        padding: 15px;
    }
    
    .filter-button {
        margin: 3px 5px 3px 0;
        padding: 6px 12px;
        font-size: 13px;
    }
    
    .filter-title {
        font-size: 1em;
    }
}

/* Animation for filter appearance */
.search-filter-container {
    animation: fadeIn 0.3s ease-in;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Topic filter buttons - slightly different style */
.filter-topic-group .filter-button:not(.show-all) {
    background-color: #f8f9fa;
    border-color: #6c757d;
    color: #495057;
}

.filter-topic-group .filter-button:not(.show-all):hover {
    background-color: #e9ecef;
    border-color: #495057;
}

.filter-topic-group .filter-button:not(.show-all).active {
    background-color: #17a2b8;
    border-color: #17a2b8;
    color: #fff;
}

.filter-topic-group .filter-button:not(.show-all).active:hover {
    background-color: #138496;
    border-color: #117a8b;
    transition: all 0.3s ease;
    outline: none;
    text-transform: capitalize;
}

/*.filter-topic-group .filter-button:not(.show-all).active:hover {
    background-color: #138496;
    border-color: #117a8b;
}    transition: all 0.3s ease;
    outline: none;
    text-transform: capitalize;
}*/

/* Filter button hover state */
.filter-button:hover {
    background-color: #f0f0f0;
    border-color: #999;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

/* Active filter button */
.filter-button.active {
    background-color: #007bff;
    border-color: #007bff;
    color: #fff;
}

.filter-button.active:hover {
    background-color: #0056b3;
    border-color: #0056b3;
}

/* Show All button special styling */
.filter-button.show-all {
    background-color: #6c757d;
    border-color: #6c757d;
    color: #fff;
    font-weight: 600;
}

.filter-button.show-all:hover {
    background-color: #545b62;
    border-color: #545b62;
}

.filter-button.show-all.active {
    background-color: #28a745;
    border-color: #28a745;
}

.filter-button.show-all.active:hover {
    background-color: #218838;
    border-color: #1e7e34;
}

/* Custom short description styling */
.search-shortdescription-custom {
    margin: 5px 0 10px 0;
    color: #666;
    font-size: 0.95em;
    line-height: 1.4;
}

/* Ensure proper spacing for search results */
.searchresult > li {
    margin-bottom: 15px;
}

/* Responsive design for smaller screens */
@media (max-width: 768px) {
    .search-filter-container {
        padding: 15px;
    }
    
    .filter-button {
        margin: 3px 5px 3px 0;
        padding: 6px 12px;
        font-size: 13px;
    }
    
    .filter-title {
        font-size: 1em;
    }
}

/* Animation for filter appearance */
.search-filter-container {
    animation: fadeIn 0.3s ease-in;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Topic filter buttons - slightly different style */
.filter-topic-group .filter-button:not(.show-all) {
    background-color: #f8f9fa;
    border-color: #6c757d;
    color: #495057;
}

.filter-topic-group .filter-button:not(.show-all):hover {
    background-color: #e9ecef;
    border-color: #495057;
}

.filter-topic-group .filter-button:not(.show-all).active {
    background-color: #17a2b8;
    border-color: #17a2b8;
    color: #fff;
}

.filter-topic-group .filter-button:not(.show-all).active:hover {
    background-color: #138496;
    border-color: #117a8b;
}

/* search highlights */
.highlight {
    background-color: rgba(255, 255, 0, 0.5); /* Yellow with 50% opacity */
    color: #000;
}

.shortdesc {
    display: none;
}