
/* Filter Container */
.iafwmc-setup-filter-container {
    max-width: 700px;
    /* margin: 0 auto; */
    /* background-color: #fff;
    border-radius: 6px; */
    /* box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1); */
    overflow: hidden; /* Ensure content stays inside the container */
    /* border: 1px solid #ddd; */
    margin-top: 30px;
    background-color: #f2f2f238;
    border: 1px solid #e0e0e0;
}

/* Filter Header */
.iafwmc-setup-filter-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    background-color: #f2f2f238;
    cursor: pointer;
}

.iafwmc-setup-filter-header-title {
    margin: 0;
    font-size: 1rem;
    color: #333;
}

.iafwmc-setup-filter-header-arrow {
    font-size: 1.2rem;
    color: #666;
}

/* Filter Content */
.iafwmc-setup-filter-content {
    display: none;
    padding: 20px;
    border-top: 1px solid #ddd;
    transition: max-height 0.3s ease, opacity 0.3s ease;
    overflow: visible; /* Ensure dropdowns and inputs are fully visible */
}

/* Filter Rows */
.iafwmc-setup-filter-row {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 15px;
    flex-wrap: nowrap; /* Prevent wrapping of items within the row */
    box-sizing: border-box;
}

/* Inputs and Dropdowns */
.iafwmc-setup-filter-field,
.iafwmc-setup-filter-condition,
.iafwmc-setup-filter-value {
    flex: 1 1 300px; /* Minimum width of 300px */
    max-width: 100%; /* Ensure it doesn't overflow the container */
    padding: 10px;
    font-size: 0.9rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    box-sizing: border-box;
}   

/* Text Input with more width */
.iafwmc-setup-filter-value {
    flex: 2; /* Wider than dropdowns */
}

/* Action Buttons (Add and Close Icons) */
.iafwmc-setup-filter-actions {
    display: flex;
    gap: 10px;
    flex-shrink: 0; /* Prevent icons from shrinking or wrapping */
}

.iafwmc-setup-filter-add-icon,
.iafwmc-setup-filter-close-icon {
    background-color: #e0e0e0;
    color: #666;
    font-size: 1rem;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    width: 35px;
    height: 35px;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: background-color 0.2s ease;
    flex-shrink: 0; /* Prevent wrapping */
}

.iafwmc-setup-filter-add-icon:hover,
.iafwmc-setup-filter-close-icon:hover {
    background-color: #ccc;
}

/* Logic Dropdown Between Rows */
.iafwmc-setup-filter-logic-row {
    display: flex;
    justify-content: center;
    margin: 10px 0;
}

.iafwmc-setup-filter-logic-select {
    padding: 8px;
    font-size: 0.9rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    width: 100px;
}

/* Clear All Link */
.iafwmc-setup-filter-clear-all {
    font-size: 0.9rem;
    color: #007bff;
    text-align: right;
    cursor: pointer;
    margin-bottom: 15px;
}

.iafwmc-setup-filter-clear-all:hover {
    text-decoration: underline;
}

/* Responsive Design for Small Screens (Up to 768px) */
@media (max-width: 768px) {
    /* Allow wrapping for inputs and dropdowns */
    .iafwmc-setup-filter-row {
        flex-wrap: wrap; /* Allow wrapping on smaller screens */
    }

    /* Inputs and Dropdowns take full width */
    .iafwmc-setup-filter-field,
    .iafwmc-setup-filter-condition,
    .iafwmc-setup-filter-value {
        flex: 1 1 100%; /* Make each input take full width */
        margin-bottom: 10px; /* Add spacing between rows */
    }

    /* Align action icons to the left */
    .iafwmc-setup-filter-actions {
        justify-content: flex-start;
        width: 100%; /* Ensure they are on their own row if needed */
    }

    /* Adjust margins for better spacing */
    .iafwmc-setup-filter-clear-all {
        margin-top: 10px;
    }
}

/* Responsive Design for Medium Screens (768px to 1199px) */
@media (min-width: 769px) and (max-width: 1199px) {
    /* Allow wrapping but reduce width for better layout */
    .iafwmc-setup-filter-row {
        flex-wrap: wrap;
    }

    /* Adjust inputs to take 50% of the row */
    .iafwmc-setup-filter-field,
    .iafwmc-setup-filter-condition,
    .iafwmc-setup-filter-value {
        flex: 1 1 calc(50% - 15px); /* Two inputs per row */
    }

    /* Action icons remain aligned properly */
    .iafwmc-setup-filter-actions {
        justify-content: flex-start;
    }
}

/* Responsive Design for Large Screens (1200px and above) */
@media (min-width: 1200px) {
    /* Keep inputs and dropdowns in the same row */
    .iafwmc-setup-filter-row {
        flex-wrap: nowrap; /* No wrapping for large screens */
    }

    /* Inputs take up one-third of the row */
    .iafwmc-setup-filter-field,
    .iafwmc-setup-filter-condition,
    .iafwmc-setup-filter-value {
        flex: 1 1 calc(33% - 15px); /* Three inputs per row */
    }

    /* Action icons remain aligned properly */
    .iafwmc-setup-filter-actions {
        justify-content: flex-end; /* Icons to the right */
    }
}
