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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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