/* Account Dropdown Styles - Using Theme Variables */
.action-item {
    position: relative;
}

.dropdown-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background: var(--theme-background-light, #f8f9fa);
    border: 1px solid var(--theme-border-color, #e9ecef);
    border-radius: 12px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
    min-width: 250px;
    z-index: 1001;
    margin-top: 8px;
    padding: 12px 0;
    animation: fadeInDown 0.3s ease;
    font-family: var(--theme-font-family, 'Cairo', sans-serif);
}

.dropdown-menu.show {
    display: block;
}

.dropdown-menu .dropdown-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 20px;
    color: var(--theme-font-color, #333333);
    text-decoration: none;
    transition: all 0.3s ease;
    border-radius: 0;
    font-weight: 500;
    font-family: var(--theme-font-family, 'Cairo', sans-serif);
}

.dropdown-menu .dropdown-item:hover {
    background: linear-gradient(135deg, var(--theme-background-light, #f8f9fa) 0%, var(--theme-border-light, #f0f0f0) 100%);
    color: var(--primary, #2c3e50);
    transform: translateX(5px);
}

.dropdown-menu .dropdown-item i {
    width: 20px;
    font-size: 16px;
    text-align: center;
}

.dropdown-menu .dropdown-divider {
    height: 1px;
    background: linear-gradient(90deg, transparent 0%, var(--theme-border-color, #e9ecef) 50%, transparent 100%);
    margin: 12px 0;
}

.dropdown-menu .text-danger {
    color: var(--secondary, #e74c3c) !important;
}

.dropdown-menu .text-danger:hover {
    background: linear-gradient(135deg, rgba(231, 76, 60, 0.1) 0%, rgba(231, 76, 60, 0.05) 100%);
    color: var(--secondary, #e74c3c) !important;
}

/* Account Button Styles */
.action-button {
    cursor: pointer;
    position: relative;
    z-index: 999;
    transition: all 0.3s ease;
    border-radius: 8px;
    padding: 8px 16px;
    border: 2px solid transparent;
}


.action-button:active {
    transform: translateY(0);
}

/* Animation for dropdown */
@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .dropdown-menu {
        min-width: 200px;
        left: -50px;
        right: auto;
    }
    
    .dropdown-menu .dropdown-item {
        padding: 10px 16px;
        font-size: 14px;
    }
}

/* Dark Mode Support */
@media (prefers-color-scheme: dark) {
    .dropdown-menu {
        background: #2d3748;
        border-color: #4a5568;
        box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
    }
    
    .dropdown-menu .dropdown-item {
        color: #e2e8f0;
    }
    
    .dropdown-menu .dropdown-item:hover {
        background: linear-gradient(135deg, #4a5568 0%, #2d3748 100%);
        color: #63b3ed;
    }
    
    .dropdown-menu .dropdown-divider {
        background: linear-gradient(90deg, transparent 0%, #4a5568 50%, transparent 100%);
    }
}

/* Focus States for Accessibility */
.dropdown-menu .dropdown-item:focus {
    outline: 2px solid #007bff;
    outline-offset: -2px;
}

.action-button:focus {
    outline: 2px solid #007bff;
    outline-offset: 2px;
}

/* Loading State */
.dropdown-menu.loading {
    opacity: 0.7;
    pointer-events: none;
}

.dropdown-menu.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid #007bff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Enhanced Hover Effects */
.dropdown-menu .dropdown-item:first-child {
    border-radius: 12px 12px 0 0;
}

.dropdown-menu .dropdown-item:last-child {
    border-radius: 0 0 12px 12px;
}

.dropdown-menu .dropdown-item:only-child {
    border-radius: 12px;
}

/* Icon Animations */
.dropdown-menu .dropdown-item i {
    transition: transform 0.3s ease;
}

.dropdown-menu .dropdown-item:hover i {
    transform: scale(1.1);
}

/* Badge Support */
.dropdown-menu .dropdown-item .badge {
    margin-left: auto;
    font-size: 0.75em;
    padding: 0.25em 0.5em;
}

/* Custom Scrollbar for Long Dropdowns */
.dropdown-menu::-webkit-scrollbar {
    width: 6px;
}

.dropdown-menu::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 3px;
}

.dropdown-menu::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 3px;
}

.dropdown-menu::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}
