
/* Filter Container */
.iafwzcai-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 */
.iafwzcai-setup-filter-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    background-color: #f2f2f238;
    cursor: pointer;
}

.iafwzcai-setup-filter-header-title {
    margin: 0;
    font-size: 1rem;
    color: #333;
}

.iafwzcai-setup-filter-header-arrow {
    font-size: 1.2rem;
    color: #666;
}

/* Filter Content */
.iafwzcai-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 */
}

/* Note Content */
.iafwzcai-setup-note {
    padding: 10px;
    /* border-top: 1px solid #ddd; */
    transition: max-height 0.3s ease, opacity 0.3s ease;
    overflow: visible; /* Ensure dropdowns and inputs are fully visible */
    text-align: initial;
}

/* Filter Rows */
.iafwzcai-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 */
.iafwzcai-setup-filter-field,
.iafwzcai-setup-filter-condition,
.iafwzcai-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 */
.iafwzcai-setup-filter-value {
    flex: 2; /* Wider than dropdowns */
}

/* Action Buttons (Add and Close Icons) */
.iafwzcai-setup-filter-actions {
    display: flex;
    gap: 10px;
    flex-shrink: 0; /* Prevent icons from shrinking or wrapping */
}

.iafwzcai-setup-filter-add-icon,
.iafwzcai-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 */
}

.iafwzcai-setup-filter-add-icon:hover,
.iafwzcai-setup-filter-close-icon:hover {
    background-color: #ccc;
}

/* Logic Dropdown Between Rows */
.iafwzcai-setup-filter-logic-row {
    display: flex;
    justify-content: center;
    margin: 10px 0;
}

.iafwzcai-setup-filter-logic-select {
    padding: 8px;
    font-size: 0.9rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    width: 100px;
}

/* Clear All Link */
.iafwzcai-setup-filter-clear-all {
    font-size: 0.9rem;
    color: #007bff;
    text-align: right;
    cursor: pointer;
    margin-bottom: 15px;
}

.iafwzcai-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 */
    .iafwzcai-setup-filter-row {
        flex-wrap: wrap; /* Allow wrapping on smaller screens */
    }

    /* Inputs and Dropdowns take full width */
    .iafwzcai-setup-filter-field,
    .iafwzcai-setup-filter-condition,
    .iafwzcai-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 */
    .iafwzcai-setup-filter-actions {
        justify-content: flex-start;
        width: 100%; /* Ensure they are on their own row if needed */
    }

    /* Adjust margins for better spacing */
    .iafwzcai-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 */
    .iafwzcai-setup-filter-row {
        flex-wrap: wrap;
    }

    /* Adjust inputs to take 50% of the row */
    .iafwzcai-setup-filter-field,
    .iafwzcai-setup-filter-condition,
    .iafwzcai-setup-filter-value {
        flex: 1 1 calc(50% - 15px); /* Two inputs per row */
    }

    /* Action icons remain aligned properly */
    .iafwzcai-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 */
    .iafwzcai-setup-filter-row {
        flex-wrap: nowrap; /* No wrapping for large screens */
    }

    /* Inputs take up one-third of the row */
    .iafwzcai-setup-filter-field,
    .iafwzcai-setup-filter-condition,
    .iafwzcai-setup-filter-value {
        flex: 1 1 calc(33% - 15px); /* Three inputs per row */
    }

    /* Action icons remain aligned properly */
    .iafwzcai-setup-filter-actions {
        justify-content: flex-end; /* Icons to the right */
    }
}
