﻿/* Namespaced CSS - FLT = Filter */

.flt-container {
    max-width: 100%;
    margin: 0px 0px 0px auto;
    background: white;
    padding: 20px 20px 5px 20px;
    border-radius: 5px;
    font-family: Arial, sans-serif;
}

.flt-form-row {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    margin-bottom: 16px;
}

.flt-right-align {
    justify-content: flex-end;
}

.flt-form-group {
    flex: 1 1 200px; /* Allow flexible resizing */
    min-width: 200px;
    display: flex;
    flex-direction: column;
}

    /* Optional: Limit maximum width so dropdowns don’t stretch too far */
    .flt-form-group.flt-dropdown {
        max-width: 220px;
    }

    .flt-form-group label {
        margin-bottom: 6px;
        font-weight: bold;
    }

    .flt-form-group input[type="text"],
    .flt-form-group input[type="date"],
    .flt-dropdown-toggle {
        padding: 8px;
        font-size: 1.3rem;
        border: 1px solid #ccc;
        border-radius: 4px;
        background-color: white;
        width: 100%;
        box-sizing: border-box;
    }

.flt-dropdown-toggle {
    cursor: pointer;
    text-align: left;
    position: relative;
}

    .flt-dropdown-toggle::after {
        content: " ▼";
        position: absolute;
        right: 10px;
        top: 50%;
        transform: translateY(-50%);
        pointer-events: none;
    }

.flt-dropdown {
    position: relative;
}

.flt-dropdown-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    max-height: 200px;
    overflow-y: auto;
    background: white;
    border: 1px solid #ccc;
    padding: 8px;
    border-radius: 4px;
    z-index: 1000;
}

    .flt-dropdown-menu label {
        display: block;
        margin: 4px 0;
        cursor: pointer;
    }

.flt-buttons {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    justify-content:flex-end;
}

#flt-searchBtn,
#flt-clearBtn {
    padding: 10px 16px;
    font-size: 1.5rem;
    border: none;
    border-radius: 4px;
    color: white;
}

#flt-searchBtn {
    background-color: #007bff;
}

#flt-clearBtn {
    background-color: #6c757d;
}

.loading-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.7);
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #ccc;
    border-top: 4px solid #007bff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

.flt-selected-items {
    margin-top: 8px;
    display: flex;
    flex-wrap:nowrap;
    gap: 6px;
    overflow:auto;
}

.flt-tag {
    background-color: #f0f0f0;
    color: #333;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 0.85rem;
    white-space: nowrap;
}

.flt-dropdown-search {
    width: 100%;
    padding: 6px 8px;
    margin-bottom: 8px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 1.3rem !important;
    box-sizing: border-box;
}


@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Optional: Responsive adjustments for smaller screens */
@media (max-width: 768px) {
    .flt-form-group {
        flex: 1 1 100%;
    }

        .flt-form-group.flt-dropdown {
            max-width: 100%;
        }
}
