/* =========================
   MULTI-SELECT DROPDOWN SHARED STYLES
========================= */

.meag-multiselect {
    position: relative;
    margin-bottom: 4px;
}

.meag-multiselect-trigger {
    width: 100%;
    height: 42px;
    padding: 0 12px;
    font-size: 14px;
    border-radius: 6px;
    border: 1px solid #cbd5e1;
    background: #ffffff;
    box-sizing: border-box;
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
    transition: all 0.2s ease;
    user-select: none;
}

.meag-multiselect-trigger:hover {
    border-color: #94a3b8;
}

.meag-multiselect.open .meag-multiselect-trigger {
    border-color: #0051a8;
    box-shadow: 0 0 0 3px rgba(0, 81, 168, 0.15);
    border-radius: 6px 6px 0 0;
}

.meag-multiselect-placeholder {
    color: #64748b;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.meag-multiselect-placeholder.has-selection {
    color: #1f2937;
}

.meag-multiselect-arrow {
    color: #64748b;
    font-size: 12px;
    transition: transform 0.2s;
    flex-shrink: 0;
    margin-left: 8px;
}

.meag-multiselect.open .meag-multiselect-arrow {
    transform: rotate(180deg);
}

.meag-multiselect-dropdown {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #ffffff;
    border: 1px solid #0051a8;
    border-top: none;
    border-radius: 0 0 6px 6px;
    max-height: 220px;
    overflow-y: auto;
    z-index: 1000; /* Higher z-index to stay above other elements */
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.meag-multiselect.open .meag-multiselect-dropdown {
    display: block;
}

.meag-multiselect-item {
    /*display: flex !important;*/
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    font-size: 13px;
    font-weight: 500 !important;
    color: #334155;
    cursor: pointer;
    transition: background 0.15s;
    margin: 0 !important;
}

.meag-multiselect-item:hover {
    background: #f0f6ff;
}

.meag-multiselect-item--all {
    font-weight: 600 !important;
    color: #0f172a;
    background: #f8fafc;
}

.meag-multiselect-item--all:hover {
    background: #e8f1ff;
}

.meag-multiselect-item input[type="checkbox"] {
    margin: 0 !important;
    cursor: pointer;
}

.meag-multiselect-divider {
    height: 1px;
    background: #e2e8f0;
    margin: 4px 0;
}

.meag-multiselect-empty {
    padding: 12px 14px;
    font-size: 13px;
    color: #64748b;
    font-style: italic;
    margin: 0;
}

/* Custom scrollbar for dropdown */
.meag-multiselect-dropdown::-webkit-scrollbar {
    width: 6px;
}

.meag-multiselect-dropdown::-webkit-scrollbar-track {
    background: #f1f5f9;
}

.meag-multiselect-dropdown::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 3px;
}

.meag-multiselect-dropdown::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}
