﻿/* Main select box */
.select2-container .select2-choice {
    height: calc(1.5em + 0.75rem + 2px) !important;
    padding: 0.375rem 0.75rem !important;
    font-size: 1rem !important;
    line-height: 1.5 !important;
    color: #495057 !important;
    background-color: #fff !important;
    background-clip: padding-box !important;
    border: 1px solid #ced4da !important;
    border-radius: 0.25rem !important;
    transition: border-color .15s ease-in-out, box-shadow .15s ease-in-out !important;
    display: flex !important;
    align-items: center !important;
    box-shadow: none !important;
}

    /* Placeholder / selected text */
    .select2-container .select2-choice .select2-chosen {
        color: #6c757d !important;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    /* Arrow (dropdown icon) */
    .select2-container .select2-choice .select2-arrow {
        height: 100% !important;
        width: 34px !important;
        background: transparent !important;
        border-left: none !important;
        right: 0 !important;
        top: 0 !important;
        position: absolute;
    }

        .select2-container .select2-choice .select2-arrow b {
            margin-top: 6px !important;
            border-color: #6c757d transparent transparent transparent !important; /* Bootstrap-like arrow */
        }

/* Full width select */
.select2-container {
    width: 100% !important;
    position: relative; /* For arrow positioning */
}

/* Dropdown panel */
.select2-drop {
    background-color: #fff !important;
    border: 1px solid #ced4da !important;
    border-radius: 0.25rem !important;
    box-shadow: 0 0.25rem 0.5rem rgba(0,0,0,0.05) !important;
    margin-top: 0.125rem !important;
    z-index: 9999 !important;
}

.select2-results .select2-result-label {
    padding: 0.375rem 0.75rem !important;
    font-size: 1rem !important;
    color: #212529 !important;
}

.select2-results .select2-highlighted {
    background-color: #e9ecef !important; /* Bootstrap hover */
    color: #212529 !important;
}

/* Validation styling: error */
.select2-container.is-invalid .select2-choice,
.select2-container .select2-choice.is-invalid {
    border-color: #dc3545 !important;
    padding-right: calc(1.5em + 0.75rem) !important;
    background-image: none !important;
}

.select2-container.is-invalid .select2-chosen {
    color: #dc3545 !important;
}
