/* --- Base Container --- */
.multiselect-container {
    position: absolute;
    list-style-type: none;
    margin: 0;
    padding: 0;
    width: 100%;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 6px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.1);
    z-index: 1050;
}

    /* --- Search box spacing --- */
    .multiselect-container .input-group {
        margin: 8px;
    }

    /* --- List Items --- */
    .multiselect-container > li {
        padding: 0;
    }

        /* --- "Select All" Label --- */
        .multiselect-container > li > a.multiselect-all label {
            font-weight: 600;
            color: #ff6600;
        }

        /* --- Group Headers --- */
        .multiselect-container > li.multiselect-group label {
            margin: 0;
            padding: 6px 15px;
            height: 100%;
            font-weight: 700;
            background-color: #f8f9fa;
            border-bottom: 1px solid #eee;
        }

        .multiselect-container > li.multiselect-group-clickable label {
            cursor: pointer;
        }

        /* --- Individual Options --- */
        .multiselect-container > li > a {
            padding: 0;
        }

            .multiselect-container > li > a > label {
                margin: 0;
                height: 100%;
                cursor: pointer;
                font-weight: 400;
                padding: 5px 5px 5px 10px;
                font-size: 14px;
                color: #333;
                display: block;
                white-space: nowrap;
            }

                .multiselect-container > li > a > label:hover {
                    background-color: #f2f2f2;
                }

                /* --- Checkbox alignment --- */
                .multiselect-container > li > a > label.radio,
                .multiselect-container > li > a > label.checkbox {
                    margin: 0;
                }

                .multiselect-container > li > a > label > input[type=checkbox] {
                    margin-bottom: 4px;
                }

/* --- Button alignment fix --- */
.btn-group > .btn-group:nth-child(2) > .multiselect.btn {
    border-top-left-radius: 4px;
    border-bottom-left-radius: 4px;
}

/* --- Inline Forms Support --- */
.form-inline .multiselect-container label.checkbox,
.form-inline .multiselect-container label.radio {
    padding: 6px 20px 6px 40px;
}

.form-inline .multiselect-container li a label.checkbox input[type=checkbox],
.form-inline .multiselect-container li a label.radio input[type=radio] {
    margin-left: -20px;
    margin-right: 0;
}

/* --- Dropdown Button (Select Box) --- */
.multiselect.dropdown-toggle {
    text-align: left !important;
    width: 200px !important;
    height: 38px;
    line-height: 1.5;
    font-size: 14px;
    color: #333;
    background-color: #fff;
    border: 1px solid #ccc;
    border-radius: 6px;
}

    .multiselect.dropdown-toggle::after {
        float: right;
        margin-top: 10px;
    }

/* --- Search Box Styling --- */
.multiselect-container .multiselect-search {
    border: 1px solid #ccc;
    border-radius: 4px !important;
    height: 30px;
    font-size: 13px;
    padding: 3px 10px;
    margin-right: 15px;
}

/* --- Scrollbar (if needed) --- */
.multiselect-container {
    position: absolute !important;
    z-index: 999999 !important;
}

.multiselect-clear-filter {
    border: none;
    background: transparent;
    padding: 6px 10px;
    cursor: pointer;
    transition: color 0.2s ease, transform 0.2s ease;
}

    .multiselect-clear-filter:hover i {
        color: #dc3545; /* Bootstrap danger red */
        transform: scale(1.1);
    }

    .multiselect-clear-filter i {
        font-size: 16px;
        color: #6c757d; /* neutral gray */
    }

@media (max-width: 768px) {
  .multiselect-container.dropdown-menu {
    position: fixed !important;
    top: 220px !important;
    left: 50% !important;
    transform: translateX(-50%) !important;
    width: 95% !important;
    max-width: 270px !important;
    max-height: auto !important;
    overflow-y: auto !important;
    z-index: 1060 !important;
  }
  .multiselect.dropdown-toggle {
    text-align: left !important;
    width: 100% !important;
    height: 30px;
    line-height: 0.5;
    font-size: 13px;
    color: #333;
    background-color: #fff;
    border: 1px solid #ccc;
    border-radius: 6px;
}

.form-control {
    padding: 11px 6px;
}

.dropdown-toggle::after {
    margin-left: 0.6em;
}

.multiselect.dropdown-toggle::after {
        float: right;
        margin-top: 3px;
    }

.filterBox .btn {
    max-width: 35px;
	line-height: 25px;
	top: 0px;
}

/* Block all page interactions when dropdown is visible */
  body:has(.multiselect-container.dropdown-menu.show) {
    overflow: hidden !important;
    position: fixed !important;
    width: 100% !important;
    height: 100% !important;
  }
  
  /* Create backdrop using pseudo-element on body */
  body:has(.multiselect-container.dropdown-menu.show)::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1059;
    pointer-events: all;
  }	
}
/* Tablet Basic (769px - 1024px) */
@media (min-width: 769px) and (max-width: 1024px) {
  .multiselect-container.dropdown-menu {
    position: fixed !important;
    top: 230px !important;
    left: 50% !important;
    transform: translateX(-50%) !important;
    width: 95% !important;
    max-width: 270px !important;
    max-height: auto !important;
    overflow-y: auto !important;
    z-index: 1060 !important;
  }
  .multiselect.dropdown-toggle {
    text-align: left !important;
    width: 100% !important;
    height: 30px;
    line-height: 0.5;
    font-size: 13px;
    color: #333;
    background-color: #fff;
    border: 1px solid #ccc;
    border-radius: 6px;
}

.form-control {
    padding: 11px 6px;
}

.dropdown-toggle::after {
    margin-left: 0.6em;
}

.multiselect.dropdown-toggle::after {
        float: right;
        margin-top: 3px;
    }

.filterBox .btn {
    max-width: 35px;
	line-height: 25px;
	top: 0px;
}

/* Block all page interactions when dropdown is visible */
  body:has(.multiselect-container.dropdown-menu.show) {
    overflow: hidden !important;
    position: fixed !important;
    width: 100% !important;
    height: 100% !important;
  }
  
  /* Create backdrop using pseudo-element on body */
  body:has(.multiselect-container.dropdown-menu.show)::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1059;
    pointer-events: all;
  }	
}


