/**
 * Estils per MenuBar - Barra de menú estil IDE
 */

.menu-bar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 36px;
    background: #2c3e50;
    border-bottom: 1px solid #34495e;
    display: flex;
    align-items: center;
    padding: 0 10px;
    z-index: 10000;
    user-select: none;
}

/* Contenidor menú individual */
.menu-container {
    position: relative;
}

.menu-button {
    padding: 8px 14px;
    color: #ecf0f1;
    font-size: 13px;
    cursor: pointer;
    border-radius: 4px;
    transition: background 0.2s;
    background: transparent;
    border: none;
    font-family: inherit;
}

.menu-button:hover {
    background: rgba(255, 255, 255, 0.1);
}

.menu-container.open .menu-button {
    background: #3498db;
}

/* Dropdown */
.menu-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 220px;
    background: #2c3e50;
    border: 1px solid #34495e;
    border-radius: 4px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    margin-top: 2px;
    display: none;
    z-index: 10001;
}

.menu-container.open .menu-dropdown {
    display: block;
}

/* Item de menú */
.menu-item {
    display: flex;
    align-items: center;
    padding: 8px 12px;
    color: #ecf0f1;
    font-size: 13px;
    cursor: pointer;
    transition: background 0.15s;
    gap: 10px;
}

.menu-item:hover {
    background: #34495e;
}

.menu-item.disabled {
    color: #7f8c8d;
    cursor: not-allowed;
    opacity: 0.5;
}

.menu-item.disabled:hover {
    background: transparent;
}

/* Separador */
.menu-separator {
    height: 1px;
    background: #34495e;
    margin: 4px 8px;
}

/* Icon del item */
.menu-item-icon {
    font-size: 14px;
    width: 20px;
    text-align: center;
    flex-shrink: 0;
}

/* Label del item */
.menu-item-label {
    flex: 1;
}

/* Shortcut */
.menu-item-shortcut {
    color: #95a5a6;
    font-size: 11px;
    margin-left: 20px;
    flex-shrink: 0;
}

/* Checkbox i Radio */
.menu-item-check {
    width: 16px;
    height: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    flex-shrink: 0;
}

.menu-item.checkable .menu-item-check::before {
    content: '';
}

.menu-item.checkable.checked .menu-item-check::before {
    content: '✓';
    color: #2ecc71;
    font-weight: bold;
}

.menu-item.radio .menu-item-check::before {
    content: '';
}

.menu-item.radio.checked .menu-item-check::before {
    content: '●';
    color: #3498db;
}

/* Estats */
.menu-item.active {
    background: #3498db;
    color: white;
}

.menu-item:active {
    background: #2980b9;
}

/* Responsive */
@media (max-width: 768px) {
    .menu-bar {
        height: 44px;
    }
    
    .menu-button {
        padding: 10px 12px;
        font-size: 14px;
    }
    
    .menu-dropdown {
        min-width: 200px;
    }
    
    .menu-item {
        padding: 12px 14px;
        font-size: 14px;
    }
}

/* Animacions */
@keyframes menuFadeIn {
    from {
        opacity: 0;
        transform: translateY(-5px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.menu-dropdown {
    animation: menuFadeIn 0.15s ease-out;
}
