/* 
 * STYLOFITNESS - Dropdown Fix
 * CSS para asegurar que los dropdowns funcionen correctamente
 */

/* Asegurar que los dropdowns de Bootstrap funcionen */
.dropdown-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    z-index: 10055;
    min-width: 10rem;
    padding: 0.5rem 0;
    margin: 0;
    font-size: 0.875rem;
    color: #212529;
    text-align: left;
    list-style: none;
    background-color: #fff;
    background-clip: padding-box;
    border: 1px solid rgba(0, 0, 0, 0.15);
    border-radius: 0.375rem;
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.175);
}

.dropdown-menu.show {
    display: block;
}

.dropdown-item {
    display: block;
    width: 100%;
    padding: 0.25rem 1rem;
    clear: both;
    font-weight: 400;
    color: #212529;
    text-align: inherit;
    text-decoration: none;
    white-space: nowrap;
    background-color: transparent;
    border: 0;
    transition: color 0.15s ease-in-out, background-color 0.15s ease-in-out;
}

.dropdown-item:hover,
.dropdown-item:focus {
    color: #1e2125;
    background-color: #e9ecef;
}

.dropdown-item.active,
.dropdown-item:active {
    color: #fff;
    text-decoration: none;
    background-color: #0d6efd;
}

.dropdown-item.disabled,
.dropdown-item:disabled {
    color: #adb5bd;
    pointer-events: none;
    background-color: transparent;
}

.dropdown-divider {
    height: 0;
    margin: 0.5rem 0;
    overflow: hidden;
    border-top: 1px solid rgba(0, 0, 0, 0.15);
}

.dropdown-toggle::after {
    display: inline-block;
    margin-left: 0.255em;
    vertical-align: 0.255em;
    content: "";
    border-top: 0.3em solid;
    border-right: 0.3em solid transparent;
    border-bottom: 0;
    border-left: 0.3em solid transparent;
}

.dropdown-toggle:empty::after {
    margin-left: 0;
}

/* Estilos específicos para admin */
.admin-content .dropdown-menu {
    background-color: #fff;
    border: 1px solid #dee2e6;
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
}

.admin-content .dropdown-item {
    padding: 0.375rem 1rem;
    font-size: 0.875rem;
}

.admin-content .dropdown-item:hover {
    background-color: #f8f9fa;
    color: #495057;
}

/* Asegurar z-index correcto */
.dropdown-menu {
    z-index: 10055 !important;
}

/* Fix para dropdowns en tablas */
.table .dropdown {
    position: static;
}

.table .dropdown-menu {
    position: absolute;
}

/* Responsive fixes */
@media (max-width: 768px) {
    .dropdown-menu {
        min-width: 8rem;
        font-size: 0.8rem;
    }
    
    .dropdown-item {
        padding: 0.5rem 0.75rem;
    }
}