/* Modern Sidebar Filters Design */
/* Color Palette: #2077ba, #f9b33b, #2c91ce, #ffbe5f */

/* Container Styling */
.filter-sidebar {
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(32, 119, 186, 0.1);
    padding: 0;
    margin-bottom: 30px;
    border: 1px solid #e8f4fd;
}

/* Reset Button */
.sidebar-search-btnn {
    margin: 0;
    padding: 20px;
    border-bottom: 1px solid #e8f4fd;
}

.sidebar-search-btnn a {
    display: block;
    background: linear-gradient(135deg, #2077ba 0%, #2c91ce 100%);
    color: #ffffff;
    text-align: center;
    padding: 12px 20px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    font-size: 14px;
    letter-spacing: 0.5px;
    transition: all 0.2s ease;
    border: none;
}

.sidebar-search-btnn a:hover {
    background: linear-gradient(135deg, #1a6ba0 0%, #2581b8 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(32, 119, 186, 0.3);
    color: #ffffff;
}

/* Filter Section Headers */
.modern-filter-section {
    border-bottom: 1px solid #e8f4fd;
}

.modern-filter-section:last-child {
    border-bottom: none;
}

.modern-filter-header {
    padding: 20px;
    cursor: pointer;
    background: #ffffff;
    border: none;
    display: flex;
    justify-content: between;
    align-items: center;
    width: 100%;
    transition: all 0.2s ease;
    position: relative;
}

.modern-filter-header:hover {
    background: linear-gradient(135deg, #f8fcff 0%, #e8f4fd 100%);
}

.modern-filter-header.active {
    background: linear-gradient(135deg, #2077ba 0%, #2c91ce 100%);
    color: #ffffff;
}

.modern-filter-title {
    font-size: 16px;
    font-weight: 600;
    margin: 0;
    color: #2c3e50;
    flex-grow: 1;
    text-align: left;
}

.modern-filter-header.active .modern-filter-title {
    color: #ffffff;
}

.modern-filter-arrow {
    font-size: 14px;
    color: #2077ba;
    transition: transform 0.2s ease;
    margin-left: auto;
    padding-left: 15px;
}

.modern-filter-header.active .modern-filter-arrow {
    color: #ffffff;
    transform: rotate(180deg);
}

.modern-filter-arrow.rotated {
    transform: rotate(180deg);
}

/* Filter Content */
.modern-filter-content {
    padding: 0;
    background: #fafcff;
    border-top: 1px solid #e8f4fd;
    overflow: hidden;
    transition: none; /* Let Bootstrap handle transitions */
}

.modern-filter-content.collapse {
    display: none;
}

.modern-filter-content.collapse.show {
    display: block;
}

.modern-filter-content.collapsing {
    position: relative;
    height: 0;
    overflow: hidden;
    transition: height 0.35s ease;
}

.modern-filter-options {
    padding: 20px;
    margin: 0;
    list-style: none;
}

/* Option Items */
.modern-filter-option {
    margin-bottom: 12px;
}

.modern-filter-option:last-child {
    margin-bottom: 0;
}

/* Custom Checkbox Styling */
.modern-checkbox-wrapper {
    display: flex;
    align-items: center;
    cursor: pointer;
    padding: 10px 12px;
    border-radius: 6px;
    transition: all 0.2s ease;
    border: 1px solid transparent;
}

.modern-checkbox-wrapper:hover {
    background: #ffffff;
    border-color: #2077ba;
    box-shadow: 0 2px 8px rgba(32, 119, 186, 0.1);
}

.modern-checkbox {
    position: relative;
    width: 20px;
    height: 20px;
    margin-right: 12px;
    flex-shrink: 0;
}

.modern-checkbox input[type="checkbox"] {
    opacity: 0;
    position: absolute;
    width: 100%;
    height: 100%;
    margin: 0;
    cursor: pointer;
}

.modern-checkbox-mark {
    position: absolute;
    top: 0;
    left: 0;
    width: 20px;
    height: 20px;
    background: #ffffff;
    border: 2px solid #dce7f0;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.modern-checkbox input[type="checkbox"]:checked + .modern-checkbox-mark {
    background: linear-gradient(135deg, #2077ba 0%, #2c91ce 100%);
    border-color: #2077ba;
}

.modern-checkbox-mark:after {
    content: "";
    position: absolute;
    display: none;
    left: 6px;
    top: 2px;
    width: 6px;
    height: 10px;
    border: solid #ffffff;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.modern-checkbox input[type="checkbox"]:checked + .modern-checkbox-mark:after {
    display: block;
}

.modern-checkbox-label {
    color: #2c3e50;
    font-size: 14px;
    font-weight: 500;
    line-height: 1.4;
    flex-grow: 1;
}

/* Special Styling for "All" Options */
.modern-filter-option.all-option .modern-checkbox-wrapper {
    background: linear-gradient(135deg, #fff8f0 0%, #fef5e7 100%);
    border-color: #ffbe5f;
}

.modern-filter-option.all-option .modern-checkbox-mark {
    border-color: #f9b33b;
}

.modern-filter-option.all-option .modern-checkbox input[type="checkbox"]:checked + .modern-checkbox-mark {
    background: linear-gradient(135deg, #f9b33b 0%, #ffbe5f 100%);
    border-color: #f9b33b;
}

.modern-filter-option.all-option .modern-checkbox-label {
    color: #e67e22;
    font-weight: 600;
}

/* Amenity Categories */
.modern-amenity-category {
    background: #f8fcff;
    border-left: 4px solid #2077ba;
    padding: 12px 15px;
    margin: 15px 0 10px 0;
    border-radius: 0 6px 6px 0;
}

.modern-amenity-category-title {
    font-size: 15px;
    font-weight: 600;
    color: #2077ba;
    margin: 0;
}

.modern-subamenities-list {
    margin: 10px 0 0 0;
    padding: 0;
    list-style: none;
}

.modern-subamenities-list .modern-filter-option {
    margin-bottom: 8px;
}

.modern-subamenities-list .modern-checkbox-wrapper {
    padding: 8px 10px;
    margin-left: 15px;
    border-left: 2px solid #e8f4fd;
}

/* Show More/Less Links */
.modern-show-more {
    display: inline-block;
    color: #2077ba;
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    padding: 8px 12px;
    border-radius: 6px;
    border: 1px solid #2077ba;
    background: #ffffff;
    margin-top: 10px;
    transition: all 0.2s ease;
}

.modern-show-more:hover {
    background: #2077ba;
    color: #ffffff;
    text-decoration: none;
}

/* Responsive Design */
@media (max-width: 768px) {
    .filter-sidebar {
        margin-bottom: 20px;
    }
    
    .modern-filter-header {
        padding: 15px;
    }
    
    .modern-filter-options {
        padding: 15px;
    }
    
    .modern-filter-title {
        font-size: 15px;
    }
    
    .modern-checkbox-label {
        font-size: 13px;
    }
}

/* Legacy Class Compatibility */
.sidebar-checkbox {
    margin: 0;
    padding: 0;
    border: none;
    background: none;
}

.widget-title-sidebar {
    margin: 0;
    padding: 0;
    border: none;
    background: none;
}

.checkbox-custom-style {
    margin: 0;
    padding: 0;
    display: block;
}

/* Hide default checkbox styling */
.checkbox-custom-style input[type="checkbox"] {
    display: none;
}

.checkbox-custom-style i {
    display: none;
}

/* Override existing styles */
ul.xoxo {
    margin: 0;
    padding: 0;
    list-style: none;
}

ul.xoxo li {
    margin: 0;
    padding: 0;
    border: none;
    background: none;
}