@layer components {
    .select2-container {
        /* The container where the selectbox is housing*/
        @apply relative box-border align-middle inline-block m-0;
    }

    .select2-container .select2-selection--single {
        /* Selection box itself */
        @apply box-border cursor-pointer block select-none border rounded-lg;
    }

    .select2-container .select2-selection--single .select2-selection__rendered {
        /* DIV inside Selection box with text, clear button and arrow down*/
        @apply block h-6 pl-1 pr-6 truncate;
    }

    .select2-container .select2-selection--single .select2-selection__clear {
        /* The DIV where the X is housing to clear the chosen option */
        @apply relative m-0;
    }

    .select2-container .select2-selection--multiple {
        @apply box-border overflow-hidden min-h-4 cursor-pointer block select-none;
    }

    .select2-container .select2-selection--multiple .select2-selection__rendered {
        @apply inline-block pl-2 truncate whitespace-nowrap !important;
    }

    .select2-container .select2-search--inline {
        /* Search box*/
        @apply float-left;
    }

    .select2-container .select2-search--inline .select2-search__field {
        @apply box-border border border-custom-grey-300 pl-1 my-1 w-full text-base;
    }

    .select2-container .select2-search--inline .select2-search__field::-webkit-search-cancel-button {
        @apply appearance-none;
    }

    .select2-dropdown {
        /* Dropdown area after the arrow down is clicked */
        @apply absolute block w-full !box-border bg-white !border !border-custom-grey-300 rounded-lg outline-none placeholder-custom-grey-500 float-left;
        z-index: 99;
    }

    .select2-results {
        @apply block text-black;
    }

    .select2-results__options {
        @apply list-none m-0 p-0;
    }

    .select2-results__option {
        /* The rows with results that you see after dropdown.
        Increase p-1 to p-2 to have more space between results */
        @apply p-1 select-none;
    }

    .select2-results__option[aria-selected] {
        @apply cursor-pointer;
    }

    .select2-container--open .select2-dropdown {
        /* Dropdown container opened and results are shown*/
        @apply mt-0 left-0;
    }

    .select2-container--open .select2-dropdown--above {
        /* The left and right borders of the option rows */
        @apply rounded-lg border-custom-grey-300 shadow;
    }

    .select2-container--open .select2-dropdown--below {
        /* The left and right borders of the option rows */
        @apply rounded-lg border-custom-grey-300 shadow;
    }

    .select2-search--dropdown {
        /* Search dropdown element*/
        @apply block p-2;
    }

    .select2-search--dropdown .select2-search__field {
        /* Search box itself where you can enter text*/
        @apply h-10 p-1 bg-white !border-custom-grey-300 text-custom-grey-500 box-border rounded-lg border outline-none w-[100%];
    }

    .select2-search--dropdown .select2-search__field::-webkit-search-cancel-button {
        @apply appearance-none;
    }

    .select2-search--dropdown.select2-search--hide {
        @apply hidden;
    }

    .select2-close-mask {
        @apply block w-12 min-w-full m-0 p-0 border-0 fixed left-0 top-0 min-h-[100%] h-auto w-auto opacity-0 z-[99] bg-white;
    }

    .select2-hidden-accessible {
        @apply border-0 h-1 overflow-hidden p-0 absolute whitespace-nowrap;
        /* clip: rect(0 0 0 0);
        -webkit-clip-path: inset(50%);
        clip-path: inset(50%); */
    }

    .select2-container--default .select2-selection--single {
        @apply p-2 bg-white border border-custom-grey-300 rounded-lg outline-none placeholder-custom-grey-500;
    }

    .select2-container--default .select2-selection--single .select2-selection__rendered {
        /* Selection bar - Text color of the item you selected from the results */
        @apply text-md-regular text-custom-grey-500;
    }

    .select2-container--default .select2-selection--single .select2-selection__clear {
        /* Selection bar - Clear button - If this property is enabled*/
        @apply cursor-pointer float-right text-custom-grey-500 invisible;
    }

    .select2-container--default .select2-selection--single:hover .select2-selection__clear {
        @apply visible;
    }

    .select2-container--default .select2-selection--single .select2-selection__placeholder {
        /* Selection bar - Color of the placeholder text before selection - If this property is enabled */
        @apply text-custom-grey-600;
    }

    .select2-container--default .select2-selection--single .select2-selection__arrow {
        /* Selection bar - DIV where the arrow pointing down is living*/
        @apply absolute right-0 top-0 h-10 w-8;
    }

    .select2-container--default .select2-selection--single .select2-selection__arrow b {
        /* Arrow is a CSS triangle that does not exists in Tailwind without a package */
        @apply absolute border-none h-5 w-5 pl-1 left-1 top-[14px] bg-no-repeat;
        background-image: url("../images/icons/svg/dropdown-arrow.svg");
        background-size: 12px;
        background-position: 95%;
    }

    .select2-container--default[dir="rtl"] .select2-selection--single .select2-selection__clear {
        /* Selection bar - Clear button - If this property is enabled from right to left*/
        @apply float-left ml-4 invisible;
    }

    .select2-container--default[dir="rtl"] .select2-selection--single .select2-selection__arrow {
        /* Placement of the dropdown arrow when in rtl mode */
        @apply left-0 right-auto;
    }

    .select2-container--default.select2-container--disabled .select2-selection--single {
        /* Selection by property disabled*/
        @apply cursor-default bg-custom-grey-100;
    }

    .select2-container--default.select2-container--disabled .select2-selection--single .select2-selection__clear {
        /* Selection bar - Hide the clear cross when selection bar is disabled*/
        @apply hidden;
    }

    .select2-container--default .select2-selection--multiple {
        @apply p-1 min-h-full h-full border border-solid border-custom-grey-300 rounded-lg bg-white;
    }

    .select2-container--default .select2-selection--multiple .select2-selection__rendered {
        @apply box-border list-none m-0 px-1 min-w-full align-middle;
    }

    .select2-container--default .select2-selection--multiple .select2-selection__rendered li {
        @apply list-none;
    }

    .select2-container--default .select2-selection--multiple .select2-selection__clear {
        @apply cursor-pointer -top-0 right-0 absolute text-md-semibold text-custom-grey-700 invisible;
    }

    .select2-container--default .select2-selection--multiple:hover .select2-selection__clear {
        @apply visible;
    }

    .select2-container--default .select2-selection--multiple .select2-selection__choice {
        @apply bg-white text-base-white border cursor-default rounded my-1 mr-1 px-2 float-left;
    }

    .select2-container--default .select2-selection--multiple .select2-selection__choice__remove {
        @apply text-custom-grey-700 cursor-pointer inline-block mr-1;
    }

    .select2-container--default .select2-selection--multiple .select2-selection__choice__remove:hover {
        @apply text-custom-grey-700;
    }

    .select2-container--default.select2-container--focus .select2-selection--multiple {
        @apply box-border border border-custom-grey-300 rounded-lg outline-none placeholder-custom-grey-500 !important;
    }

    .select2-container--default.select2-container--disabled .select2-selection__choice__remove {
        @apply hidden;
    }

    .select2-container--classic .select2-selection--multiple .select2-selection__choice {
        @apply bg-custom-grey-300 border-2 shadow rounded-lg float-left cursor-default mt-1 mr-1 px-1;
    }

    .select2-container--default .select2-search--dropdown .select2-search__field {
        /* The border of the search textbox */
        @apply border-solid;
    }

    .select2-container--default .select2-search--inline .select2-search__field {
        /* Search textbox */
        @apply border-none bg-transparent outline-none shadow-none select-text;
    }

    .select2-container--default .select2-results>.select2-results__options {
        /* Hight of the dropdown zone where the options or results are visible */
        @apply h-full max-h-32 overflow-y-auto;
    }

    .select2-container--default .select2-results__option[role=group] {
        /* No clue what this does */
        @apply p-0;
    }

    .select2-container--default .select2-results__option[aria-disabled=true] {
        @apply text-custom-grey-700;
    }

    .select2-container--default .select2-results__option[aria-selected=true] {
        /* The already selected option row color */
        @apply bg-custom-grey-300;
    }

    .select2-results__option--selected {
        @apply hidden;
    }

    .select2-container--default .select2-results__option .select2-results__option {
        padding-left: 1em;
    }

    .select2-container--default .select2-results__option .select2-results__option .select2-results__group {
        padding-left: 0;
    }

    .select2-container--default .select2-results__option .select2-results__option .select2-results__option {
        margin-left: -1em;
        padding-left: 2em;
    }

    .select2-container--default .select2-results__option .select2-results__option .select2-results__option .select2-results__option {
        margin-left: -2em;
        padding-left: 3em;
    }

    .select2-container--default .select2-results__option .select2-results__option .select2-results__option .select2-results__option .select2-results__option {
        margin-left: -3em;
        padding-left: 4em;
    }

    .select2-container--default .select2-results__option .select2-results__option .select2-results__option .select2-results__option .select2-results__option .select2-results__option {
        margin-left: -4em;
        padding-left: 5em;
    }

    .select2-container--default .select2-results__option .select2-results__option .select2-results__option .select2-results__option .select2-results__option .select2-results__option .select2-results__option {
        margin-left: -5em;
        padding-left: 6em;
    }

    .select2-container--default .select2-results__option--highlighted[aria-selected] {
        /* Background color and text color of the options rows when select is open */
        @apply bg-custom-grey-100 text-gray-700;
    }

    .select2-container--default .select2-results__group {
        /* Have no idea what this is for */
        @apply cursor-default block;
        padding: 6px;
    }
}
