/* =========================================
   MODAL & DROPDOWN FIX - STIG PREMIUM
   Verhindert dass Dropdowns hinter Modal verschwinden
   ========================================= */

/* Bootstrap Modal z-index erhöhen */
.modal {
    z-index: 1050 !important;
}

.modal-backdrop {
    z-index: 1040 !important;
}

/* Select2 Dropdown über Modal */
.select2-container {
    z-index: 9999 !important;
}

.select2-dropdown {
    z-index: 9999 !important;
}

.select2-container--open {
    z-index: 9999 !important;
}

/* Native Select-Dropdowns im Modal */
.modal select {
    position: relative;
    z-index: 1055 !important;
}

/* Select2 Results über Modal */
.select2-results {
    z-index: 10000 !important;
}

/* Diamond Solution CI für Select2 */
.select2-container--default .select2-selection--single {
    background: rgba(15, 15, 20, 0.8) !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    color: #EDEDED !important;
    height: 45px !important;
    padding: 8px 15px !important;
    border-radius: 8px !important;
}

.select2-container--default .select2-selection--single .select2-selection__rendered {
    color: #EDEDED !important;
    line-height: 28px !important;
}

.select2-container--default .select2-selection--single .select2-selection__arrow {
    height: 43px !important;
}

/* Select2 Dropdown STIG-Design */
.select2-dropdown {
    background: rgba(25, 25, 30, 0.98) !important;
    border: 1px solid rgba(255, 255, 255, 0.15) !important;
    border-radius: 8px !important;
}

.select2-results__option {
    background: transparent !important;
    color: #EDEDED !important;
    padding: 10px 15px !important;
}

.select2-results__option--highlighted {
    background: rgba(110, 173, 209, 0.3) !important;
    color: #EDEDED !important;
}

.select2-results__option--selected {
    background: rgba(110, 173, 209, 0.2) !important;
    color: #6EADD1 !important;
}

.select2-search--dropdown .select2-search__field {
    background: rgba(15, 15, 20, 0.8) !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    color: #EDEDED !important;
    border-radius: 6px !important;
}

/* Modal Content STIG-Design */
.modal-content {
    background: linear-gradient(135deg, rgba(25, 25, 30, 0.98), rgba(15, 15, 20, 0.98)) !important;
    border: 1px solid rgba(255, 255, 255, 0.15) !important;
    color: #ffffff !important;
}

.modal-header {
    border-bottom: 1px solid rgba(255, 255, 255, 0.1) !important;
    background: rgba(0, 0, 0, 0.3) !important;
}

.modal-title {
    color: #EDEDED !important;
}

.modal-body {
    color: #EDEDED !important;
}

.modal-footer {
    border-top: 1px solid rgba(255, 255, 255, 0.1) !important;
    background: rgba(0, 0, 0, 0.3) !important;
}

/* Form Controls im Modal */
.modal input.form-control,
.modal input.form--control,
.modal select.form-control,
.modal select.form--control,
.modal textarea.form-control {
    background: rgba(15, 15, 20, 0.8) !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    color: #ffffff !important;
}

.modal input.form-control:focus,
.modal input.form--control:focus,
.modal select.form-control:focus,
.modal select.form--control:focus {
    background: rgba(15, 15, 20, 0.95) !important;
    border-color: #6EADD1 !important;
    color: #EDEDED !important;
    box-shadow: 0 0 0 3px rgba(110, 173, 209, 0.1) !important;
}

/* Input-Group im Modal */
.modal .input-group-text {
    background: rgba(110, 173, 209, 0.2) !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    color: #6EADD1 !important;
}

/* Labels im Modal */
.modal label {
    color: #9ca3af !important;
}

/* Native Select Option Styling */
.modal select option {
    background: #1a1a2e !important;
    color: #ffffff !important;
}

/* Stelle sicher dass Select2 im Modal-Body attachiert wird */
.select2-container--open .select2-dropdown--below {
    z-index: 10000 !important;
}

.select2-container--open .select2-dropdown--above {
    z-index: 10000 !important;
}
