/* VacancyDubai.ae — shared Select2 style (all searchable dropdowns) */
/*
   Palette A, 2026-10-20. This file kept the pre-Palette slate/blue set
   long after the sweep: #0357e9 (the legacy brand blue), #e2e8f0,
   #e8edf5, #f3f7ff, #eaf1ff, #334155, #1f2937, #94a3b8, #dbe3ee and a
   slate shadow. Only the placeholder grey at the foot of the file had
   been corrected. Radii are on the --r-* scale now as well; 10px and
   14px were off it.

   Loaded from layouts/app.blade.php only, so --uae-* resolves. Do NOT
   add it to an admin view: that panel is themed from --theme-* and these
   variables would silently resolve to nothing.
*/
.select2-container {
    width: 100% !important;
}

.select2-container--default .select2-selection--single {
    height: 44px;
    border: 1px solid var(--uae-line);
    border-radius: var(--r-control);
    padding: 6px 8px;
    background: var(--uae-surface);
}

.select2-container--default.select2-container--focus .select2-selection--single,
.select2-container--default.select2-container--open .select2-selection--single {
    border-color: var(--uae-primary);
    box-shadow: 0 0 0 3px rgba(var(--uae-primary-rgb), .12);
}

.select2-container--default .select2-selection--single .select2-selection__rendered {
    line-height: 28px;
    color: var(--uae-ink);
    padding-left: 4px;
}

.select2-container--default .select2-selection--single .select2-selection__placeholder {
    color: var(--uae-muted);
}

.select2-container--default .select2-selection--single .select2-selection__arrow {
    height: 42px;
    right: 6px;
}

.select2-container--default .select2-selection--single .select2-selection__clear {
    height: 42px;
    margin-right: 18px;
    color: var(--uae-muted);
}

.select2-container--default .select2-selection--multiple {
    min-height: 44px;
    border: 1px solid var(--uae-line);
    border-radius: var(--r-control);
}

.select2-container--open {
    z-index: 20050 !important;
}

body > .select2-container {
    z-index: 20050 !important;
}

.select2-dropdown,
.select2-dropdown.jp-select2-dropdown,
.select2-container--open .select2-dropdown {
    z-index: 20050 !important;
    border: 1px solid var(--uae-line);
    border-radius: var(--r-card);
    overflow: hidden;
    /* kept: a standalone dropdown should read as a layer above its field.
       The hero search bar is the one place that wants no seam, and
       main.css overrides this for .vd-bar-panel there. */
    margin-top: 6px;
    padding: 8px;
    background: var(--uae-surface);
    box-shadow: var(--shadow-pop);
}

.select2-search--dropdown {
    padding: 0 0 8px;
    position: relative;
}

.select2-search--dropdown:before {
    content: '';
    position: absolute;
    left: 14px;
    top: 50%;
    width: 14px;
    height: 14px;
    margin-top: -11px;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' fill='none' stroke='%235a6472' stroke-width='2' viewBox='0 0 24 24'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='M20 20l-3-3'/%3E%3C/svg%3E") no-repeat center;
    pointer-events: none;
    z-index: 2;
}

.select2-search--dropdown .select2-search__field {
    border: 1px solid var(--uae-line) !important;
    border-radius: var(--r-control) !important;
    padding: 10px 12px 10px 38px !important;
    font-size: 14px;
    color: var(--uae-ink);
    outline: none;
    box-shadow: none;
    background: var(--uae-sand);
    width: 100% !important;
}

.select2-search--dropdown .select2-search__field:focus {
    border-color: var(--uae-primary) !important;
    background: var(--uae-surface);
    box-shadow: 0 0 0 3px rgba(var(--uae-primary-rgb), .1);
}

.select2-results > .select2-results__options {
    max-height: 280px;
    padding: 2px 0;
}

.select2-container--default .select2-results__option {
    padding: 10px 12px;
    border-radius: var(--r-control);
    margin: 2px 0;
    font-size: 14px;
    font-weight: 500;
    color: var(--uae-body);
    line-height: 1.4;
}

.select2-container--default .select2-results__option--highlighted.select2-results__option--selectable,
.select2-container--default .select2-results__option--highlighted[aria-selected] {
    background: var(--uae-primary-wash);
    color: var(--uae-primary);
}

.select2-container--default .select2-results__option[aria-selected="true"] {
    background: var(--uae-primary-wash);
    color: var(--uae-primary-deep);
    font-weight: 600;
}

.select2-container--default .select2-results__option[aria-selected="true"].select2-results__option--highlighted {
    background: var(--uae-primary);
    color: #fff;
}

.select2-container--default .select2-results__option--disabled,
.select2-container--default .select2-results__message {
    color: var(--uae-muted);
    background: transparent;
}

.select2-results__options::-webkit-scrollbar {
    width: 8px;
}
.select2-results__options::-webkit-scrollbar-track {
    background: transparent;
}
.select2-results__options::-webkit-scrollbar-thumb {
    background: var(--uae-line);
    border-radius: var(--r-pill);
}

/* Palette A: the theme default placeholder grey was 2.56:1 on white */
/* select2 sets this at three-class specificity, so match it */
.select2-container--default .select2-selection--single .select2-selection__placeholder,
.select2-container--default .select2-selection--multiple .select2-selection__placeholder { color: var(--uae-muted); }
