


.unified-dropdown-wrapper {
  position: relative;
  width: 100%;
  z-index: 1; 
}

.unified-dropdown-wrapper.open {
  z-index: 999999 !important; 
  position: relative;
}


.unified-dropdown-display {
  width: 100%;
  cursor: pointer;
  position: relative;
  padding-right: 40px !important;
}

.unified-dropdown-display::after {
  content: '▼';
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  pointer-events: none;
  font-size: 12px;
  color: var(--text-muted);
  transition: transform 0.2s;
}

.unified-dropdown-display.open::after {
  transform: translateY(-50%) rotate(180deg);
}


.unified-dropdown-search {
  display: none !important; 
}


.unified-dropdown-menu {
  max-height: 300px;
  overflow-y: auto;
  overflow-x: hidden;
  background: rgba(255, 255, 255, 0.98) !important;
  backdrop-filter: blur(12px);
  border: 1px solid rgba(0, 0, 0, 0.1);
  border-radius: var(--radius-sm, 8px);
  margin-top: 0; 
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
  z-index: 999999 !important;
  display: none;
  isolation: isolate;
  transform: translateZ(0);
  will-change: transform, opacity;
  direction: rtl;
  text-align: right;
}

.unified-dropdown-wrapper.open .unified-dropdown-menu {
  display: block;
}


.unified-dropdown-options {
  padding: 4px;
}


.unified-dropdown-option {
  padding: 10px 12px;
  cursor: pointer;
  border-radius: var(--radius-sm, 6px);
  transition: all 0.2s;
  color: var(--text-main);
  font-size: 14px;
}

.unified-dropdown-option:hover {
  background: rgba(59, 130, 246, 0.08);
  color: var(--text-main);
}


.unified-dropdown-option.selected {
  background: rgba(47, 128, 237, 0.1);
  color: var(--primary, #2F80ED);
  font-weight: 600;
}


.unified-dropdown-option.selected::before {
  content: '';
  display: inline-block;
  width: 8px;
  height: 8px;
  margin-inline-end: 8px;
  border-radius: 50%;
  background: var(--primary, #2F80ED);
  vertical-align: middle;
}


.unified-dropdown-empty {
  padding: 20px;
  text-align: center;
  color: var(--text-muted);
  font-size: 14px;
}


.unified-dropdown-loading {
  padding: 20px;
  text-align: center;
  color: var(--text-muted);
  font-size: 14px;
}

.unified-dropdown-loading::before {
  content: '⏳ ';
  margin-left: 4px;
}


.unified-dropdown-error {
  padding: 20px;
  text-align: center;
  color: #ef4444;
  font-size: 14px;
}

.unified-dropdown-error::before {
  content: '⚠️ ';
  margin-left: 4px;
}


.unified-dropdown-load-more {
  padding: 12px;
  text-align: center;
  cursor: pointer;
  border-top: 1px solid rgba(0, 0, 0, 0.08);
  color: var(--primary-dark, #0061ff);
  font-weight: 600;
  font-size: 14px;
  transition: all 0.2s;
}

.unified-dropdown-load-more:hover {
  background: rgba(59, 130, 246, 0.08);
  color: var(--primary-dark);
}


.unified-dropdown-menu::-webkit-scrollbar {
  width: 6px;
}

.unified-dropdown-menu::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.04);
  border-radius: 3px;
}

.unified-dropdown-menu::-webkit-scrollbar-thumb {
  background: rgba(0, 0, 0, 0.15);
  border-radius: 3px;
}

.unified-dropdown-menu::-webkit-scrollbar-thumb:hover {
  background: rgba(0, 0, 0, 0.25);
}


.unified-dropdown-hidden {
  display: none !important;
  visibility: hidden !important;
}


.dashboard-page .unified-dropdown-display {
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.14);
  color: var(--d-text, #e2e8f0);
}
.dashboard-page .unified-dropdown-display:focus,
.dashboard-page .unified-dropdown-display.open {
  background: rgba(255,255,255,0.1);
  border-color: rgba(99,102,241,0.5);
  box-shadow: 0 0 0 3px rgba(99,102,241,0.15);
  color: var(--d-text, #e2e8f0);
}
.dashboard-page .unified-dropdown-display::placeholder {
  color: var(--d-muted, #94a3b8);
}

.dashboard-page .unified-dropdown-menu {
  background: #1e293b !important;
  border-color: rgba(255,255,255,0.12);
  box-shadow: 0 10px 40px rgba(0,0,0,0.45);
}
.dashboard-page .unified-dropdown-option {
  color: #e2e8f0;
}
.dashboard-page .unified-dropdown-option:hover {
  background: rgba(99,102,241,0.18);
  color: #f1f5f9;
}
.dashboard-page .unified-dropdown-option.selected {
  background: rgba(99,102,241,0.25);
  color: #a5b4fc;
}
.dashboard-page .unified-dropdown-option.selected::before {
  background: #818cf8;
}
.dashboard-page .unified-dropdown-empty,
.dashboard-page .unified-dropdown-loading {
  color: #94a3b8;
}
.dashboard-page .unified-dropdown-load-more {
  color: #93c5fd;
  border-top-color: rgba(255,255,255,0.08);
}
.dashboard-page .unified-dropdown-load-more:hover {
  background: rgba(99,102,241,0.15);
  color: #bfdbfe;
}
.dashboard-page .unified-dropdown-menu::-webkit-scrollbar-track {
  background: rgba(255,255,255,0.04);
}
.dashboard-page .unified-dropdown-menu::-webkit-scrollbar-thumb {
  background: rgba(255,255,255,0.15);
}
.dashboard-page .unified-dropdown-menu::-webkit-scrollbar-thumb:hover {
  background: rgba(255,255,255,0.25);
}


@media (max-width: 768px) {
  .unified-dropdown-menu {
    max-height: 250px;
  }
}
