/* Dropdown Visibility Fix - Override styles without rebuilding */
/* Bootstrap Select Dropdown */
.bootstrap-select.show .dropdown-menu,
.bootstrap-select.open .dropdown-menu {
    z-index: 9999 !important;
}

.bootstrap-select .dropdown-menu .inner li a {
    color: #191919 !important;
}

.bootstrap-select .dropdown-menu .inner li a:hover,
.bootstrap-select .dropdown-menu .inner li a.active,
.bootstrap-select .dropdown-menu .inner li a:active,
.bootstrap-select .dropdown-menu .inner li.active a,
.bootstrap-select .dropdown-menu .inner li.selected a {
    background-color: #1FBDE4 !important;
    color: #ffffff !important;
}

/* Custom Select Dropdown */
.custom-select .dropdown-menu {
    z-index: 9999 !important;
}

.custom-select .dropdown-menu li a {
    color: #666666 !important;
}

.custom-select .dropdown-menu li a:hover,
.custom-select .dropdown-menu li.selected a {
    background-color: #1FBDE4 !important;
    color: #ffffff !important;
}

/* UI Select Bootstrap Dropdown - COMPREHENSIVE FIX */
.ui-select-bootstrap .dropdown-menu {
    z-index: 9999 !important;
}

.ui-select-bootstrap .dropdown-menu .ui-select-choices-row {
    height: auto !important;
    min-height: 35px !important;
    line-height: normal !important;
}

/* Fix the row container */
.ui-select-bootstrap .dropdown-menu .ui-select-choices-row > span {
    color: #666666 !important;
    height: auto !important;
    min-height: 35px !important;
    line-height: 35px !important;
    display: block !important;
    padding: 5px 15px !important;
    overflow: visible !important;
    white-space: normal !important;
}

/* CRITICAL: Fix for ui-select-choices-row-inner - the main container */
.ui-select-bootstrap .dropdown-menu .ui-select-choices-row > span.ui-select-choices-row-inner,
.ui-select-bootstrap .dropdown-menu .ui-select-choices-row-inner,
.ui-select-bootstrap .dropdown-menu [uis-transclude-append] {
    height: auto !important;
    min-height: 35px !important;
    line-height: 35px !important;
    display: block !important;
    padding: 5px 15px !important;
    overflow: visible !important;
    white-space: normal !important;
    color: #666666 !important;
    visibility: visible !important;
    opacity: 1 !important;
}

/* CRITICAL: Fix for ng-bind-html spans - this is where the actual text is */
.ui-select-bootstrap .dropdown-menu .ui-select-choices-row-inner > span[ng-bind-html],
.ui-select-bootstrap .dropdown-menu .ui-select-choices-row-inner span[ng-bind-html],
.ui-select-bootstrap .dropdown-menu [uis-transclude-append] > span[ng-bind-html],
.ui-select-bootstrap .dropdown-menu [uis-transclude-append] span[ng-bind-html] {
    height: auto !important;
    line-height: 35px !important;
    display: inline-block !important;
    color: #666666 !important;
    visibility: visible !important;
    opacity: 1 !important;
    font-size: 14px !important;
}

/* Fix all nested elements that might contain text */
.ui-select-bootstrap .dropdown-menu .ui-select-choices-row-inner > span,
.ui-select-bootstrap .dropdown-menu .ui-select-choices-row-inner span,
.ui-select-bootstrap .dropdown-menu .ui-select-choices-row-inner .ng-binding,
.ui-select-bootstrap .dropdown-menu .ui-select-choices-row-inner .ng-scope,
.ui-select-bootstrap .dropdown-menu [uis-transclude-append] > span,
.ui-select-bootstrap .dropdown-menu [uis-transclude-append] span {
    height: auto !important;
    line-height: 35px !important;
    display: inline-block !important;
    color: #666666 !important;
    visibility: visible !important;
    opacity: 1 !important;
    font-size: 14px !important;
}

/* Fix small tags (like patient info) */
.ui-select-bootstrap .dropdown-menu .ui-select-choices-row-inner small,
.ui-select-bootstrap .dropdown-menu [uis-transclude-append] small {
    display: inline-block !important;
    color: #666666 !important;
    visibility: visible !important;
    opacity: 1 !important;
    line-height: 35px !important;
}

/* Universal fix for ALL content inside */
.ui-select-bootstrap .dropdown-menu .ui-select-choices-row-inner *,
.ui-select-bootstrap .dropdown-menu [uis-transclude-append] * {
    color: #666666 !important;
    visibility: visible !important;
    opacity: 1 !important;
}

/* Hover states */
.ui-select-bootstrap .dropdown-menu .ui-select-choices-row > span:hover,
.ui-select-bootstrap .dropdown-menu .ui-select-choices-row > span.ui-select-choices-row-inner:hover,
.ui-select-bootstrap .dropdown-menu .ui-select-choices-row-inner:hover,
.ui-select-bootstrap .dropdown-menu [uis-transclude-append]:hover {
    background-color: #1FBDE4 !important;
    color: #ffffff !important;
}

.ui-select-bootstrap .dropdown-menu .ui-select-choices-row-inner:hover *,
.ui-select-bootstrap .dropdown-menu [uis-transclude-append]:hover * {
    color: #ffffff !important;
}

/* Active/Selected states */
.ui-select-bootstrap .dropdown-menu .ui-select-choices-row.active > span,
.ui-select-bootstrap .dropdown-menu .ui-select-choices-row.active > span.ui-select-choices-row-inner,
.ui-select-bootstrap .dropdown-menu .ui-select-choices-row.active .ui-select-choices-row-inner,
.ui-select-bootstrap .dropdown-menu .ui-select-choices-row.active [uis-transclude-append] {
    background-color: #1FBDE4 !important;
    color: #ffffff !important;
}

.ui-select-bootstrap .dropdown-menu .ui-select-choices-row.active .ui-select-choices-row-inner *,
.ui-select-bootstrap .dropdown-menu .ui-select-choices-row.active [uis-transclude-append] * {
    color: #ffffff !important;
}

/* Global Bootstrap Select Fix */
.bootstrap-select .dropdown-menu {
    z-index: 9999 !important;
}
