/* Make Select2 single-select widgets look like the native <select> styled in global.css */

.select2-container--default .select2-selection--single {
    height: auto;
    min-height: 44px;
    display: flex;
    align-items: center;
    background-color: #FFFFFF1A;
    background-image: url("data:image/svg+xml,<svg height='20px' width='20px' viewBox='0 0 16 16' fill='white' xmlns='http://www.w3.org/2000/svg'><path d='M7.247 11.14 2.451 5.658C1.885 5.013 2.345 4 3.204 4h9.592a1 1 0 0 1 .753 1.659l-4.796 5.48a1 1 0 0 1-1.506 0z'/></svg>");
    background-repeat: no-repeat;
    background-position: calc(100% - 0.75rem) center;
    border: 1.12px dashed #A29060;
    border-radius: 16.57px;
    padding: 0 40px 0 19px;
    font-size: clamp(16px, 2.4vw, 22px);
    font-weight: 400;
    color: #CBCBCB;
    outline: none;
}

.select2-container--default .select2-selection--single:focus,
.select2-container--default.select2-container--focus .select2-selection--single,
.select2-container--default.select2-container--open .select2-selection--single {
    outline: none;
    border-color: #A29060;
}

.select2-container--default .select2-selection--single .select2-selection__rendered {
    color: #CBCBCB;
    line-height: inherit;
    padding: 0;
}

.select2-container--default .select2-selection--single .select2-selection__placeholder {
    color: #CBCBCB;
}

/* Use the SVG chevron from the wrapper background instead of Select2's default arrow */
.select2-container--default .select2-selection--single .select2-selection__arrow {
    display: none;
}

/* Hide stray search clear pill on single-select, optional */
.select2-container--default .select2-selection--single .select2-selection__clear {
    color: #CBCBCB;
}

/*
 * When the underlying <select> is bound to a Vue :class (e.g. vee-validate's
 * is-invalid / is-valid), Vue's patchClass replaces the entire className and
 * strips the `select2-hidden-accessible` class that Select2 added to hide it.
 * The original <select> then reappears next to its Select2 wrapper (the user
 * sees the field twice). Re-implement the hide using a selector Vue can't
 * undo: any <select> whose immediate next sibling is a .select2-container.
 */
select:has(+ .select2-container) {
    border: 0 !important;
    clip: rect(0 0 0 0) !important;
    -webkit-clip-path: inset(50%) !important;
    clip-path: inset(50%) !important;
    height: 1px !important;
    margin: -1px !important;
    overflow: hidden !important;
    padding: 0 !important;
    position: absolute !important;
    width: 1px !important;
    white-space: nowrap !important;
}
