/* =========================
   Global & Container
   ========================= */
.select2-container {
    width: 100% !important;
    font-size: 0.875rem; /* text-sm */
    line-height: 1.25rem;
}

/* Dropdown (panel) */
.select2-container .select2-dropdown {
    width: 100% !important;
    left: 0 !important;
    border: 1px solid #e5e7eb; /* gray-200 */
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.08);
}

.select2-results__options {
    max-height: 280px;
}
.select2-results__option {
    padding: 10px 12px;
    font-size: 0.875rem;
}
.select2-results__option--highlighted.select2-results__option--selectable {
    background-color: #eff6ff; /* blue-50 */
    color: #1f2937; /* gray-800 */
}
.select2-results__option--selected {
    background-color: #e5e7eb; /* gray-200 */
    color: #111827; /* gray-900 */
}

/* Z-index dropdown */
.select2-container--open {
    z-index: 9999;
}

/* =========================
   SINGLE selection
   ========================= */
.select2-container--default .select2-selection--single {
    height: 44px;
    border: 1px solid #e5e7eb; /* gray-200 */
    border-radius: 12px;
    background-color: #fff;
    display: flex;
    align-items: center;
    padding: 0;
    transition:
        border-color 0.15s ease,
        box-shadow 0.15s ease;
}
.select2-container--default
    .select2-selection--single
    .select2-selection__rendered {
    padding-left: 8px;
    padding-right: 30px; /* ruang arrow */
    color: #111827;
}
.select2-container--default
    .select2-selection--single
    .select2-selection__placeholder {
    color: #9ca3af; /* gray-400 */
}
.select2-container--default
    .select2-selection--single
    .select2-selection__arrow {
    position: absolute;
    right: 10px;
    top: 0;
    height: 100%;
    width: 24px;
}

/* Focus ring */
.select2-container--default.select2-container--focus .select2-selection--single,
.select2-container--default .select2-selection--single:focus {
    border-color: #93c5fd; /* blue-300 */
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.25);
    outline: none;
}

/* Disabled */
.select2-container--default.select2-container--disabled
    .select2-selection--single {
    background-color: #f9fafb; /* gray-50 */
    color: #9ca3af;
    cursor: not-allowed;
}

/* Sembunyikan ikon clear bawaan */
.select2-container--default
    .select2-selection--single
    .select2-selection__clear {
    display: none !important;
}

/* =========================
   MULTIPLE (tags) selection
   ========================= */
.select2-container--default .select2-selection--multiple {
    min-height: 44px; /* samakan tinggi dasar dengan .kt-input */
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    background-color: #fff;
    padding: 6px 10px; /* ruang dalam */
    display: flex;
    align-items: center;
    transition:
        border-color 0.15s ease,
        box-shadow 0.15s ease;
}

/* Area render = flex wrap (chip + search inline) */
.select2-container--default
    .select2-selection--multiple
    .select2-selection__rendered {
    display: flex;
    flex-wrap: wrap;
    gap: 8px; /* jarak antar chip */
    margin: 0; /* hapus negative margin bawaan */
    padding: 0;
    width: 100%;
    align-items: center;
}

/* Chip item */
.select2-container--default
    .select2-selection--multiple
    .select2-selection__choice {
    margin: 0; /* reset bawaan */
    padding: 6px 10px 6px 8px; /* ruang teks */
    border-radius: 10px;
    border: 1px solid #e5e7eb;
    background-color: #f3f4f6; /* gray-100 */
    color: #111827;
    display: inline-flex;
    align-items: center;
    gap: 6px; /* jarak antara × dan teks */
    line-height: 1.25rem;
}

/* Tombol × di chip — sejajarkan vertikal & rapikan ukuran */
.select2-container--default
    .select2-selection--multiple
    .select2-selection__choice__remove {
    position: static; /* hilangkan posisi absolut bawaan */
    order: 0; /* tampil sebelum teks */
    font-size: 16px; /* sedikit lebih besar agar jelas */
    line-height: 1; /* center vertical */
    height: 16px;
    width: 16px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #6b7280; /* gray-500 */
    margin: 0 2px 0 0;
    padding: 0;
    cursor: pointer;
}
.select2-container--default
    .select2-selection--multiple
    .select2-selection__choice__remove:hover {
    color: #111827;
}

/* Field pencarian inline (di dalam multiple) */
.select2-container--default
    .select2-selection--multiple
    .select2-search--inline
    .select2-search__field {
    height: 28px;
    min-width: 6ch; /* biar keliatan kursor */
    margin: 0;
    padding: 0;
    border: none !important;
    outline: none !important;
    box-shadow: none !important;
    background: transparent;
    line-height: 28px;
    color: #111827;
}

/* Focus ring multiple */
.select2-container--default.select2-container--focus
    .select2-selection--multiple,
.select2-container--default .select2-selection--multiple:focus {
    border-color: #93c5fd;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.25);
    outline: none;
}

/* Disabled multiple */
.select2-container--default.select2-container--disabled
    .select2-selection--multiple {
    background-color: #f9fafb;
    color: #9ca3af;
    cursor: not-allowed;
}

/* =========================
   Search box di dropdown
   ========================= */
.select2-container .select2-search--dropdown .select2-search__field {
    height: 40px;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    padding: 8px 10px;
    outline: none;
}
