/* Global Custom Dropdown Styles */

.custom-dropdown {
    position: relative;
    width: 100%;
    min-width: 150px;
}

.dropdown-menu.dropdown-menu-portal {
    max-height: 220px;
    overflow-y: auto;
    background: var(--bg-card, #1a1f25);
    z-index: 2147483647;
    scrollbar-width: thin;
    scrollbar-color: rgba(148, 163, 184, 0.55) transparent;
}

.custom-dropdown.js-enhanced-select .dropdown-native-source {
    display: none !important;
}

.is-dropdown-hidden {
    display: none !important;
}

.custom-dropdown .dropdown-pill {
    width: 100%;
    min-height: 44px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 10px 14px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(148, 163, 184, 0.35);
    border-radius: 12px;
    color: var(--text-primary, #ffffff);
    font-size: 14px;
    cursor: pointer;
    box-sizing: border-box;
    transition: border-color 0.18s ease, background 0.18s ease, box-shadow 0.18s ease, border-radius 0.18s ease;
}

.custom-dropdown .dropdown-pill:hover {
    border-color: rgba(148, 163, 184, 0.55);
}

.custom-dropdown .dropdown-pill-main {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
    flex: 1;
} 
.custom-dropdown .dropdown-pill-icon {
    color: rgba(148, 163, 184, 0.9);
    font-size: 14px;
    flex: 0 0 auto;
    transition: color 0.18s ease;
}

.custom-dropdown .dropdown-pill-svg {
    width: 14px;
    height: 14px;
    flex: 0 0 14px;
    object-fit: contain;
}

[data-theme="dark"] .custom-dropdown .dropdown-pill-svg {
    filter: brightness(0) invert(1);
    opacity: 0.8;
}

[data-theme="light"] .custom-dropdown .dropdown-pill-svg {
    opacity: 0.7;
}

.custom-dropdown .dropdown-pill-value {
    color: var(--text-primary, #ffffff);
    font-size: 14px;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.custom-dropdown .dropdown-pill-chevron {
    color: rgba(148, 163, 184, 0.9);
    font-size: 10px;
    transition: transform 0.18s ease, color 0.18s ease;
}

.custom-dropdown .dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    max-height: 220px;
    overflow-y: auto;
    display: none;
    background: var(--bg-card, #1a1f25);
    border: 1px solid rgba(148, 163, 184, 0.35);
    border-radius: 12px;
    z-index: 2147483640;
    scrollbar-width: thin;
    scrollbar-color: rgba(148, 163, 184, 0.55) transparent;
    transition: border-top-left-radius 0.18s ease, border-top-right-radius 0.18s ease;
}

.custom-dropdown .dropdown-menu::-webkit-scrollbar {
    width: 6px;
}

.dropdown-menu.dropdown-menu-portal::-webkit-scrollbar {
    width: 6px;
}

.custom-dropdown .dropdown-menu::-webkit-scrollbar-thumb {
    background: rgba(148, 163, 184, 0.55);
    border-radius: 6px;
}

.dropdown-menu.dropdown-menu-portal::-webkit-scrollbar-thumb {
    background: rgba(148, 163, 184, 0.55);
    border-radius: 6px;
}

.custom-dropdown .dropdown-menu::-webkit-scrollbar-track {
    background: transparent;
}

.dropdown-menu.dropdown-menu-portal::-webkit-scrollbar-track {
    background: transparent;
}

.custom-dropdown .dropdown-option {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 8px;
    text-align: left;
    border: 0;
    border-top: 1px solid rgba(148, 163, 184, 0.28);
    background: transparent;
    color: var(--text-primary, #ffffff);
    font-size: 14px;
    padding: 8px 12px;
    cursor: pointer;
}

.dropdown-menu.dropdown-menu-portal .dropdown-option {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 8px;
    text-align: left;
    border: 0;
    border-top: 1px solid rgba(148, 163, 184, 0.28);
    background: transparent;
    color: var(--text-primary, #ffffff);
    font-size: 14px;
    padding: 8px 12px;
    cursor: pointer;
}

.custom-dropdown .dropdown-option:first-child {
    border-top: 0;
}

.dropdown-menu.dropdown-menu-portal .dropdown-option:first-child {
    border-top: 0;
}

.custom-dropdown .dropdown-option:hover {
    background: var(--bg-card-hover, #222830);
}

.dropdown-menu.dropdown-menu-portal .dropdown-option:hover {
    background: var(--bg-card-hover, #222830);
}

.custom-dropdown .dropdown-option.is-selected {
    background: var(--bg-elevated, #252b33);
    color: #ffffff;
}

.dropdown-menu.dropdown-menu-portal .dropdown-option.is-selected {
    background: var(--bg-elevated, #252b33);
    color: #ffffff;
}

.custom-dropdown .dropdown-option-svg,
.dropdown-menu.dropdown-menu-portal .dropdown-option-svg {
    width: 14px;
    height: 14px;
    flex: 0 0 14px;
    opacity: 0.9;
}

[data-theme="dark"] .custom-dropdown .dropdown-option-svg,
[data-theme="dark"] .dropdown-menu.dropdown-menu-portal .dropdown-option-svg {
    filter: brightness(0) invert(1);
    opacity: 0.8;
}

[data-theme="light"] .custom-dropdown .dropdown-option-svg,
[data-theme="light"] .dropdown-menu.dropdown-menu-portal .dropdown-option-svg {
    opacity: 0.7;
}

.custom-dropdown .dropdown-option-label,
.dropdown-menu.dropdown-menu-portal .dropdown-option-label {
    display: inline-block;
    min-width: 0;
}

@keyframes dropdown-menu-connect-corners {
    from {
        border-top-left-radius: 12px;
        border-top-right-radius: 12px;
    }
    to {
        border-top-left-radius: 0;
        border-top-right-radius: 0;
    }
}

.custom-dropdown.is-open .dropdown-pill,
.custom-dropdown.is-enhanced .dropdown-pill {
    background: rgba(5, 214, 193, 0.1);
    border-color: rgba(5, 214, 193, 0.62);
}

.custom-dropdown.is-open .dropdown-pill,
.custom-dropdown.is-open.is-enhanced .dropdown-pill {
    border-bottom-left-radius: 0;
    border-bottom-right-radius: 0;
    box-shadow: -1px 0 3px rgba(5, 214, 193, 0.18), 1px 0 3px rgba(5, 214, 193, 0.18);
}

.custom-dropdown.is-open .dropdown-pill:hover,
.custom-dropdown.is-enhanced .dropdown-pill:hover {
    border-color: rgba(5, 214, 193, 0.75);
}

.custom-dropdown.is-open .dropdown-pill-icon,
.custom-dropdown.is-open .dropdown-pill-chevron,
.custom-dropdown.is-enhanced .dropdown-pill-icon,
.custom-dropdown.is-enhanced .dropdown-pill-chevron {
    color: var(--primary, #05d6c1);
}

.custom-dropdown.is-open .dropdown-pill-chevron {
    transform: rotate(180deg);
}

.custom-dropdown.is-open .dropdown-menu {
    display: block;
    top: calc(100% - 1px);
    border: 1.5px solid rgba(5, 214, 193, 0.5);
    border-top: 0;
    border-top-left-radius: 0;
    border-top-right-radius: 0;
    border-bottom-left-radius: 12px;
    border-bottom-right-radius: 12px;
    box-shadow: -1px 1px 2px rgba(5, 214, 193, 0.12), 1px 1px 2px rgba(5, 214, 193, 0.12), 0 5px 12px rgba(0, 0, 0, 0.16);
    animation: dropdown-menu-connect-corners 0.18s ease forwards;
    scrollbar-color: rgba(5, 214, 193, 0.45) transparent;
}

.dropdown-menu.dropdown-menu-portal.is-open {
    display: block;
    border: 1.5px solid rgba(5, 214, 193, 0.5);
    border-top: 0;
    border-top-left-radius: 0;
    border-top-right-radius: 0;
    border-bottom-left-radius: 12px;
    border-bottom-right-radius: 12px;
    box-shadow: -1px 1px 2px rgba(5, 214, 193, 0.12), 1px 1px 2px rgba(5, 214, 193, 0.12), 0 5px 12px rgba(0, 0, 0, 0.16);
    animation: dropdown-menu-connect-corners 0.18s ease forwards;
    scrollbar-color: rgba(5, 214, 193, 0.45) transparent;
}

.dropdown-menu.dropdown-menu-portal.is-open::-webkit-scrollbar-thumb {
    background: rgba(5, 214, 193, 0.45);
}

.custom-dropdown.is-open .dropdown-menu::-webkit-scrollbar-thumb {
    background: rgba(5, 214, 193, 0.45);
}

[data-theme="light"] .custom-dropdown .dropdown-pill {
    background: #f5f7fb;
    border-color: rgba(148, 163, 184, 0.45);
    color: #1f2937;
}

[data-theme="light"] .custom-dropdown .dropdown-pill-value {
    color: #1f2937;
}

[data-theme="light"] .custom-dropdown .dropdown-pill-icon,
[data-theme="light"] .custom-dropdown .dropdown-pill-chevron {
    color: rgba(100, 116, 139, 0.95);
}

[data-theme="light"] .custom-dropdown .dropdown-menu {
    background: #ffffff;
    border-color: rgba(148, 163, 184, 0.45);
}

[data-theme="light"] .dropdown-menu.dropdown-menu-portal {
    background: #ffffff;
    border-color: rgba(148, 163, 184, 0.45);
}

[data-theme="light"] .dropdown-menu.dropdown-menu-portal .dropdown-option {
    color: #1f2937;
}

[data-theme="light"] .dropdown-menu.dropdown-menu-portal .dropdown-option.is-selected {
    background: rgba(148, 163, 184, 0.2);
    color: #111827;
}

[data-theme="light"] .custom-dropdown .dropdown-option {
    color: #1f2937;
}

[data-theme="light"] .custom-dropdown .dropdown-option.is-selected {
    background: rgba(148, 163, 184, 0.2);
    color: #111827;
}
