/* General Select2 container */
.select2-container {
    width: 100%;
    display: inline-block;
    position: relative;
    height: auto;
    box-sizing: border-box;
}

.select2-container {
    display: flex;
    height: 60px;
}
/* Select2 dropdown arrow */
.select2-selection__arrow {
    position: absolute;
    top: 0;
    right: 10px;
    bottom: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    pointer-events: none; /* Prevent arrow from blocking clicks */
}
.ccsa-search-icon {
    position: absolute;
    right: 1px;
    top: 50%;
    transform: translateY(-50%);
    width: 67px;
    height: 59px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.select2-container-serach {
    height: 100%;
}
/* Styling for the single select input */
.select2-selection--single {
    width: 100%;
    padding: 10px 40px 10px 10px; /* Space for arrow and icon */
    border-radius: 4px;
    background-color: #fff;
    border: 1px solid #ccc;
    display: flex;
    align-items: center;
    position: relative;
    box-sizing: border-box;
    height: 50px; /* Adjust for a clean, consistent height */
}

/* Select2 selected item display */
.select2-selection__rendered {
    display: inline-block;
    width: calc(100% - 40px); /* Account for icon and arrow */
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-family: inherit;
    color: #222;
}
/* Custom styles for the icon button */
.select2-selection__clear {
    position: absolute;
    right: 35px; /* Adjust for space with arrow */
    top: 50%;
    transform: translateY(-50%);
    display: none; /* Show only when needed */
    cursor: pointer;
}

/* Select2 dropdown */
.select2-dropdown {
    width: 100%;
    background-color: #fff;
    border: 1px solid rgba(0, 0, 0, .2);
    border-radius: 4px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, .15);
    position: absolute;
    z-index: 9999;
    margin-top: 5px;
    box-sizing: border-box;
}
/* Select2 suggestions */
.select2-results__option {
    padding: 10px;
    font-size: 14px;
    cursor: pointer;
    display: flex;
    align-items: center;
}
/* Add hover effect for options */
.select2-results__option:hover {
    background-color: #f3f3f3;
}

/* Active suggestion */
.select2-results__option--highlighted {
    background-color: #f3f3f3;
}
/* Adjusting preloader with Select2 */
.select2-preloader {
    background-image: url('../images/ccsa-loading.gif');
    background-size: 50px 50px;
    background-position: center center;
    background-repeat: no-repeat;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 50px;
    height: 50px;
    z-index: 1000;
    text-align: center;
    vertical-align: middle;
}

@media screen and (max-width: 768px) {
    .select2-selection--single {
        height: 45px;
        padding: 8px 35px 8px 10px;
    }
    .ccsa-search-icon {
        width: 25px;
        height: 25px;
        right: 8px;
    }
}

/* Additional responsive adjustments based on layout */
.select2-container--small .select2-selection--single {
    height: 35px;
}
.select2-container--medium .select2-selection--single {
    height: 60px;
}
.select2-container-serach .select2-selection--single {
    height: 90px;
}
.select2-container--default .selection {
    width: 100%;
}
.select2-container--default .select2-selection--single {
    height: 100% !important;
}

.select2-selection__arrow{
    display: none;
}
div#ccsa-search\ layout-large{
    width: 100%;
}
div#ccsa-search\ layout-medium{
    width: 70%;
}
div#ccsa-search\ layout-small{
    width: 40%;
}
@media (max-width: 767px) {
    div#ccsa-search\ layout-medium {
        width: 100%;
    }
    div#ccsa-search\ layout-small {
        width: 100%;
    }
}