/* Navigation Dropdown Styles */
.nav-dropdown {
    position: relative;
}

.nav-dropdown-toggle {
    /* Reset button styles */
    background: none;
    border: none;
    
    /* Match nav-link styles */
    color: #d7d7d7;
    display: flex;
    align-items: center;
    padding: 0.5rem 1rem;
    text-decoration: none;
    border-radius: 0.375rem;
    transition: color 0.15s ease-in-out, background-color 0.15s ease-in-out;
    
    /* Button specific */
    width: 100%;
    text-align: left;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: normal;
    
    /* Ensure it's clickable */
    pointer-events: auto;
    z-index: 10;
    position: relative;
}

.nav-dropdown-toggle:hover {
    color: white;
    background-color: rgba(255, 255, 255, 0.1);
}

.nav-dropdown-toggle:focus {
    color: white;
    background-color: rgba(255, 255, 255, 0.1);
    outline: 0;
    box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.25);
}

.nav-dropdown-toggle:active {
    color: white;
    background-color: rgba(255, 255, 255, 0.15);
}

/* Icon spacing */
.nav-dropdown-toggle span.bi {
    margin-right: 0.5rem;
}

/* Text and arrow layout */
.nav-dropdown-toggle > span:not(.bi) {
    flex: 1;
}

.dropdown-arrow {
    font-size: 0.75rem;
    transition: transform 0.2s ease;
    margin-left: 0.5rem;
    color: rgba(255, 255, 255, 0.7);
}

.dropdown-arrow.rotate {
    transform: rotate(180deg);
}

.nav-dropdown-menu {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-out;
    background-color: rgba(0, 0, 0, 0.2);
    border-radius: 0.375rem;
    margin-top: 0.25rem;
    margin-left: 0;
}

.nav-dropdown-menu.show {
    max-height: 200px;
    transition: max-height 0.3s ease-in;
}

.nav-dropdown-item {
    color: #d7d7d7;
    display: flex;
    align-items: center;
    padding: 0.5rem 1rem 0.5rem 2.5rem;
    text-decoration: none;
    border-radius: 0.375rem;
    margin: 0.125rem 0.5rem;
    transition: color 0.15s ease-in-out, background-color 0.15s ease-in-out;
    font-size: 0.85rem;
}

.nav-dropdown-item:hover {
    color: white;
    background-color: rgba(255, 255, 255, 0.1);
    text-decoration: none;
}

.nav-dropdown-item.active {
    color: white;
    background-color: rgba(255, 255, 255, 0.25);
    font-weight: 500;
}

.nav-dropdown-item span.bi {
    margin-right: 0.5rem;
    font-size: 0.8rem;
}

/* Mobile adjustments */
@media (max-width: 768px) {
    .nav-dropdown-toggle {
        font-size: 0.85rem;
    }
    
    .nav-dropdown-item {
        padding-left: 2rem;
        font-size: 0.8rem;
    }
}

/* Accessibility improvements */
@media (prefers-reduced-motion: reduce) {
    .nav-dropdown-menu,
    .dropdown-arrow {
        transition: none;
    }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .nav-dropdown-toggle:focus {
        outline: 2px solid;
        outline-offset: 2px;
    }
    
    .nav-dropdown-item.active {
        background-color: rgba(255, 255, 255, 0.4);
    }
}