/**
 * Dropdown component styles
 * Handles navigation dropdowns and user menu dropdowns
 */

/* Proper dropdown toggle behavior */
.dropdown {
    position: relative;
    display: inline-block;
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    right: 0;
    background: white;
    border: 1px solid #ddd;
    border-radius: 5px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    min-width: 200px;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    margin-top: 0.5rem;
    list-style: none;
    padding: 0.5rem 0;
    margin: 0;
}

.dropdown-menu.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-menu li {
    margin: 0;
}

.dropdown-menu a {
    display: block;
    padding: 0.75rem 1rem;
    color: #333;
    text-decoration: none;
    transition: background-color 0.2s ease;
    border: none;
    background: none;
    width: 100%;
    text-align: left;
    cursor: pointer;
}

.dropdown-menu a:hover {
    background-color: #f8f9fa;
    color: #3498db;
}

.dropdown-divider {
    height: 1px;
    margin: 0.5rem 0;
    background-color: #eee;
    border: none;
}

.dropdown-toggle {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 5px;
    transition: background-color 0.3s;
    cursor: pointer;
    background: #3498db !important;
    border: 1px solid #2980b9 !important;
}

.dropdown-toggle:hover {
    background-color: rgba(255, 255, 255, 0.1) !important;
}

.dropdown-arrow {
    font-size: 0.8rem;
    transition: transform 0.3s;
    display: inline-block;
}

.dropdown.show .dropdown-arrow {
    transform: rotate(180deg);
}

/* Responsive dropdown adjustments */
@media (max-width: 768px) {
    .dropdown-menu {
        position: static;
        opacity: 1;
        visibility: visible;
        transform: none;
        box-shadow: none;
        border: none;
        background: transparent;
        margin-top: 0;
    }

    .dropdown-menu a {
        color: white;
        padding: 1rem;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    }

    .dropdown-menu a:hover {
        background-color: rgba(255, 255, 255, 0.1);
        color: white;
    }

    .dropdown-divider {
        background-color: rgba(255, 255, 255, 0.1);
    }
}