/* ------------------------------------------------------------
   Custom Dropdown (project standard)
   - Extracted from user-management.css so it can be reused
   - Bootstrap <select> yerine kullanılmak üzere
   ------------------------------------------------------------ */

.custom-dropdown {
    position: relative !important;
    width: 100% !important;
    z-index: 100 !important;
}

.custom-dropdown-toggle {
    width: 100% !important;
    padding: 0.25rem 2rem 0.25rem 0.5rem !important;
    border: 1px solid var(--border-color, #dee2e6) !important;
    border-radius: 4px !important;
    background-color: var(--bg-primary, #ffffff) !important;
    color: var(--text-primary, #000000) !important;
    font-size: 1rem !important;
    height: 32px !important;
    text-align: left !important;
    cursor: pointer !important;
    position: relative !important;
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    transition: all 0.15s ease-in-out !important;
    box-sizing: border-box !important;
}

.custom-dropdown-toggle:hover {
    background-color: #f8f9fa !important;
    border-color: var(--border-color, #adb5bd) !important;
}

.custom-dropdown-toggle:focus {
    background-color: #f8f9fa !important;
    border-color: var(--border-color, #adb5bd) !important;
    box-shadow: none !important;
    outline: 0 !important;
}

.dropdown-arrow {
    font-size: 12px !important;
    transition: transform 0.15s ease-in-out !important;
    position: absolute !important;
    right: 10px !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
}

.custom-dropdown.open .dropdown-arrow {
    transform: translateY(-50%) rotate(180deg) !important;
}

.custom-dropdown-menu {
    position: absolute !important;
    top: 100% !important;
    left: 0 !important;
    right: 0 !important;
    z-index: 1001 !important;
    background-color: var(--bg-primary, #ffffff) !important;
    border: 1px solid var(--border-color, #dee2e6) !important;
    border-radius: 4px !important;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1) !important;
    max-height: 300px !important;
    min-height: 40px !important;
    overflow-y: auto !important;
    display: none !important;
    margin-top: 2px !important;
    width: auto !important;
    min-width: 100% !important;
}

.custom-dropdown.open .custom-dropdown-menu {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    transform: none !important;
}

.custom-dropdown.open {
    z-index: 1000 !important;
}

.custom-dropdown-item {
    padding: 0.5rem 0.75rem !important;
    cursor: pointer !important;
    color: var(--text-primary, #000000) !important;
    font-size: 1rem !important;
    border-bottom: none !important;
    transition: background-color 0.15s ease-in-out !important;
}

.custom-dropdown-item:hover {
    background-color: var(--hover-bg, rgba(0, 0, 0, 0.05)) !important;
}

.custom-dropdown .custom-dropdown-item.selected,
.custom-dropdown-menu .custom-dropdown-item.selected {
    background-color: #e9ecef !important;
    color: var(--text-primary, #000000) !important;
}

/* Dark Mode */
body.dark-mode .custom-dropdown-toggle,
body[data-theme="dark"] .custom-dropdown-toggle {
    background-color: var(--bg-tertiary, #2d2d2d) !important;
    color: var(--text-primary, #ffffff) !important;
    border-color: var(--border-color, #444) !important;
}

body.dark-mode .custom-dropdown-toggle:hover,
body[data-theme="dark"] .custom-dropdown-toggle:hover {
    background-color: #1f1f1f !important;
    border-color: var(--border-color, #666) !important;
}

body.dark-mode .custom-dropdown-toggle:focus,
body[data-theme="dark"] .custom-dropdown-toggle:focus {
    background-color: #1f1f1f !important;
    border-color: var(--border-color, #666) !important;
    box-shadow: none !important;
}

body.dark-mode .custom-dropdown-menu,
body[data-theme="dark"] .custom-dropdown-menu {
    background-color: var(--bg-tertiary, #2d2d2d) !important;
    border-color: var(--border-color, #444) !important;
}

body.dark-mode .custom-dropdown-item,
body[data-theme="dark"] .custom-dropdown-item {
    color: var(--text-primary, #ffffff) !important;
}

body.dark-mode .custom-dropdown-item:hover,
body[data-theme="dark"] .custom-dropdown-item:hover {
    background-color: var(--hover-bg, rgba(255, 255, 255, 0.1)) !important;
}

body.dark-mode .custom-dropdown .custom-dropdown-item.selected,
body.dark-mode .custom-dropdown-menu .custom-dropdown-item.selected,
body[data-theme="dark"] .custom-dropdown .custom-dropdown-item.selected,
body[data-theme="dark"] .custom-dropdown-menu .custom-dropdown-item.selected {
    background-color: var(--primary, #1f1f1f) !important;
    color: #ffffff !important;
}

