/* =====================================================================
   Select2 — BYS design-system theme
   Loaded after select2.min.css so these rules win on equal specificity.
   ===================================================================== */

/* ── Selection box (the visible "input" area) ─────────────────────── */

.select2-container--default .select2-selection--multiple {
    background-color: #f0f2f0;
    border: 1px solid #c2c8bf;
    border-radius: 0.75rem;
    min-height: 42px;
    padding: 4px 6px 2px;
    cursor: text;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

/* Focus ring */
.select2-container--default.select2-container--focus .select2-selection--multiple {
    border-color: #44664a;
    box-shadow: 0 0 0 4px rgba(118, 154, 122, 0.14);
    outline: none;
}

/* When open — keep focus ring, square off the bottom corners if below */
.select2-container--default.select2-container--open .select2-selection--multiple {
    border-color: #44664a;
    box-shadow: 0 0 0 4px rgba(118, 154, 122, 0.14);
}
.select2-container--default.select2-container--open.select2-container--below .select2-selection--multiple {
    border-bottom-left-radius: 0;
    border-bottom-right-radius: 0;
}
.select2-container--default.select2-container--open.select2-container--above .select2-selection--multiple {
    border-top-left-radius: 0;
    border-top-right-radius: 0;
}

/* ── Selected tag pills ───────────────────────────────────────────── */

.select2-container--default .select2-selection--multiple .select2-selection__choice {
    background-color: #dae2d9;
    border: none;
    border-radius: 99px;
    color: #2d4e33;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-family: Manrope, Gadugi, sans-serif;
    font-size: 0.75rem;
    font-weight: 700;
    line-height: 1;
    padding: 4px 8px 4px 10px;
    margin: 2px 3px 2px 0;
}

/* Remove (×) button on each pill */
.select2-container--default .select2-selection--multiple .select2-selection__choice__remove {
    background: none;
    border: none;
    color: #44664a;
    font-size: 0.875rem;
    font-weight: 700;
    line-height: 1;
    padding: 0;
    margin: 0;
    order: 2;
    opacity: 0.65;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
}
.select2-container--default .select2-selection--multiple .select2-selection__choice__remove:hover {
    color: #191c1c;
    opacity: 1;
    background: none;
}

/* ── Inline search field (inside the selection box) ──────────────── */

.select2-container--default .select2-selection--multiple .select2-search__field {
    font-family: Manrope, Gadugi, sans-serif;
    font-size: 0.875rem;
    font-weight: 500;
    color: #191c1c;
    margin: 2px 0;
}
.select2-container--default .select2-selection--multiple .select2-search__field::placeholder {
    color: #727971;
}

/* ── Dropdown panel ───────────────────────────────────────────────── */

.select2-dropdown {
    background-color: #fff;
    border: 1px solid #c2c8bf;
    border-radius: 0.75rem;
    box-shadow: 0 8px 28px rgba(44, 51, 45, 0.12);
    overflow: hidden;
    font-family: Manrope, Gadugi, sans-serif;
}

/* When the dropdown opens below, flatten the top corners to join the input */
.select2-container--open.select2-container--below .select2-dropdown--below {
    border-top: none;
    border-top-left-radius: 0;
    border-top-right-radius: 0;
}
.select2-container--open.select2-container--above .select2-dropdown--above {
    border-bottom: none;
    border-bottom-left-radius: 0;
    border-bottom-right-radius: 0;
}

/* Search box inside dropdown */
.select2-search--dropdown {
    padding: 8px 10px;
    background: #f9f9f8;
    border-bottom: 1px solid #e1e3e2;
}
.select2-search--dropdown .select2-search__field {
    border: 1px solid #c2c8bf;
    border-radius: 0.5rem;
    padding: 6px 10px;
    width: 100%;
    font-family: Manrope, Gadugi, sans-serif;
    font-size: 0.875rem;
    font-weight: 500;
    color: #191c1c;
    background: #fff;
    outline: none;
    box-sizing: border-box;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.select2-search--dropdown .select2-search__field:focus {
    border-color: #44664a;
    box-shadow: 0 0 0 3px rgba(118, 154, 122, 0.14);
}

/* ── Options list ─────────────────────────────────────────────────── */

.select2-results__options {
    padding: 4px;
}

.select2-results__option {
    font-family: Manrope, Gadugi, sans-serif;
    font-size: 0.875rem;
    font-weight: 500;
    color: #191c1c;
    padding: 8px 10px;
    border-radius: 0.5rem;
    cursor: pointer;
}

/* Highlighted (keyboard / hover) */
.select2-container--default .select2-results__option--highlighted[aria-selected],
.select2-container--default .select2-results__option--highlighted.select2-results__option--selectable {
    background-color: #edf3ed;
    color: #44664a;
}

/* Already selected */
.select2-container--default .select2-results__option[aria-selected="true"] {
    background-color: #dae2d9;
    color: #2d4e33;
    font-weight: 700;
}

/* No-results message */
.select2-results__option.select2-results__message {
    color: #596059;
    font-style: italic;
    cursor: default;
}
