/* ==========================================================================
       MODERN COHESIVE SELECT2 STYLING - AUTO DESIGN SYSTEM
       ========================================================================== */

    /* 1. Container Width & Absolute Reset on Outer Wrappers */
    .select2,
    span.select2,
    .select2-container,
    .select2-container--default,
    span.select2-container,
    span.select2-container--default,
    div.select2-container,
    .select2-container.select2-container--default {
        border: none !important;
        border-width: 0 !important;
        border-color: transparent !important;
        outline: none !important;
        box-shadow: none !important;
        background: transparent !important;
        width: 100% !important;
        max-width: 100% !important;
        display: block !important;
        box-sizing: border-box !important;
    }

    .select2-hidden-accessible {
        border: 0 !important;
        clip: rect(0 0 0 0) !important;
        -webkit-clip-path: inset(50%) !important;
        clip-path: inset(50%) !important;
        height: 1px !important;
        overflow: hidden !important;
        padding: 0 !important;
        position: absolute !important;
        width: 1px !important;
        white-space: nowrap !important;
    }

    /* 2. Single Select Box (Main Input) */
    .select2-container--default .select2-selection--single {
        height: 44px !important;
        line-height: 42px !important;
        background-color: #ffffff !important;
        border: 1px solid #e2e8f0 !important;
        border-radius: 12px !important;
        box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05) !important;
        position: relative !important;
        outline: none !important;
        transition: all 0.2s ease-in-out !important;
        padding: 0 !important;
        display: block !important;
        box-sizing: border-box !important;
    }

    .select2-container--default .select2-selection--single:hover {
        border-color: #cbd5e1 !important;
    }

    /* Focus & Open States */
    .select2-container--default.select2-container--focus .select2-selection--single,
    .select2-container--default.select2-container--open .select2-selection--single {
        border-color: #f97316 !important;
        box-shadow: 0 0 0 3px rgba(249, 115, 22, 0.15) !important;
        outline: none !important;
    }

    /* 3. Text Value inside Single Select */
    .select2-container--default .select2-selection--single .select2-selection__rendered {
        color: #1e293b !important; /* slate-800 */
        font-size: 0.875rem !important; /* 14px */
        font-weight: 500 !important;
        line-height: 42px !important;
        padding-left: 14px !important;
        padding-right: 40px !important;
        display: block !important;
        overflow: hidden !important;
        text-overflow: ellipsis !important;
        white-space: nowrap !important;
        box-sizing: border-box !important;
    }

    .select2-container--default .select2-selection--single .select2-selection__placeholder {
        color: #94a3b8 !important; /* slate-400 */
        font-weight: 400 !important;
    }

    /* 4. Modern Dropdown Chevron Arrow (Replaces ugly default CSS triangle) */
    .select2-container--default .select2-selection--single .select2-selection__arrow {
        height: 42px !important;
        position: absolute !important;
        top: 0 !important;
        right: 14px !important;
        width: 20px !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        pointer-events: none !important;
    }

    .select2-container--default .select2-selection--single .select2-selection__arrow b {
        display: none !important; /* Hide old triangle */
    }

    .select2-container--default .select2-selection--single .select2-selection__arrow::after {
        content: "" !important;
        display: block !important;
        width: 7px !important;
        height: 7px !important;
        border-right: 2px solid #64748b !important;
        border-bottom: 2px solid #64748b !important;
        transform: rotate(45deg) !important;
        transition: transform 0.2s ease, border-color 0.2s ease !important;
        margin-top: -3px !important;
    }

    .select2-container--default.select2-container--open .select2-selection--single .select2-selection__arrow::after {
        transform: rotate(-135deg) !important;
        border-color: #f97316 !important;
        margin-top: 2px !important;
    }

    /* 5. Clear Button */
    .select2-container--default .select2-selection--single .select2-selection__clear {
        position: absolute !important;
        right: 36px !important;
        top: 50% !important;
        transform: translateY(-50%) !important;
        font-size: 16px !important;
        color: #94a3b8 !important;
        cursor: pointer !important;
        line-height: 1 !important;
        font-weight: bold !important;
    }
    .select2-container--default .select2-selection--single .select2-selection__clear:hover {
        color: #ef4444 !important;
    }

    /* 6. Dropdown Menu (Popup) */
    .select2-dropdown {
        background-color: #ffffff !important;
        border: 1px solid #e2e8f0 !important;
        border-radius: 14px !important;
        box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.05) !important;
        overflow: hidden !important;
        z-index: 99999 !important;
        margin-top: 4px !important;
        box-sizing: border-box !important;
    }

    /* 7. Search Input inside Dropdown */
    .select2-search--dropdown {
        padding: 10px !important;
        background-color: #f8fafc !important;
        border-bottom: 1px solid #f1f5f9 !important;
        display: block !important;
        box-sizing: border-box !important;
    }

    .select2-search--dropdown .select2-search__field {
        width: 100% !important;
        height: 38px !important;
        padding: 8px 12px 8px 36px !important;
        font-size: 0.875rem !important;
        color: #1e293b !important;
        background-color: #ffffff !important;
        border: 1px solid #cbd5e1 !important;
        border-radius: 8px !important;
        outline: none !important;
        box-sizing: border-box !important;
        background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%2394a3b8'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0z'%3E%3C/path%3E%3C/svg%3E") !important;
        background-repeat: no-repeat !important;
        background-position: 10px center !important;
        background-size: 16px 16px !important;
        transition: all 0.15s ease !important;
    }

    .select2-search--dropdown .select2-search__field:focus {
        border-color: #f97316 !important;
        box-shadow: 0 0 0 3px rgba(249, 115, 22, 0.15) !important;
        outline: none !important;
    }

    /* 8. Options List */
    .select2-results {
        display: block !important;
    }

    .select2-results__options {
        max-height: 240px !important;
        padding: 6px !important;
        overflow-y: auto !important;
        list-style: none !important;
        margin: 0 !important;
    }

    .select2-container--default .select2-results__option {
        padding: 9px 12px !important;
        font-size: 0.875rem !important;
        color: #334155 !important;
        border-radius: 8px !important;
        margin-bottom: 2px !important;
        cursor: pointer !important;
        user-select: none !important;
        transition: all 0.15s ease !important;
    }

    .select2-container--default .select2-results__option--highlighted[aria-selected] {
        background-color: #f97316 !important;
        color: #ffffff !important;
    }

    .select2-container--default .select2-results__option[aria-selected="true"] {
        background-color: #fff7ed !important;
        color: #ea580c !important;
        font-weight: 600 !important;
    }

    .select2-container--default .select2-results__option--highlighted[aria-selected="true"] {
        background-color: #f97316 !important;
        color: #ffffff !important;
    }

    .select2-container--default .select2-results__option--disabled {
        color: #94a3b8 !important;
        cursor: not-allowed !important;
        background-color: transparent !important;
    }

    .select2-results__message {
        padding: 14px !important;
        font-size: 0.875rem !important;
        color: #64748b !important;
        text-align: center !important;
    }

    /* 9. Disabled State */
    .select2-container--default.select2-container--disabled .select2-selection--single {
        background-color: #f1f5f9 !important;
        border-color: #e2e8f0 !important;
        cursor: not-allowed !important;
    }

    .select2-container--default.select2-container--disabled .select2-selection--single .select2-selection__rendered {
        color: #94a3b8 !important;
    }

    /* 10. Multiple Select Variant */
    .select2-container--default .select2-selection--multiple {
        min-height: 44px !important;
        background-color: #ffffff !important;
        border: 1px solid #e2e8f0 !important;
        border-radius: 12px !important;
        padding: 4px 8px !important;
        box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05) !important;
        transition: all 0.2s ease-in-out !important;
        box-sizing: border-box !important;
    }

    .select2-container--default.select2-container--focus .select2-selection--multiple {
        border-color: #f97316 !important;
        box-shadow: 0 0 0 3px rgba(249, 115, 22, 0.15) !important;
        outline: none !important;
    }

    .select2-container--default .select2-selection--multiple .select2-selection__choice {
        background-color: #fff7ed !important;
        border: 1px solid #ffedd5 !important;
        color: #c2410c !important;
        border-radius: 8px !important;
        padding: 3px 8px !important;
        font-size: 0.8125rem !important;
        font-weight: 600 !important;
        margin-top: 4px !important;
        margin-right: 4px !important;
    }

    .select2-container--default .select2-selection--multiple .select2-selection__choice__remove {
        color: #ea580c !important;
        margin-right: 6px !important;
        font-weight: bold !important;
    }
    .select2-container--default .select2-selection--multiple .select2-selection__choice__remove:hover {
        color: #9a3412 !important;
    }
</style>
