/*
 * Select2 appearance fixes — ported from mmcxchange.
 * -----------------------------------------------------------------------------
 * Loaded once for the whole admin instead of being pasted into individual views
 * (it was previously only in create_partner.php, so every other screen still
 * showed the bug).
 *
 * 1. DOUBLE ARROW. Select2's default arrow is a CSS triangle on `b`, but the
 *    admin theme also attaches a chevron via `b::before` from an icon font.
 *    When that font is missing/blocked you get two arrows — or a stray glyph.
 *    Kill the pseudo-element and draw one clean triangle.
 * 2. TEXT INDENT. The rendered value sat flush against the edge (and collided
 *    with the arrow on the right), so give it real breathing room.
 */

/* ── 1. One arrow only ─────────────────────────────────────────────────── */
.select2-container--default .select2-selection--single .select2-selection__arrow b::before,
.select2-container--default.select2-container--open .select2-selection--single .select2-selection__arrow b::before {
    display: none !important;
}
.select2-container--default .select2-selection--single .select2-selection__arrow b {
    border-color: #686868 transparent transparent transparent !important;
    border-style: solid !important;
    border-width: 5px 4px 0 4px !important;
    height: 0 !important;
    width: 0 !important;
    margin-top: -2px !important;
    margin-left: -4px !important;
    left: 50% !important;
    top: 50% !important;
    position: absolute !important;
}
.select2-container--default.select2-container--open .select2-selection--single .select2-selection__arrow b {
    border-color: transparent transparent #686868 transparent !important;
    border-width: 0 4px 5px 4px !important;
    margin-top: -4px !important;
}

/* ── 2. Text indent / alignment ────────────────────────────────────────── */
.select2-container--default .select2-selection--single {
    height: calc(1.5em + 0.75rem + 2px);
    border: 1px solid #e2e8f0;
    border-radius: 6px;
}
.select2-container--default .select2-selection--single .select2-selection__rendered {
    line-height: calc(1.5em + 0.75rem);
    padding-left: 12px;
    padding-right: 28px;   /* clear of the arrow */
    color: #1e293b;
}
.select2-container--default .select2-selection--single .select2-selection__placeholder {
    color: #94a3b8;
}
.select2-container--default .select2-selection--single .select2-selection__arrow {
    height: calc(1.5em + 0.75rem);
    right: 6px;
}

/* Multi-select: matching padding, and chips that read as chips. */
.select2-container--default .select2-selection--multiple {
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    padding: 2px 6px;
}
.select2-container--default .select2-selection--multiple .select2-selection__choice {
    background: #eef2ff;
    border: 1px solid #c7d2fe;
    color: #3730a3;
    border-radius: 4px;
    padding: 2px 8px;
    margin: 4px 4px 0 0;
}
.select2-container--default .select2-selection--multiple .select2-selection__choice__remove {
    color: #4f46e5;
    margin-right: 5px;
}

/* Dropdown list: readable rows, clear highlight. */
.select2-container--default .select2-results__option {
    padding: 8px 12px;
    font-size: .92rem;
}
.select2-container--default .select2-results__option--highlighted[aria-selected] {
    background-color: #4f46e5;
}
.select2-dropdown {
    border-color: #e2e8f0;
    border-radius: 6px;
}
.select2-search--dropdown .select2-search__field {
    padding: 7px 10px;
    border: 1px solid #e2e8f0;
    border-radius: 5px;
}

/* Inside Bootstrap input groups / modals select2 must not overflow. */
.select2-container { max-width: 100%; }
.modal .select2-container { z-index: 1056; }
