/* Shared HBL Select2 styling. Scoped only to the HBL Select2 classes. */

:root {
    --hbl-sel-orange: #f15e22;
    --hbl-sel-orange-dark: #c44a0e;
    --hbl-sel-focus-ring: rgba(241, 94, 34, 0.16);
    --hbl-sel-border: #d1d5db;
    --hbl-sel-bg: #ffffff;
    --hbl-sel-text: #374151;
    --hbl-sel-muted: #9ca3af;
    --hbl-sel-dropdown-z: 2055;
}

.select2-container.hbl-select,
.select2-container.hbl-multiselect {
    width: 100% !important;
}

.select2-container.hbl-multiselect {
    min-width: 0;
}

.select2-container.hbl-select.select2-container--default .select2-selection--single,
.select2-container.hbl-multiselect.select2-container--default .select2-selection--multiple {
    border: 1px solid var(--hbl-sel-border) !important;
    border-radius: 6px !important;
    background: var(--hbl-sel-bg) !important;
    box-shadow: none !important;
    transition: border-color 0.15s ease, box-shadow 0.15s ease, background-color 0.15s ease;
}

.select2-container.hbl-select.select2-container--focus .select2-selection--single,
.select2-container.hbl-select.select2-container--open .select2-selection--single,
.select2-container.hbl-multiselect.select2-container--focus .select2-selection--multiple,
.select2-container.hbl-multiselect.select2-container--open .select2-selection--multiple {
    border-color: var(--hbl-sel-orange) !important;
    box-shadow: 0 0 0 0.15rem var(--hbl-sel-focus-ring) !important;
}

.select2-container.hbl-select.select2-container--default .select2-selection--single {
    min-height: 38px !important;
    height: 38px !important;
    display: flex !important;
    align-items: center !important;
    padding-right: 52px !important;
    position: relative;
}

.select2-container.hbl-select.select2-container--default .select2-selection--single .select2-selection__rendered {
    color: var(--hbl-sel-text) !important;
    line-height: 36px !important;
    padding-left: 0.75rem !important;
    padding-right: 0 !important;
    font-size: 0.875rem !important;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.select2-container.hbl-select.select2-container--default .select2-selection--single .select2-selection__placeholder {
    color: var(--hbl-sel-muted) !important;
}

.select2-container.hbl-select.select2-container--default .select2-selection--single .select2-selection__clear {
    position: absolute;
    top: 50%;
    right: 28px;
    transform: translateY(-50%);
    margin: 0 !important;
    padding: 0 4px !important;
    color: var(--hbl-sel-muted) !important;
    font-size: 1rem !important;
    line-height: 1 !important;
    z-index: 2;
}

.select2-container.hbl-select.select2-container--default .select2-selection--single .select2-selection__clear:hover {
    color: var(--hbl-sel-orange) !important;
}

.select2-container.hbl-select.select2-container--default .select2-selection--single .select2-selection__arrow {
    width: 26px !important;
    height: 36px !important;
    right: 4px !important;
}

.select2-container.hbl-select.select2-container--default .select2-selection--single .select2-selection__arrow b {
    border-color: #6b7280 transparent transparent transparent !important;
    border-width: 5px 4px 0 4px !important;
    margin-top: -2px !important;
}

.select2-container.hbl-select.select2-container--open .select2-selection--single .select2-selection__arrow b {
    border-color: transparent transparent #6b7280 transparent !important;
    border-width: 0 4px 5px 4px !important;
}

.select2-container.hbl-multiselect.select2-container--default .select2-selection--multiple {
    min-height: 38px !important;
    height: 38px !important;
    padding: 3px 40px 3px 6px !important;
    overflow: hidden !important;
    display: block !important;
    position: relative;
}

.select2-container.hbl-multiselect.select2-container--default .select2-selection--multiple .select2-selection__rendered {
    display: flex !important;
    flex-wrap: nowrap !important;
    align-items: center !important;
    align-content: center !important;
    gap: 4px !important;
    width: 100% !important;
    min-height: 28px;
    height: 100% !important;
    min-width: 0;
    padding: 0 !important;
    margin: 0 !important;
    list-style: none;
    overflow: hidden !important;
    white-space: nowrap;
}

.select2-container.hbl-multiselect.select2-container--default .select2-selection--multiple .select2-selection__placeholder {
    display: block !important;
    float: none !important;
    line-height: 28px !important;
    margin: 0 !important;
    color: var(--hbl-sel-muted) !important;
}

.select2-container.hbl-multiselect .hbl-multiselect-empty-placeholder {
    display: inline-flex;
    align-items: center;
    align-self: center;
    min-height: 28px;
    height: 28px;
    color: var(--hbl-sel-muted);
    font-size: 0.875rem;
    line-height: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.select2-container.hbl-multiselect.select2-container--default .select2-selection--multiple .select2-selection__choice {
    display: inline-flex !important;
    align-items: center !important;
    gap: 4px !important;
    margin: 2px 0 !important;
    padding: 3px 8px !important;
    border: 1px solid #f4b08c !important;
    border-radius: 4px !important;
    background: #fff7f2 !important;
    color: #c44a0e !important;
    font-size: 0.78rem !important;
    font-weight: 600 !important;
    line-height: 1.3 !important;
    min-width: 0 !important;
    max-width: 100% !important;
    flex: 0 1 auto;
    overflow: hidden !important;
}

.select2-container.hbl-multiselect.select2-container--default .select2-selection__choice__display {
    display: block !important;
    min-width: 0 !important;
    max-width: 100% !important;
    overflow: hidden !important;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.select2-container.hbl-multiselect.select2-container--default .select2-selection__choice__remove {
    border: 0 !important;
    background: transparent !important;
    color: #c44a0e !important;
    opacity: 0.8;
    padding: 0 !important;
    margin: 0 !important;
    line-height: 1 !important;
    position: static !important;
}

.select2-container.hbl-multiselect.select2-container--default .select2-selection__choice__remove:hover {
    color: #f15e22 !important;
    opacity: 1;
}

.select2-container.hbl-multiselect.select2-container--default .select2-search--inline .select2-search__field {
    margin-top: 0 !important;
    min-width: 20px;
    width: 20px !important;
    font-size: 0.875rem !important;
    color: var(--hbl-sel-text) !important;
    background: transparent !important;
    border: 0 !important;
    outline: none !important;
    box-shadow: none !important;
    padding: 0 !important;
}

.select2-container.hbl-multiselect.select2-container--default .select2-selection--multiple .select2-search--inline {
    display: none !important;
}

.select2-container.hbl-multiselect.hbl-multiselect-empty-state .select2-selection--multiple .select2-search--inline,
.select2-container.hbl-multiselect.hbl-multiselect-empty-state .select2-selection--multiple .select2-search--inline .select2-search__field {
    display: none !important;
    width: 0 !important;
    min-width: 0 !important;
    max-width: 0 !important;
    padding: 0 !important;
    margin: 0 !important;
    border: 0 !important;
    opacity: 0 !important;
    overflow: hidden !important;
}

.select2-container.hbl-multiselect.select2-container--default .select2-selection--multiple .select2-selection__clear {
    position: absolute;
    top: 50%;
    right: 10px;
    transform: translateY(-50%);
    float: none !important;
    margin: 0 !important;
    padding: 0 4px !important;
    color: var(--hbl-sel-muted) !important;
    font-size: 1rem !important;
    line-height: 1 !important;
    z-index: 2;
}

.select2-container.hbl-multiselect.select2-container--default .select2-selection--multiple .select2-selection__clear:hover {
    color: var(--hbl-sel-orange) !important;
}

.select2-container.hbl-multiselect.hbl-multiselect-summary-active .select2-selection__choice ~ .select2-selection__choice {
    display: none !important;
}

.select2-container.hbl-multiselect .hbl-multiselect-summary-count {
    display: inline-flex;
    align-items: center;
    flex: 0 0 auto;
    margin: 2px 0 !important;
    color: #c44a0e !important;
    font-size: 0.78rem;
    font-weight: 600;
    white-space: nowrap;
}

.hbl-select-dropdown.select2-dropdown,
.hbl-multiselect-dropdown.select2-dropdown {
    border: 1px solid var(--hbl-sel-border) !important;
    border-radius: 6px !important;
    background: var(--hbl-sel-bg) !important;
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.12) !important;
    overflow: hidden;
    z-index: var(--hbl-sel-dropdown-z) !important;
}

.hbl-select-dropdown .select2-search--dropdown,
.hbl-multiselect-dropdown .select2-search--dropdown {
    position: relative;
    padding: 8px !important;
    border-bottom: 1px solid #f3f4f6 !important;
    background: inherit;
}

.hbl-select-dropdown .select2-search--dropdown:before,
.hbl-multiselect-dropdown .select2-search--dropdown:before {
    content: "\f002" !important;
    font-family: "Font Awesome 5 Pro" !important;
    font-weight: 300 !important;
    position: absolute;
    left: 20px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--hbl-sel-muted) !important;
    display: block !important;
    pointer-events: none;
    z-index: 1;
}

.hbl-select-dropdown .select2-search--dropdown .select2-search__field,
.hbl-multiselect-dropdown .select2-search--dropdown .select2-search__field {
    width: 100% !important;
    padding: 6px 12px 6px 34px !important;
    border: 1px solid var(--hbl-sel-border) !important;
    border-radius: 4px !important;
    background: var(--hbl-sel-bg) !important;
    color: var(--hbl-sel-text) !important;
    font-size: 0.875rem !important;
    outline: none !important;
    box-shadow: none !important;
    appearance: none !important;
    -webkit-appearance: none !important;
}

.hbl-select-dropdown .select2-search--dropdown .select2-search__field::-webkit-search-decoration,
.hbl-select-dropdown .select2-search--dropdown .select2-search__field::-webkit-search-cancel-button,
.hbl-multiselect-dropdown .select2-search--dropdown .select2-search__field::-webkit-search-decoration,
.hbl-multiselect-dropdown .select2-search--dropdown .select2-search__field::-webkit-search-cancel-button {
    -webkit-appearance: none;
    appearance: none;
}

.hbl-select-dropdown .select2-search--dropdown .select2-search__field:focus,
.hbl-multiselect-dropdown .select2-search--dropdown .select2-search__field:focus {
    border-color: var(--hbl-sel-orange) !important;
    box-shadow: 0 0 0 0.1rem var(--hbl-sel-focus-ring) !important;
}

.hbl-select-dropdown .select2-results__option,
.hbl-multiselect-dropdown .select2-results__option {
    position: relative;
    padding: 0.55rem 2.2rem 0.55rem 0.85rem !important;
    color: var(--hbl-sel-text) !important;
    background: var(--hbl-sel-bg) !important;
    font-size: 0.875rem !important;
}

.hbl-select-dropdown .select2-results__option--highlighted:not([aria-disabled="true"]),
.hbl-multiselect-dropdown .select2-results__option--highlighted:not([aria-disabled="true"]) {
    background: #fff3ed !important;
    color: var(--hbl-sel-orange-dark) !important;
}

.hbl-select-dropdown .select2-results__option[aria-selected="true"],
.hbl-multiselect-dropdown .select2-results__option[aria-selected="true"] {
    background: #ffe8d6 !important;
    color: var(--hbl-sel-orange-dark) !important;
    font-weight: 600 !important;
}

.hbl-multiselect-dropdown .select2-results__option[aria-selected="true"]::after {
    content: "\f00c";
    font-family: "Font Awesome 5 Pro" !important;
    font-weight: 700 !important;
    position: absolute;
    top: 50%;
    right: 0.85rem;
    transform: translateY(-50%);
    color: var(--hbl-sel-orange) !important;
    font-size: 0.82rem;
}

.hbl-select-dropdown .select2-results__option--highlighted[aria-selected="true"],
.hbl-multiselect-dropdown .select2-results__option--highlighted[aria-selected="true"] {
    background: #ffd8bf !important;
    color: var(--hbl-sel-orange-dark) !important;
}

.hbl-select-dropdown .select2-results__option[aria-disabled="true"],
.hbl-multiselect-dropdown .select2-results__option[aria-disabled="true"],
.hbl-select-dropdown .select2-results__option.select2-results__message,
.hbl-multiselect-dropdown .select2-results__option.select2-results__message {
    color: var(--hbl-sel-muted) !important;
}

.hbl-multiselect-dropdown .hbl-multiselect-dropdown-footer {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    padding: 8px 10px !important;
    border-top: 1px solid #f3f4f6 !important;
    background: inherit;
}

.hbl-multiselect-dropdown .select2-results > .select2-results__options {
    max-height: 260px !important;
    overscroll-behavior: contain;
}

.hbl-multiselect-dropdown .hbl-multiselect-dropdown-clear {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 0 !important;
    border: 0 !important;
    background: transparent !important;
    color: var(--hbl-sel-orange-dark) !important;
    font-size: 0.82rem !important;
    font-weight: 600 !important;
    line-height: 1.2 !important;
    box-shadow: none !important;
}

.hbl-multiselect-dropdown .hbl-multiselect-dropdown-clear:hover {
    color: var(--hbl-sel-orange) !important;
}

body.mod-skin-dark:not(.mod-skin-light) .select2-container.hbl-select.select2-container--default .select2-selection--single,
body.mod-skin-dark:not(.mod-skin-light) .select2-container.hbl-multiselect.select2-container--default .select2-selection--multiple {
    background: #252830 !important;
    border-color: rgba(255, 255, 255, 0.12) !important;
}

body.mod-skin-dark:not(.mod-skin-light) .select2-container.hbl-select.select2-container--default .select2-selection--single .select2-selection__rendered,
body.mod-skin-dark:not(.mod-skin-light) .select2-container.hbl-multiselect.select2-container--default .select2-search--inline .select2-search__field {
    color: #dfe7f2 !important;
}

body.mod-skin-dark:not(.mod-skin-light) .select2-container.hbl-select.select2-container--default .select2-selection--single .select2-selection__placeholder,
body.mod-skin-dark:not(.mod-skin-light) .select2-container.hbl-multiselect.select2-container--default .select2-selection--multiple .select2-selection__placeholder,
body.mod-skin-dark:not(.mod-skin-light) .select2-container.hbl-select.select2-container--default .select2-selection--single .select2-selection__clear {
    color: #93a4bb !important;
}

body.mod-skin-dark:not(.mod-skin-light) .select2-container.hbl-multiselect .hbl-multiselect-empty-placeholder {
    color: #93a4bb !important;
}

body.mod-skin-dark:not(.mod-skin-light) .select2-container.hbl-select.select2-container--default .select2-selection--single .select2-selection__arrow b {
    border-color: #a0aec0 transparent transparent transparent !important;
}

body.mod-skin-dark:not(.mod-skin-light) .select2-container.hbl-select.select2-container--open .select2-selection--single .select2-selection__arrow b {
    border-color: transparent transparent #a0aec0 transparent !important;
}

body.mod-skin-dark:not(.mod-skin-light) .select2-container.hbl-multiselect.select2-container--default .select2-selection--multiple .select2-selection__choice {
    background: rgba(241, 94, 34, 0.18) !important;
    border-color: #c44a0e !important;
    color: #ffb993 !important;
}

body.mod-skin-dark:not(.mod-skin-light) .select2-container.hbl-multiselect .hbl-multiselect-summary-count,
body.mod-skin-dark:not(.mod-skin-light) .select2-container.hbl-multiselect.select2-container--default .select2-selection__choice__remove {
    color: #ffb993 !important;
}

body.mod-skin-dark:not(.mod-skin-light) .hbl-select-dropdown.select2-dropdown,
body.mod-skin-dark:not(.mod-skin-light) .hbl-multiselect-dropdown.select2-dropdown {
    background: #1f2129 !important;
    border-color: rgba(255, 255, 255, 0.1) !important;
    box-shadow: 0 10px 26px rgba(0, 0, 0, 0.35) !important;
}

body.mod-skin-dark:not(.mod-skin-light) .hbl-select-dropdown .select2-search--dropdown,
body.mod-skin-dark:not(.mod-skin-light) .hbl-multiselect-dropdown .select2-search--dropdown {
    border-bottom-color: rgba(255, 255, 255, 0.08) !important;
}

body.mod-skin-dark:not(.mod-skin-light) .hbl-multiselect-dropdown .hbl-multiselect-dropdown-footer {
    border-top-color: rgba(255, 255, 255, 0.08) !important;
}

body.mod-skin-dark:not(.mod-skin-light) .hbl-select-dropdown .select2-search--dropdown .select2-search__field,
body.mod-skin-dark:not(.mod-skin-light) .hbl-multiselect-dropdown .select2-search--dropdown .select2-search__field {
    background: #252830 !important;
    border-color: rgba(255, 255, 255, 0.12) !important;
    color: #dfe7f2 !important;
}

body.mod-skin-dark:not(.mod-skin-light) .hbl-select-dropdown .select2-results__option,
body.mod-skin-dark:not(.mod-skin-light) .hbl-multiselect-dropdown .select2-results__option {
    background: #1f2129 !important;
    color: #dfe7f2 !important;
}

body.mod-skin-dark:not(.mod-skin-light) .hbl-select-dropdown .select2-results__option--highlighted:not([aria-disabled="true"]),
body.mod-skin-dark:not(.mod-skin-light) .hbl-multiselect-dropdown .select2-results__option--highlighted:not([aria-disabled="true"]) {
    background: rgba(241, 94, 34, 0.2) !important;
    color: #fff3ed !important;
}

body.mod-skin-dark:not(.mod-skin-light) .hbl-select-dropdown .select2-results__option[aria-selected="true"],
body.mod-skin-dark:not(.mod-skin-light) .hbl-multiselect-dropdown .select2-results__option[aria-selected="true"] {
    background: rgba(241, 94, 34, 0.28) !important;
    color: #fff3ed !important;
}

body.mod-skin-dark:not(.mod-skin-light) .hbl-multiselect-dropdown .hbl-multiselect-dropdown-clear {
    color: #ffbd97 !important;
}
