/* ── Select2 "dc" theme — matches .dc-input outlined style ──────────── */

.select2-container--dc {
    width: 100% !important;
    font-family: var(--dc-font-body);
    font-size: var(--dc-text-base);
}

/* ── Single selection container ────────────────────────────────────── */
.select2-container--dc .select2-selection--single {
    height: auto;
    padding: 0.5rem 2.25rem 0.5rem 0.875rem;
    background: var(--dc-surface);
    border: 1.5px solid var(--dc-border);
    border-radius: var(--dc-radius);
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
}
.select2-container--dc.select2-container--focus .select2-selection--single,
.select2-container--dc.select2-container--open .select2-selection--single {
    border-color: var(--dc-border-focus);
    box-shadow: 0 0 0 3px rgba(124,90,199,0.15);
}

/* Rendered text */
.select2-container--dc .select2-selection--single .select2-selection__rendered {
    padding: 0;
    color: var(--dc-text-body);
    font-family: var(--dc-font-body);
    font-size: var(--dc-text-base);
    line-height: 1.5;
}
.select2-container--dc .select2-selection--single .select2-selection__placeholder {
    color: var(--dc-text-muted);
}

/* Arrow */
.select2-container--dc .select2-selection--single .select2-selection__arrow {
    height: 100%;
    top: 0;
    right: 0.75rem;
    width: 20px;
}
.select2-container--dc .select2-selection--single .select2-selection__arrow b {
    border-color: var(--dc-text-muted) transparent transparent;
    border-width: 5px 4px 0;
    margin-top: -3px;
    margin-left: -4px;
}
.select2-container--dc.select2-container--open .select2-selection__arrow b {
    border-color: transparent transparent var(--dc-text-muted);
    border-width: 0 4px 5px;
    margin-top: -8px;
}

/* Clear button */
.select2-container--dc .select2-selection__clear {
    float: right;
    color: var(--dc-text-muted);
    font-size: 1rem;
    line-height: 1;
    margin-right: 1.25rem;
    margin-top: 0;
    cursor: pointer;
}
.select2-container--dc .select2-selection__clear:hover { color: var(--dc-danger); }

/* ── Dropdown ───────────────────────────────────────────────────────── */
.select2-container--dc .select2-dropdown {
    background: var(--dc-surface);
    border: 1.5px solid var(--dc-border-focus);
    border-radius: var(--dc-radius);
    box-shadow: var(--dc-shadow-3);
    overflow: hidden;
}
.select2-container--dc .select2-dropdown--below {
    border-top: none;
    border-top-left-radius: 0;
    border-top-right-radius: 0;
}
.select2-container--dc .select2-dropdown--above {
    border-bottom: none;
    border-bottom-left-radius: 0;
    border-bottom-right-radius: 0;
}

/* Search field inside dropdown */
.select2-container--dc .select2-search--dropdown {
    padding: 0.5rem;
    border-bottom: 1px solid var(--dc-border);
}
.select2-container--dc .select2-search--dropdown .select2-search__field {
    width: 100%;
    padding: 0.375rem 0.625rem;
    border: 1.5px solid var(--dc-border);
    border-radius: var(--dc-radius);
    font-family: var(--dc-font-body);
    font-size: var(--dc-text-sm);
    color: var(--dc-text-body);
    background: var(--dc-surface);
    outline: none;
}
.select2-container--dc .select2-search--dropdown .select2-search__field:focus {
    border-color: var(--dc-border-focus);
    box-shadow: 0 0 0 2px rgba(124,90,199,0.12);
}

/* Results list */
.select2-container--dc .select2-results__options { max-height: 220px; overflow-y: auto; }

.select2-container--dc .select2-results__option {
    padding: 0.5rem 0.875rem;
    font-family: var(--dc-font-body);
    font-size: var(--dc-text-sm);
    color: var(--dc-text-body);
    cursor: pointer;
    transition: background 0.1s;
}
.select2-container--dc .select2-results__option--highlighted {
    background: var(--dc-surface-2);
    color: var(--dc-text-primary);
}
.select2-container--dc .select2-results__option--selected {
    background: var(--dc-primary-bg);
    color: var(--dc-primary);
    font-weight: var(--dc-weight-medium);
}
.select2-container--dc .select2-results__option[aria-disabled="true"] {
    color: var(--dc-text-disabled);
    cursor: not-allowed;
}

/* When container opens and selection is single — remove bottom radius */
.select2-container--dc.select2-container--open.select2-container--below .select2-selection--single {
    border-bottom-color: var(--dc-border-focus);
    border-bottom-left-radius: 0;
    border-bottom-right-radius: 0;
}
.select2-container--dc.select2-container--open.select2-container--above .select2-selection--single {
    border-top-left-radius: 0;
    border-top-right-radius: 0;
}
