/* Custom Dropdown Styles */
.custom-dropdown {
    position: relative;
    display: inline-block;
}

.custom-dropdown-toggle {
    background: linear-gradient(135deg, #c56601 0%, #7a1428 100%);
    color: #ffffff;
    border: 1px solid rgba(255, 193, 7, 0.3);
    padding: 10px 16px;
    border-radius: 6px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 2px 8px rgba(88, 10, 30, 0.2);
    user-select: none;
    min-width: 140px;
    justify-content: space-between;
}

.custom-dropdown-toggle:hover {
    background: linear-gradient(135deg, #6b0c23 0%, #8a1630 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(88, 10, 30, 0.3);
    color: #ffffff;
    text-decoration: none;
}

.custom-dropdown-toggle:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(255, 193, 7, 0.3);
}

.custom-dropdown-arrow {
    transition: transform 0.3s ease;
    font-size: 12px;
}

.custom-dropdown.open .custom-dropdown-arrow {
    transform: rotate(180deg);
}

.custom-dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: linear-gradient(135deg, rgba(15, 10, 5, 0.95) 0%, rgba(25, 15, 10, 0.95) 100%);
    border: 1px solid rgba(255, 193, 7, 0.2);
    border-radius: 8px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(10px);
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px) scale(0.95);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    margin-top: 4px;
    min-width: 200px;
    overflow: hidden;
}

.custom-dropdown.open .custom-dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
}

.custom-dropdown-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    color: #ffffff;
    text-decoration: none;
    transition: all 0.2s ease;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    font-weight: 400;
}

.custom-dropdown-item:last-child {
    border-bottom: none;
}

.custom-dropdown-item:hover {
    background: linear-gradient(90deg, rgba(88, 10, 30, 0.3) 0%, rgba(122, 20, 40, 0.2) 100%);
    color: #ffc107;
    text-decoration: none;
    transform: translateX(4px);
}

.custom-dropdown-item i {
    color: #ffc107;
    width: 16px;
    text-align: center;
    transition: transform 0.2s ease;
}

.custom-dropdown-item:hover i {
    transform: scale(1.1);
}

.custom-dropdown-divider {
    height: 1px;
    background: linear-gradient(90deg, transparent 0%, rgba(255, 193, 7, 0.3) 50%, transparent 100%);
    margin: 4px 0;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .custom-dropdown-menu {
        position: fixed;
        left: 10px;
        right: 10px;
        top: auto;
        bottom: 10px;
        transform: translateY(100%);
        margin-top: 0;
    }
    
    .custom-dropdown.open .custom-dropdown-menu {
        transform: translateY(0);
    }
}

/* Animation for smooth opening */
@keyframes dropdownFadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.custom-dropdown-menu.animate-in {
    animation: dropdownFadeIn 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Prevent text selection during interaction */
.custom-dropdown * {
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
}

/* Custom scrollbar for long menus */
.custom-dropdown-menu {
    max-height: 400px;
    overflow-y: auto;
}

.custom-dropdown-menu::-webkit-scrollbar {
    width: 6px;
}

.custom-dropdown-menu::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
}

.custom-dropdown-menu::-webkit-scrollbar-thumb {
    background: rgba(255, 193, 7, 0.5);
    border-radius: 3px;
}

.custom-dropdown-menu::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 193, 7, 0.7);
}

/* Integration with existing navbar */
.navbar .custom-dropdown {
    margin: 0;
}

.navbar .custom-dropdown-toggle {
    background: transparent;
    border: none;
    box-shadow: none;
    color: #ffffff;
    padding: 8px 12px;
    min-width: auto;
    font-size: 14px;
}

.navbar .custom-dropdown-toggle:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateY(-1px);
}

.navbar .custom-dropdown-toggle.account-btn {
    background: #c56601;
    border: 1px solid rgba(255, 193, 7, 0.3);
}

.navbar .custom-dropdown-toggle.account-btn:hover {
    background: #6b0c23;
}

/* Adjust dropdown menu positioning for navbar */
.navbar .custom-dropdown-menu {
    margin-top: 8px;
    min-width: 180px;
}

/* Ensure proper z-index for navbar dropdowns */
.navbar .custom-dropdown {
    z-index: 1050;
}

.navbar .custom-dropdown.open {
    z-index: 1051;
}