.select2-container .select2-selection--single {
    padding: 10px;
    border-radius: 8px !important;
    height: 48px !important;
    outline: none;
    display: flex;
    align-items: center;
}

.select2 {
    border-radius: 0;
    box-shadow: none;
    height: 45px;
    font-weight: 400;
    font-size: 12px;
    outline: none;
    width: 100%;
    display: block
}

.select2:focus {
    box-shadow: none;
    border: 1px solid #000;
}


.select2-container .select2-selection--single {
    height: 45px;
    border-radius: 0;
    padding: 10px;
    font-weight: 400;
    font-size: 12px;
    color: #000;
}

.select2-container .select2-results__option {
    color: #000 !important;
}

.select2-container--focus .select2-selection--single {
    border: 1px solid #000;
    box-shadow: none;
}

.select2-container--default .select2-selection--single .select2-selection__arrow {
    border-color: #000 !important;
    border-width: 5px 4px 0 4px;
    width: 20px;
    height: 10px;
    top: 50%;
    transform: translateY(-50%);
}

.select2-dropdown {
    border-radius: 0;
    box-shadow: none;
    border: 1px solid #000;
}

.select2-container .select2-results__option--highlighted {
    background-color: #f2f2f2;
}
.select2-container--default .select2-results__option--highlighted[aria-selected] {
    background-color: #000000;
    color: white !important;
}
.select2-container .select2-results__option {
    color: #000 !important;
}

.select2-container--default .select2-selection--single {
    background-color: #fff !important;
    border: 1px solid #e0e0e0 !important;
    border-radius: 8px !important; /* Мобільний радіус */
    height: 48px !important;       /* Мобільна висота */
    transition: all 0.2s;
    outline: none;
    display: flex;
    align-items: center;
    position: relative !important; /* Важливо для нашої нової стрілочки */
}

/* Стан при фокусі/відкритті */
.select2-container--default.select2-container--open .select2-selection--single,
.select2-container--default.select2-container--focus .select2-selection--single {
    border-color: #333 !important;
}

/* 2. Текст всередині поля */
.select2-container--default .select2-selection--single .select2-selection__rendered {
    color: #333 !important;
    font-size: 14px;
    line-height: normal !important;
    padding-left: 15px !important;
    padding-right: 40px !important; /* Відступ для стрілочки */
    width: 100%;
}

/* Плейсхолдер */
.select2-container--default .select2-selection--single .select2-selection__placeholder {
    color: #666 !important;
}

/* 3. Кастомна Стрілочка */
/* Повністю ховаємо глючну рідну стрілку Select2 */
.select2-container--default .select2-selection--single .select2-selection__arrow {
    display: none !important;
}

/* Малюємо власну стрілку через псевдоелемент */
.select2-container--default .select2-selection--single::after {
    content: "";
    position: absolute !important;
    right: 15px !important;
    top: 50% !important;
    transform: translateY(-50%);
    width: 12px !important;
    height: 8px !important;
    background-image: url("data:image/svg+xml,%3Csvg width='14' height='8' viewBox='0 0 14 8' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1L7 7L13 1' stroke='%23333333' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") !important;
    background-repeat: no-repeat !important;
    background-position: center !important;
    background-size: contain !important;
    transition: transform 0.3s ease !important;
    pointer-events: none !important; /* Клік проходить крізь стрілку */
}

/* Перевертаємо нашу стрілку при відкритті списку */
.select2-container--default.select2-container--open .select2-selection--single::after {
    transform: translateY(-50%) rotate(180deg) !important;
}

/* ========================================
   ЛОГІКА ВІДКРИТТЯ СПИСКУ (ВНИЗ / ВГОРУ)
   ======================================== */

/* --- ВІДКРИТТЯ ВНИЗ (Стандартне) --- */
.select2-container--default.select2-container--open.select2-container--below .select2-selection--single {
    border-bottom-left-radius: 0 !important;
    border-bottom-right-radius: 0 !important;
    border-top-left-radius: 8px !important;
    border-top-right-radius: 8px !important;
}

.select2-dropdown.select2-dropdown--below {
    border: 1px solid #333 !important;
    border-top: none !important;
    border-radius: 0 0 8px 8px !important;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1) !important;
    background-color: #fff !important;
    z-index: 9999 !important;
    overflow: hidden !important; /* Обрізаємо квадратні внутрішні кути */
}

/* --- ВІДКРИТТЯ ВГОРУ (Коли мало місця) --- */
.select2-container--default.select2-container--open.select2-container--above .select2-selection--single {
    border-top-left-radius: 0 !important;
    border-top-right-radius: 0 !important;
    border-bottom-left-radius: 8px !important;
    border-bottom-right-radius: 8px !important;
}

.select2-dropdown.select2-dropdown--above {
    border: 1px solid #333 !important;
    border-bottom: none !important;
    border-radius: 8px 8px 0 0 !important;
    box-shadow: 0 -8px 16px rgba(0, 0, 0, 0.1) !important;
    background-color: #fff !important;
    z-index: 9999 !important;
    overflow: hidden !important;
}

/* ========================================
   ВНУТРІШНОСТІ СПИСКУ
   ======================================== */

/* Поле пошуку */
.select2-search--dropdown {
    padding: 10px 15px !important;
}

.select2-search--dropdown .select2-search__field {
    border: 1px solid #e0e0e0 !important;
    border-radius: 6px !important;
    padding: 8px 12px !important;
    font-size: 14px !important;
    outline: none !important;
    transition: border-color 0.2s;
}

.select2-search--dropdown .select2-search__field:focus {
    border-color: #333 !important;
}

/* Варіанти вибору (Options) */
.select2-container--default .select2-results__option {
    padding: 12px 15px !important;
    font-size: 14px !important;
    color: #333 !important;
    transition: background 0.2s;
}

/* Наведення */
.select2-container--default .select2-results__option--highlighted[aria-selected],
.select2-container--default .select2-results__option--highlighted.select2-results__option--selectable {
    background-color: #f3f4f6 !important;
    color: #333 !important;
}

/* Вибраний пункт */
.select2-container--default .select2-results__option[aria-selected="true"] {
    background-color: #f9fafb !important;
    font-weight: 600 !important;
    color: #1a1a1a !important;
}

@media (min-width: 768px) {
    .select2-container--default .select2-selection--single .select2-selection__rendered {
        font-size: 15px !important;
    }

    /* Десктопні радіуси */
    .select2-container--default.select2-container--open.select2-container--below .select2-selection--single {
        border-top-left-radius: 6px !important;
        border-top-right-radius: 6px !important;
    }
    .select2-dropdown.select2-dropdown--below {
        border-radius: 0 0 6px 6px !important;
    }

    .select2-container--default.select2-container--open.select2-container--above .select2-selection--single {
        border-bottom-left-radius: 6px !important;
        border-bottom-right-radius: 6px !important;
    }
    .select2-dropdown.select2-dropdown--above {
        border-radius: 6px 6px 0 0 !important;
    }

    /* Шрифти на десктопі */
    .select2-container--default .select2-results__option,
    .select2-search--dropdown .select2-search__field {
        font-size: 15px !important;
    }
}