/*
 * How a form's dropdowns look, drawn by Tom Select: the look select2's theme gave them before Tom Select
 * replaced it (typed-custom-form-client section 5, which records the two side by side), on Tom Select's
 * markup. It builds on Tom Select's own layout (tom-select.css, from the package), and the control takes
 * the look of the form's other inputs from .ui-input-select in form.css.
 */

/* The control fills its cell, as select2's did. */
.ts-wrapper {
    display: block;
}

.ts-wrapper .ts-control.ui-input-select {
    box-shadow: none;
    z-index: auto;
    /* Tom Select keeps its right-hand padding to this, for a caret or a clear button; the form's is wider. */
    --ts-pr-min: var(--input-padding-horizontal);
}

/*
 * The control's background, as select2's theme gave it: white behind a choice of several, and none behind
 * a choice of one, which shows the form's. These are kept no more specific than form.css's rules for a
 * field in error, which come later and so still colour the control as they did select2's.
 */
.ts-control.ui-input-select {
    background-color: white;
}
:where(.ts-wrapper.single) > .ts-control.ui-input-select {
    background-color: transparent;
}

/*
 * While a choice of one is open, tom-select.css gives its control a white background and a grey border of
 * its own, more specific than form.css's for a required field or one in error. So the open control is
 * given back what form.css gives the closed one, state by state, in form.css's order.
 */
.ts-wrapper.single.input-active > .ts-control.ui-input-select {
    background-color: transparent;
    cursor: pointer;
}
.ui-validation-error .ts-wrapper.single.input-active > .ts-control.ui-input-select {
    background-color: var(--input-background-colour-validation-error);
}
.plugin-dropdown_input.focus.dropdown-active > .ts-control.ui-input-select {
    border-color: var(--input-border-colour);
}
.ui-required .plugin-dropdown_input.focus.dropdown-active > .ts-control.ui-input-select {
    border-color: var(--input-border-colour-required);
}
.ui-validation-error .plugin-dropdown_input.focus.dropdown-active > .ts-control.ui-input-select {
    border-color: var(--input-border-colour-validation-error);
}

/* A choice of one: as tall as a one-line input, its arrow at the right. */
.ts-wrapper.single .ts-control.ui-input-select {
    height: calc(var(--input-font-size) * var(--input-line-height) + var(--input-padding-vertical) * 2 + 2px); /* font + padding + border */
    padding: var(--input-padding-vertical) calc(var(--input-padding-horizontal) + 20px) var(--input-padding-vertical) var(--input-padding-horizontal);
    flex-wrap: nowrap;
    cursor: pointer;
}
.ts-wrapper.single .ts-control.ui-input-select::after {
    content: "";
    position: absolute;
    top: 50%;
    right: 7px;
    width: 0;
    height: 0;
    margin-top: -2px;
    border-color: #888 transparent transparent transparent;
    border-style: solid;
    border-width: 5px 4px 0 4px;
}
.ts-wrapper.single.dropdown-active .ts-control.ui-input-select::after {
    border-color: transparent transparent #888 transparent;
    border-width: 0 4px 5px 4px;
}
.ts-wrapper.single .ts-control.ui-input-select > .item {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* What a choice of one says before anything is chosen, in the control's lettering. A choice of several
   says it in its search box, in the browser's own placeholder colour, as select2's did. */
.ts-wrapper.single .ts-control.ui-input-select > input {
    font: inherit;
    color: inherit;
}
.ts-wrapper.single .ts-control.ui-input-select > input::placeholder {
    color: #999;
    opacity: 1;
}

/* A choice of several: each choice a chip, taken off by the cross at its left. */
.ts-wrapper.multi .ts-control.ui-input-select,
.ts-wrapper.multi.has-items .ts-control.ui-input-select {
    --choice-margin-vertical: 5px;
    --choice-margin-horizontal: 5px;
    --choice-padding-vertical: 3px;
    --choice-padding-left: 6px;
    --choice-padding-right: 8px;
    --remove-button-width: 20px;
    padding: calc(var(--input-padding-vertical) - var(--choice-margin-vertical)) var(--input-padding-horizontal) var(--input-padding-vertical) calc(var(--input-padding-horizontal) - var(--choice-margin-horizontal));
    border-radius: 4px;
    cursor: text;
}
.ts-wrapper.multi .ts-control.ui-input-select > .item {
    position: relative;
    box-sizing: content-box;
    height: var(--font-size);
    max-width: 100%;
    margin: var(--choice-margin-vertical) 0 0 var(--choice-margin-horizontal);
    padding: var(--choice-padding-vertical) var(--choice-padding-right) var(--choice-padding-vertical) calc(var(--choice-padding-left) + var(--remove-button-width));
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    cursor: default;
    color: inherit;
    background-color: #e4e4e4;
    border: 1px solid #aaa;
    border-radius: 4px;
}
.ts-wrapper.multi.plugin-remove_button .ts-control.ui-input-select > .item {
    padding-right: var(--choice-padding-right) !important;
}
.ts-wrapper.multi .ts-control.ui-input-select > .item.active {
    background-color: #e4e4e4;
    color: inherit;
}
.ts-wrapper.multi.plugin-remove_button .ts-control.ui-input-select > .item .remove {
    position: absolute;
    top: 0;
    left: 0;
    width: var(--remove-button-width);
    height: 100%;
    margin: 0;
    padding: 0;
    box-sizing: content-box;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #999;
    font-family: Arial, sans-serif;
    font-weight: bold;
    line-height: normal;
    border: none;
    border-right: 1px solid #aaa;
    border-radius: 4px 0 0 4px;
    cursor: pointer;
}
.ts-wrapper.multi.plugin-remove_button .ts-control.ui-input-select > .item .remove:hover {
    background-color: #f1f1f1;
    color: #333;
}
/* Its search box, in the lettering select2's was: the browser's own, at the control's size. It takes what
   room is left after the chips, however little, rather than going to a line of its own, as select2's did. */
.ts-wrapper.multi .ts-control.ui-input-select > input {
    flex: 1 1 1.5em;
    min-width: 1.5em;
    height: var(--font-size);
    margin: var(--choice-margin-vertical) 0 0 var(--choice-margin-horizontal) !important;
    padding: var(--choice-padding-vertical) 0 !important;
    border: 1px solid transparent !important;
    box-sizing: content-box;
    font-family: sans-serif;
    font-size: 100%;
    line-height: normal !important;
    color: initial;
}

/* Switched off: greyed, as the form's other inputs are, the whole control at once. */
.ts-wrapper.disabled {
    opacity: var(--input-disabled-opacity);
}
.ts-wrapper.disabled > .ts-control.ui-input-select {
    opacity: 1;
    background-color: #eee;
}
.ts-wrapper.multi.disabled .ts-control.ui-input-select > .item .remove {
    display: none;
}

/* The list, drawn over the page: above anything open on it, in the form's lettering and the page's colour. */
.ts-dropdown.ui-modal {
    z-index: 1051;
    margin: 0;
    font-family: var(--font-family);
    font-size: var(--font-size);
    color: inherit;
    background-color: white;
    border: 1px solid #aaa;
    border-radius: 4px;
    box-shadow: none;
}

/* Where the list meets its control (place_dropdown, in tom-select-plugins.ts) the two share a border,
   with square corners. */
.ts-dropdown.ui-modal.dropdown-below {
    border-top: none;
    border-top-left-radius: 0;
    border-top-right-radius: 0;
}
.ts-dropdown.ui-modal.dropdown-above {
    border-bottom: none;
    border-bottom-left-radius: 0;
    border-bottom-right-radius: 0;
}
.ts-wrapper.dropdown-active.dropdown-below > .ts-control.ui-input-select {
    border-bottom-left-radius: 0;
    border-bottom-right-radius: 0;
}
.ts-wrapper.dropdown-active.dropdown-above > .ts-control.ui-input-select {
    border-top-left-radius: 0;
    border-top-right-radius: 0;
}
.ts-dropdown.ui-modal .ts-dropdown-content {
    max-height: 200px;
}
.ts-dropdown.ui-modal .option,
.ts-dropdown.ui-modal .create,
.ts-dropdown.ui-modal .no-results {
    padding: 6px;
}
.ts-dropdown.ui-modal .option.selected {
    background-color: #ddd;
    color: inherit;
}
.ts-dropdown.ui-modal .option.active,
.ts-dropdown.ui-modal .create.active {
    background-color: #5897fb;
    color: white;
}
.ts-dropdown.ui-modal [data-disabled] {
    color: #999;
}
/* A search that matches nothing but can be made a new option offers just that, as select2's did. */
.ts-dropdown.ui-modal .create ~ .no-results {
    display: none;
}

/* The search box at the top of a single choice's list, in the browser's own lettering, as select2's was. */
.ts-dropdown.ui-modal .dropdown-input-wrap {
    padding: 4px;
}
.ts-dropdown.ui-modal .dropdown-input {
    box-sizing: border-box;
    width: 100%;
    padding: 4px;
    border: 1px solid #aaa;
    background-color: white;
    font: revert;
    color: revert;
}

/*# sourceMappingURL=/Users/ben/dev/printerface/release-main/build/production/neon/WEB-INF/classes/com/pirionsystems/ne/sites/standard/skin/staticContent/style/form/v2/tom-select-ui.css.map */
