/* Search container styles */
.search-container {
    display: flex;
    gap: 20px;
    margin-bottom: 30px;
    padding-bottom: 30px;
    border-bottom: 1px solid #e9ecef;
}

.search-box {
    flex: 1;
    position: relative;
}

.search-box label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
}

.search-box input {
    width: 100%;
    padding: 8px 35px 8px 10px;
    border: 1px solid #ccc;
    border-radius: 4px;
    box-sizing: border-box;
}

.search-icon {
    position: absolute;
    right: 10px;
    top: 40px;
    width: 16px;
    height: 16px;
    color: #666;
}

/* Suggestions dropdown styles */
.suggestions { 
    background: #f0f0f0; 
    padding: 5px; 
    border: 1px solid #ccc;
    width: 100%;
    box-sizing: border-box;
    position: absolute;
    display: none;
    z-index: 1000;
}

.suggestions div { 
    padding: 5px; 
    cursor: pointer; 
}

.suggestions div:hover { 
    background: #ddd; 
}

.checkbox-container {
    margin-left: 17px;
    padding-bottom: 30px;
    margin-bottom: 30px;
    border-bottom: 1px solid #e9ecef;
}

/* Filter section styles */
.filter-section {
    background: #fff;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    margin-bottom: 20px;
}

.filter-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    background: #f8f9fa;
    border-bottom: 1px solid #e9ecef;
    cursor: pointer;
}

.filter-header span {
    font-weight: 600;
    color: #2c3e50;
}

.expand-toggle {
    background: none;
    border: none;
    font-size: 12px;
    color: #6c757d;
    cursor: pointer;
    padding: 5px;
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.filter-content {
    max-height: 1000px;
    opacity: 1;
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
    padding: 20px 0;
    transform-origin: top;
    transform: scaleY(1);
    visibility: visible;
}

/* Collapsed state */
.filter-section:not(.expanded) .filter-content {
    max-height: 0;
    opacity: 0;
    padding: 0;
    transform: scaleY(0);
    visibility: hidden;
}

.filter-section:not(.expanded) .expand-toggle {
    transform: rotate(-180deg);
}

/* Adjust inner content transitions */
.filter-content .checkbox-container,
.filter-content .search-container {
    transition: opacity 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    opacity: 1;
}

.filter-section:not(.expanded) .checkbox-container,
.filter-section:not(.expanded) .search-container {
    opacity: 0;
}

/* Move existing styles inside filter-content */
.filter-content {
    margin: 20px auto;
}

.filter-content .search-container {
    margin: 0 20px 20px;
}

/* Savings item styles */
.savings-item {
    border-color: rgba(40, 167, 69, 0.2);
}

.savings-item .list-item-title {
    background: rgba(40, 167, 69, 0.1);
}

.savings-item.expanded {
    background: rgba(40, 167, 69, 0.05);
}

.savings-item.expanded .list-item-details {
    background: transparent;
}

.savings-item.expanded .list-item-details th {
    background: rgba(40, 167, 69, 0.05);
}

.savings-item:hover {
    box-shadow: 0 2px 8px rgba(40, 167, 69, 0.15);
}

.savings-button:hover {
    background-color: #45a049;
}

.filter-section.expanded-with-suggestions {
    height: 360px;
    transition: height 0.5s ease;
}

.savings-sort {
    padding: 0 17px;
    width: 80%;
}