/* niceSelect – styles for public/scripts/niceSelect.js */

.tagsWrap
{
    position:relative;
}

.tagCnfIco
{
    position:absolute;
    top:5px;
    right:5px;
}

.nice-select,
.nice-select__dropdown {
    /* aligned with input/select/textarea in panel/form/input.css */
    --ns-border: rgba(var(--inverse), .1);    
    --ns-border-focus: var(--lightgreen);
    --ns-bg: var(--input-back,#fff);
    --ns-muted: var(--grey, #808080);
    --ns-hover: rgba(var(--inverse), .05);
    --ns-selected: var(--lightengreen, rgba(var(--inverse), .1));
    --ns-radius: var(--input-radius);
    --ns-height: 50px;
    --ns-shadow: 0 1px 1px 0 rgba(var(--inverse), .05);     
    font-size: 13px;
    font-weight: 500;
    box-sizing: border-box; 
}

.nice-select *,
.nice-select__dropdown * {
    box-sizing: border-box;
}

/* native select hidden but still submitted with the form */
select.nice-select-native {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    margin: -1px !important;
    padding: 0 !important;
    border: 0 !important;
    overflow: hidden !important;
    clip: rect(0 0 0 0) !important;
    opacity: 0 !important;
    pointer-events: none !important;
}

.nice-select {
    position: relative;
    display: inline-block;
    width: 100%;
    vertical-align: middle;
}

.nice-select__trigger {
    position: relative;
    display: flex;
    align-items: center;
    min-height: var(--ns-height);
    padding: 0 34px 0 12px;
    box-shadow: var(--ns-shadow);
    background: var(--ns-bg);
    border: 1px solid var(--ns-border);   
    border-radius: var(--ns-radius);
    color: inherit;
    cursor: pointer;
    outline: 0;
    user-select: none;
}

.nice-select__trigger:focus,
.nice-select.is-open .nice-select__trigger {
    border: 1px solid var(--ns-border-focus);
}

/* validation error (class "error" set on the native select, see input.css) */
select.error + .nice-select .nice-select__trigger {
    background: var(--error);
    color: var(--white);
    border: 1px solid var(--error);
    box-shadow: inset 1px 1px 5px var(--error);
}

.nice-select__value {
    flex: 1 1 auto;
    min-width: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    align-items: center;
    line-height: 1.4;
}

.nice-select--multiple .nice-select__value {
    padding: 5px 0;
    gap: 4px;
}

.nice-select__text {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.nice-select__placeholder {
    color: var(--ns-muted);
}

/* reset global button styles (height, padding, shadow...) for internal buttons */
.nice-select button {
    width: auto;
    height: auto;
    min-height: 0;
    margin: 0;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: none;
    box-shadow: none;
    line-height: 1;
}

/* icons come from the bootstrap-icons font already loaded in the panel */
.nice-select__arrow,
.nice-select__clear,
.nice-select__chip-remove {
    font-family: 'bootstrap-icons';
    font-style: normal;
    font-weight: normal;
}

.nice-select__arrow {
    position: absolute;
    top: 50%;
    right: 12px;
    transform: translateY(-50%);
    color: var(--ns-muted);
    font-size: 13px;
    line-height: 1;
    pointer-events: none;
}

.nice-select__arrow::before {
    content: '\F282';          /* bi-chevron-down */
}

.nice-select.is-open .nice-select__arrow::before {
    content: '\F286';          /* bi-chevron-up */
}

.nice-select__clear {
    position: absolute;
    top: 50%;
    right: 26px;
    transform: translateY(-50%);
    color: var(--ns-muted);
    font-size: 14px;
    cursor: pointer;
}

.nice-select__clear::before,
.nice-select__chip-remove::before {
    content: '\F62A';          /* bi-x */
}

.nice-select__clear:hover {
    color: inherit;
} 

/* chips (multiple) */
.nice-select__chip {
    display: flex;
    align-items: center;
    gap: 2px;
    max-width: 100%;
    height: 30px;
    padding: 0 6px 0 4px;
    background: var(--navy);
    color:var(--white);
    border: 1px solid var(--ns-border);
    border-radius: var(--ns-radius);
    font-size: 12px;
}

.nice-select .nice-select__chip-remove {
    display: inline-flex;
    background: #ffffffbd;
    border-radius: 50%;
    align-items: center;
    color: var(--navy);    
    cursor: pointer; 
}

.nice-select__chip-remove:hover {
    color: var(--red, #c0392b);
}

.nice-select__chip-label {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.nice-select.is-disabled .nice-select__trigger {
    background: rgba(var(--inverse), .05);
    color: var(--ns-muted);
    cursor: not-allowed;
}

/* dropdown (appended to body or dropdownParent) */
.nice-select__dropdown {
    position: absolute;
    z-index: 100000;
    background: var(--box-back, var(--ns-bg));
    border: 0;
    border-radius: var(--ns-radius);
    margin-top: 2px;
    box-shadow: 0 1px 6px rgb(86 86 86 / 20%);
    overflow: hidden;
    color: inherit;
}

.nice-select__dropdown.is-above {
    margin-top: -2px;
    box-shadow: 0 -1px 6px rgb(86 86 86 / 20%);
}

.nice-select__search {
    display: block;
    width: calc(100% - 16px);
    height: 38px;
    margin: 8px;
    padding: 0 12px;
    background: var(--ns-bg);
    color: inherit;
    border: 1px solid var(--ns-border);
    border-radius: var(--ns-radius);
    box-shadow: var(--ns-shadow);
    font: inherit;
    line-height: 38px;
    outline: 0;
}

.nice-select__search:focus {
    border: 1px solid var(--ns-border-focus);
}

.nice-select__list {
    margin: 0;
    padding: 0;
    list-style: none;
    overflow-y: auto;
}

.nice-select__option {
    padding: 8px 12px;
    cursor: pointer;
}

.nice-select__option.is-grouped {
    padding-left: 24px;
}

.nice-select__option.is-active {
    background: var(--ns-hover);
}

.nice-select__option.is-selected {
    background: var(--ns-selected);
    font-weight: 600;
}

.nice-select__option.is-disabled {
    color: var(--ns-muted);
    cursor: not-allowed;
}

.nice-select__group {
    padding: 8px 12px 4px;
    color: var(--ns-muted);
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
}

.nice-select__message {
    padding: 8px 12px;
    color: var(--ns-muted);
}
