/* multiselect.css — styles for the custom multi-select dropdowns */

.ms-container {
    position: relative;
    width: 100%;
    font-family: inherit;
    font-size: 13px;
}

/* Trigger / display area */
.ms-trigger {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 4px;
    min-height: 36px;
    padding: 4px 28px 4px 8px;
    border: 1px solid #ccc;
    border-radius: 4px;
    background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M0 0l5 6 5-6z' fill='%23888'/%3E%3C/svg%3E") no-repeat right 10px center;
    cursor: pointer;
    user-select: none;
    transition: border-color 0.15s;
}
.ms-trigger:hover,
.ms-container.ms-open .ms-trigger {
    border-color: #4f46e5;
    outline: none;
}
.ms-trigger:focus {
    border-color: #4f46e5;
    box-shadow: 0 0 0 2px rgba(79,70,229,0.15);
    outline: none;
}

.ms-placeholder {
    color: #999;
}

/* Selected value tags shown in the trigger */
.ms-tag {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    background: #e0e7ff;
    color: #3730a3;
    border-radius: 10px;
    padding: 1px 8px;
    font-size: 12px;
    font-weight: 500;
    white-space: nowrap;
}

.ms-remove {
    cursor: pointer;
    font-size: 14px;
    line-height: 1;
    color: #6366f1;
    margin-left: 2px;
}
.ms-remove:hover {
    color: #c7000a;
}

/* Dropdown panel */
.ms-panel {
    display: none;
    position: absolute;
    top: calc(100% + 3px);
    left: 0;
    right: 0;
    z-index: 1000;
    background: #fff;
    border: 1px solid #ccc;
    border-radius: 4px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.12);
    overflow: hidden;
}
.ms-container.ms-open .ms-panel {
    display: block;
}

/* Search box inside panel */
.ms-search {
    width: 100%;
    box-sizing: border-box;
    padding: 7px 10px;
    border: none;
    border-bottom: 1px solid #e5e5e5;
    font-size: 13px;
    outline: none;
    background: #fafafa;
}
.ms-search:focus {
    background: #fff;
}

/* Option list */
.ms-list {
    list-style: none;
    margin: 0;
    padding: 0;
    max-height: 200px;
    overflow-y: auto;
}

.ms-option {
    padding: 7px 12px;
    cursor: pointer;
    color: #333;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: background 0.1s;
}
.ms-option::before {
    content: "";
    display: inline-block;
    width: 14px;
    height: 14px;
    border: 1.5px solid #ccc;
    border-radius: 3px;
    flex-shrink: 0;
    background: #fff;
    transition: background 0.1s, border-color 0.1s;
}
.ms-option:hover {
    background: #f0f0ff;
}
.ms-option.ms-selected::before {
    background: #4f46e5;
    border-color: #4f46e5;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 10'%3E%3Cpath d='M1 5l3 4L11 1' stroke='%23fff' stroke-width='2' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    background-size: 10px 8px;
    background-repeat: no-repeat;
    background-position: center;
}
.ms-option.ms-selected {
    color: #3730a3;
    font-weight: 500;
}
.ms-option.ms-none {
    color: #999;
    font-style: italic;
    cursor: default;
}
.ms-option.ms-none::before {
    display: none;
}

/* Scrollbar styling */
.ms-list::-webkit-scrollbar {
    width: 6px;
}
.ms-list::-webkit-scrollbar-track {
    background: #f1f1f1;
}
.ms-list::-webkit-scrollbar-thumb {
    background: #ccc;
    border-radius: 3px;
}
