/* Select2 theme "softlead" (theme: 'softlead' in js/selects.js) */

.select2-container--softlead {
    max-width: 100%;
}

.select2-container--softlead .select2-selection--single {
    display: flex;
    align-items: center;
    height: 44px;
    padding: 0 40px 0 14px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--c-border);
    background: var(--c-white);
    cursor: pointer;
    transition: border-color .2s, box-shadow .2s;
}

.select2-container--softlead .select2-selection--single .select2-selection__rendered {
    padding: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-family: var(--font-body);
    font-size: 15px;
    line-height: 1.3;
    color: var(--c-ink);
}

.select2-container--softlead .select2-selection--single .select2-selection__placeholder {
    color: var(--c-placeholder);
}

.select2-container--softlead .select2-selection--single .select2-selection__arrow {
    position: absolute;
    top: 50%;
    right: 14px;
    width: 16px;
    height: 16px;
    transform: translateY(-50%);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%236B5C7E' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: center;
    transition: transform .2s;
}

.select2-container--softlead .select2-selection--single .select2-selection__arrow b {
    display: none;
}

.select2-container--softlead.select2-container--open .select2-selection--single .select2-selection__arrow {
    transform: translateY(-50%) rotate(180deg);
}

.select2-container--softlead.select2-container--focus .select2-selection--single,
.select2-container--softlead.select2-container--open .select2-selection--single {
    border-color: var(--c-primary);
    box-shadow: 0 0 0 3px rgba(194, 24, 91, .15);
    outline: none;
}

.field.has-error .select2-container--softlead .select2-selection--single {
    border-color: var(--c-danger);
}

.select2-container--softlead.select2-container--disabled .select2-selection--single {
    background: var(--c-tint);
    cursor: not-allowed;
    opacity: .7;
}

.select2-container--softlead .select2-dropdown {
    z-index: 60;
    margin-top: 6px;
    overflow: hidden;
    border: 1px solid var(--c-border);
    border-radius: var(--radius-md);
    background: var(--c-white);
    box-shadow: var(--shadow-lg);
}

.select2-container--softlead .select2-dropdown--above {
    margin-top: -6px;
}

.select2-container--softlead .select2-search--dropdown {
    padding: 8px 8px 0;
}

.select2-container--softlead .select2-search--dropdown .select2-search__field {
    height: 40px;
    padding: 0 12px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--c-border);
    font-family: var(--font-body);
    font-size: 14px;
    color: var(--c-ink);
    outline: none;
}

.select2-container--softlead .select2-search--dropdown .select2-search__field:focus {
    border-color: var(--c-primary);
}

.select2-container--softlead .select2-results > .select2-results__options {
    max-height: 260px;
    overflow-y: auto;
    padding: 6px;
}

.select2-container--softlead .select2-results__option {
    position: relative;
    padding: 10px 36px 10px 12px;
    border-radius: var(--radius-xs);
    font-size: 15px;
    line-height: 1.35;
    color: var(--c-ink);
}

.select2-container--softlead .select2-results__option--highlighted[aria-selected] {
    background: var(--c-tint);
    color: var(--c-ink);
}

.select2-container--softlead .select2-results__option[aria-selected="true"] {
    font-weight: 600;
    color: var(--c-primary-dark);
}

.select2-container--softlead .select2-results__option[aria-selected="true"]::after {
    content: '';
    position: absolute;
    top: 50%;
    right: 12px;
    width: 14px;
    height: 14px;
    transform: translateY(-50%);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%23C2185B' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
}

.select2-container--softlead .select2-results__option[aria-disabled="true"] {
    color: var(--c-ink-3);
}

.select2-container--softlead .select2-results__message {
    color: var(--c-ink-3);
}

.select2-flag {
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

.select2-flag__none {
    flex-shrink: 0;
    width: 20px;
    height: 14px;
}

.select2-flag__img {
    width: 20px;
    height: 14px;
    border-radius: 2px;
    object-fit: cover;
    box-shadow: 0 0 0 1px rgba(28, 11, 46, .08);
}

/* select[multiple]: the choices as pills (like .choice-chip), the search typed inline, the same frame and arrow */

.select2-container--softlead .select2-selection--multiple {
    position: relative;
    display: block;
    min-height: 44px;
    padding: 5px 40px 5px 8px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--c-border);
    background: var(--c-white);
    cursor: text;
    transition: border-color .2s, box-shadow .2s;
}

.select2-container--softlead .select2-selection--multiple::after {
    content: '';
    position: absolute;
    top: 21px;
    right: 14px;
    width: 16px;
    height: 16px;
    transform: translateY(-50%);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%236B5C7E' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: center;
    pointer-events: none;
    transition: transform .2s;
}

.select2-container--softlead.select2-container--open .select2-selection--multiple::after {
    transform: translateY(-50%) rotate(180deg);
}

.select2-container--softlead .select2-selection--multiple .select2-selection__rendered {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
    margin: 0;
    padding: 0;
    list-style: none;
    white-space: normal;
}

.select2-container--softlead .select2-selection--multiple .select2-selection__choice {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    max-width: 100%;
    margin: 0;
    padding: 5px 10px 5px 12px;
    border-radius: var(--radius-pill);
    border: 1px solid var(--c-border);
    background: var(--c-tint);
    font-size: 14px;
    line-height: 1.3;
    color: var(--c-ink);
}

.select2-container--softlead .select2-selection--multiple .select2-selection__choice__remove {
    order: 2;
    font-size: 17px;
    line-height: 1;
    color: var(--c-ink-3);
    cursor: pointer;
}

.select2-container--softlead .select2-selection--multiple .select2-selection__choice__remove:hover {
    color: var(--c-primary);
}

.select2-container--softlead .select2-search--inline {
    float: none;
    flex: 1 1 80px;
}

.select2-container--softlead .select2-search--inline .select2-search__field {
    min-width: 100%;
    height: 32px;
    margin: 0;
    padding: 0 6px;
    border: 0;
    outline: none;
    background: transparent;
    font-family: var(--font-body);
    font-size: 15px;
    color: var(--c-ink);
}

.select2-container--softlead .select2-search--inline .select2-search__field::placeholder {
    color: var(--c-placeholder);
}

.select2-container--softlead.select2-container--focus .select2-selection--multiple,
.select2-container--softlead.select2-container--open .select2-selection--multiple {
    border-color: var(--c-primary);
    box-shadow: 0 0 0 3px rgba(194, 24, 91, .15);
    outline: none;
}

.field.has-error .select2-container--softlead .select2-selection--multiple {
    border-color: var(--c-danger);
}
